app
routes
_index.tsx
about.tsx
admin-application.tsx
appeals.tsx
book-event.tsx
data-transfer.tsx
data-transfer_.complete.tsx
data-transfer_.destination-account.tsx
data-transfer_.start.tsx
delete-account.tsx
et-members.tsx
et-members_.strikes_.$uid.tsx
events-calendar.tsx
events-team.tsx
events-team_.events-breakdown.tsx
events-team_.historical.tsx
events-team_.outstanding.tsx
events-team_.report.tsx
hammer.tsx
inactivities.tsx
me.tsx
mod-queue.tsx
privacy.tsx
report.tsx
rpserver.tsx
rpserver_.application.tsx
short-links.tsx
short-links_.create.tsx
support.tsx
team.tsx
terms.tsx
styles
context.tsx
createEmotionCache.ts
entry.client.tsx
entry.server.tsx
root.tsx
components
data
functions
public
.gitignore
.node-version
.prettierignore
OFL.txt
README.md
emotion-server.js
index.css
index.d.ts
package-lock.json
package.json
remix.config.js
server.ts
theme.ts
tsconfig.json
89 lines
2.5 KiB
TypeScript
89 lines
2.5 KiB
TypeScript
import {
|
|
Button,
|
|
Container,
|
|
FormControl,
|
|
FormLabel,
|
|
Heading,
|
|
Input,
|
|
NumberDecrementStepper,
|
|
NumberIncrementStepper,
|
|
NumberInput,
|
|
NumberInputField,
|
|
NumberInputStepper,
|
|
Textarea,
|
|
VStack,
|
|
} from "@chakra-ui/react";
|
|
import { useLoaderData } from "@remix-run/react";
|
|
|
|
export async function loader({ context }: { context: RequestContext }) {
|
|
const { current_user: user } = context.data;
|
|
|
|
if (!user.id)
|
|
throw new Response(null, {
|
|
status: 401,
|
|
});
|
|
|
|
if (await context.env.DATA.get(`rpserverblock_${user.id}`))
|
|
throw new Response(null, {
|
|
status: 403,
|
|
});
|
|
|
|
return null;
|
|
}
|
|
|
|
export default function () {
|
|
useLoaderData<typeof loader>();
|
|
|
|
return (
|
|
<Container maxW="container.md">
|
|
<Heading pb="32px">RP Server Application</Heading>
|
|
<VStack alignItems="start" spacing={12}>
|
|
<FormControl isRequired>
|
|
<FormLabel>Server Invite</FormLabel>
|
|
<Input maxLength={48} placeholder="https://discord.gg/abcdef123456" />
|
|
</FormControl>
|
|
<FormControl isRequired>
|
|
<FormLabel>Roblox Username</FormLabel>
|
|
<Input maxLength={20} placeholder="builderman" />
|
|
</FormControl>
|
|
<FormControl isRequired>
|
|
<FormLabel>How old are you?</FormLabel>
|
|
<NumberInput>
|
|
<NumberInputField />
|
|
<NumberInputStepper>
|
|
<NumberIncrementStepper />
|
|
<NumberDecrementStepper />
|
|
</NumberInputStepper>
|
|
</NumberInput>
|
|
</FormControl>
|
|
<FormControl isRequired>
|
|
<FormLabel>Introduce yourself!</FormLabel>
|
|
<Textarea
|
|
placeholder="Who are you? What do you enjoy doing? Write everything you want us to know about you."
|
|
rows={5}
|
|
/>
|
|
</FormControl>
|
|
<FormControl isRequired>
|
|
<FormLabel>What is your RP server about?</FormLabel>
|
|
<Input
|
|
maxLength={256}
|
|
placeholder="This can be just about anything tangentally related to CC2."
|
|
/>
|
|
</FormControl>
|
|
<FormControl>
|
|
<FormLabel>Explain the above in more details</FormLabel>
|
|
<Textarea
|
|
placeholder="What are your specific plans for your server?"
|
|
rows={5}
|
|
/>
|
|
</FormControl>
|
|
<FormControl>
|
|
<FormLabel>Anything else?</FormLabel>
|
|
<Textarea placeholder="Any questions or comments" rows={5} />
|
|
</FormControl>
|
|
<Button>Submit</Button>
|
|
</VStack>
|
|
</Container>
|
|
);
|
|
}
|