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