Add report submission type radio

This commit is contained in:
2025-07-27 00:03:10 -04:00
parent ba8e1bab7c
commit 8d357ec249

View File

@ -9,9 +9,12 @@ import {
HStack, HStack,
Input, Input,
Link, Link,
Radio,
RadioGroup,
Text, Text,
Textarea, Textarea,
useToast, useToast,
VStack,
} from "@chakra-ui/react"; } from "@chakra-ui/react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useLoaderData } from "@remix-run/react"; import { useLoaderData } from "@remix-run/react";
@ -31,17 +34,18 @@ export async function loader({
export function meta() { export function meta() {
return [ return [
{ {
title: "Report an Exploiter - Car Crushers", title: "Send a Report - Car Crushers",
}, },
{ {
name: "description", name: "description",
content: "Use this page to report a cheater", content: "Use this page to submit a report",
}, },
]; ];
} }
export default function () { export default function () {
const [fileProgress, setFileProgress] = useState(0); const [fileProgress, setFileProgress] = useState(0);
const [submissionType, setSubmissionType] = useState("exploiter");
const [showSuccess, setShowSuccess] = useState(false); const [showSuccess, setShowSuccess] = useState(false);
const toast = useToast(); const toast = useToast();
const [uploading, setUploading] = useState(false); const [uploading, setUploading] = useState(false);
@ -132,6 +136,7 @@ export default function () {
body: JSON.stringify({ body: JSON.stringify({
description: description || undefined, description: description || undefined,
files: filelist, files: filelist,
submissionType,
turnstileResponse: logged_in ? undefined : turnstileToken, turnstileResponse: logged_in ? undefined : turnstileToken,
usernames, usernames,
}), }),
@ -277,6 +282,20 @@ export default function () {
<Input id="usernames" placeholder="builderman" /> <Input id="usernames" placeholder="builderman" />
</FormControl> </FormControl>
<br /> <br />
<FormControl isRequired>
<FormLabel htmlFor="submissionType">Type of Report</FormLabel>
<RadioGroup
id="submissionType"
onChange={setSubmissionType}
value={submissionType}
>
<VStack spacing={2}>
<Radio value="exploit">Exploiter</Radio>
<Radio value="abuse">Server Configurator Abuse</Radio>
</VStack>
</RadioGroup>
</FormControl>
<br />
<FormControl isRequired> <FormControl isRequired>
<FormLabel>Your Evidence (Max size per file: 512MB)</FormLabel> <FormLabel>Your Evidence (Max size per file: 512MB)</FormLabel>
<Button <Button