diff --git a/components/ReportCard.tsx b/components/ReportCard.tsx
index 58e3afc..ed19af3 100644
--- a/components/ReportCard.tsx
+++ b/components/ReportCard.tsx
@@ -21,9 +21,6 @@ export default function (props: ReportCardProps) {
const [loading, setLoading] = useState(false);
const toast = useToast();
const targetMap: { [k: number]: string } = {};
- const [attachmentsReady, setAttachmentReady] = useState(
- !props.attachments_loading,
- );
const actionMap: { [k: number]: number } = {};
for (let i = 0; i < props.target_ids.length; i++)
@@ -31,18 +28,6 @@ export default function (props: ReportCardProps) {
value: props.target_usernames[i],
});
- async function recheckAttachment() {
- const attachmentCheck = await fetch("/api/uploads/status", {
- body: JSON.stringify(props.attachments),
- headers: {
- "content-type": "application/json",
- },
- method: "POST",
- });
-
- setAttachmentReady(attachmentCheck.ok);
- }
-
async function submitActions() {
setLoading(true);
const submitReq = await fetch(`/api/reports/${props.id}/action`, {
@@ -82,124 +67,109 @@ export default function (props: ReportCardProps) {
ID(s): {props.target_ids.toString()}
- {attachmentsReady ? (
-
-
-
+
+
+
-
- ) : (
- Attachments processing...
- )}
+
+
+
+
+
{props.description}
- {props.attachments_loading ? (
- await recheckAttachment()}
- >
- Reload Attachment
-
- ) : (
-
- {(function () {
- const radioGroups = [];
- for (let i = 0; i < props.target_ids.length; i++) {
- radioGroups.push(
- {
- actionMap[props.target_ids[i]] = parseInt(val);
- }}
- >
-
- {props.target_usernames[i]}
-
- Ignore
-
-
- Hide from Leaderboards
-
-
- Ban
-
-
- ,
- );
- }
+
+ {(function () {
+ const radioGroups = [];
+ for (let i = 0; i < props.target_ids.length; i++) {
+ radioGroups.push(
+ {
+ actionMap[props.target_ids[i]] = parseInt(val);
+ }}
+ >
+
+ {props.target_usernames[i]}
+
+ Ignore
+
+
+ Hide from Leaderboards
+
+
+ Ban
+
+
+ ,
+ );
+ }
- return radioGroups;
- })()}
-
- await submitActions()}
- isLoading={loading}
- loadingText="Submitting..."
- >
- Submit
-
-
-
- )}
+ return radioGroups;
+ })()}
+
+ await submitActions()}
+ isLoading={loading}
+ loadingText="Submitting..."
+ >
+ Submit
+
+
+
);
diff --git a/functions/api/reports/submit.ts b/functions/api/reports/submit.ts
index 64701c5..eed12b3 100644
--- a/functions/api/reports/submit.ts
+++ b/functions/api/reports/submit.ts
@@ -189,15 +189,6 @@ export async function onRequestPost(context: RequestContext) {
uploadUrls.push(urlResult.value);
let url = new URL(urlResult.value).searchParams.get("name") as string;
- const extension = (url.split(".").at(-1) as string).toLowerCase();
-
- if (["mkv", "wmv"].includes(extension)) {
- url = url.replace(`.${extension}`, ".mp4");
-
- await context.env.DATA.put(`videoprocessing_${url}`, "1", {
- expirationTtl: 600,
- });
- }
attachments.push(url);
}
diff --git a/index.d.ts b/index.d.ts
index b3eb57a..40846a8 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -63,7 +63,6 @@ declare global {
interface ReportCardProps {
attachments: string[];
- attachments_loading?: boolean;
created_at: number;
description?: string;
id: string;