From 27024d7baa246ccc75344c51fc893bc58575be06 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 19 Jun 2026 20:50:32 -0400 Subject: [PATCH] update form --- .../apps/video-info-website/src/api/types.ts | 3 + .../src/components/ReportForm.tsx | 75 ++++++++++++++++++- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/frontend/apps/video-info-website/src/api/types.ts b/frontend/apps/video-info-website/src/api/types.ts index 2725af9142..8c573eac04 100644 --- a/frontend/apps/video-info-website/src/api/types.ts +++ b/frontend/apps/video-info-website/src/api/types.ts @@ -119,6 +119,9 @@ export interface VideoInfoNoteRequest { maybe_website?: string | null; maybe_other_website?: string | null; maybe_comments?: string | null; + maybe_email_address?: string | null; + can_share_report?: boolean; + was_scammed?: boolean; } /** Response from `POST /v1/video_info/notes`. */ diff --git a/frontend/apps/video-info-website/src/components/ReportForm.tsx b/frontend/apps/video-info-website/src/components/ReportForm.tsx index 151651bc45..50ee331c21 100644 --- a/frontend/apps/video-info-website/src/components/ReportForm.tsx +++ b/frontend/apps/video-info-website/src/components/ReportForm.tsx @@ -24,6 +24,9 @@ export function ReportForm({ uploadedVideoToken }: ReportFormProps) { const [website, setWebsite] = useState(''); const [customWebsite, setCustomWebsite] = useState(''); const [comments, setComments] = useState(''); + const [email, setEmail] = useState(''); + const [wasScammed, setWasScammed] = useState(false); + const [canShare, setCanShare] = useState(false); // The note token is kept so subsequent saves update the same record. const [noteToken, setNoteToken] = useState(null); @@ -37,7 +40,10 @@ export function ReportForm({ uploadedVideoToken }: ReportFormProps) { (modelType === CUSTOM_VALUE && customModelName.trim() !== '') || websiteChosen || (website === CUSTOM_VALUE && customWebsite.trim() !== '') || - comments.trim() !== ''; + comments.trim() !== '' || + email.trim() !== '' || + wasScammed || + canShare; const submit = useCallback(async () => { if (!hasContent) return; @@ -52,6 +58,9 @@ export function ReportForm({ uploadedVideoToken }: ReportFormProps) { maybe_other_website: website === CUSTOM_VALUE ? customWebsite.trim() || undefined : undefined, maybe_comments: comments.trim() || undefined, + maybe_email_address: email.trim() || undefined, + can_share_report: canShare, + was_scammed: wasScammed, }; try { const response = await saveVideoNote(request); @@ -75,6 +84,9 @@ export function ReportForm({ uploadedVideoToken }: ReportFormProps) { website, customWebsite, comments, + email, + canShare, + wasScammed, ]); // Auto-save 4s after the last change. @@ -155,6 +167,25 @@ export function ReportForm({ uploadedVideoToken }: ReportFormProps) { /> + {/* Flags */} +
+ + +
+ + {/* Optional email */} + + + +
+ ); +} + function Field({ label, children }: { label: string; children: React.ReactNode }) { return (