diff --git a/src/components/SubmitForm.tsx b/src/components/SubmitForm.tsx index 23f1639..53e8842 100644 --- a/src/components/SubmitForm.tsx +++ b/src/components/SubmitForm.tsx @@ -7,6 +7,18 @@ import { useRouter } from '@/navigation' const FORMATS = ['mp4', 'mp3', 'webm', 'mkv'] const QUALITIES = ['best', '1080p', '720p', '480p', '360p'] +function Spinner() { + return ( + + + + + ) +} + +const selectClass = + 'rounded-lg border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-900 px-2 py-1 text-gray-900 dark:text-gray-50 text-sm outline-none focus:ring-2 focus:ring-violet-500' + export function SubmitForm() { const t = useTranslations('home') const router = useRouter() @@ -52,58 +64,82 @@ export function SubmitForm() { } return ( -
- + + {/* URL input with inline submit button */} +
+ {/* Violet glow behind the input */} +
+
+ setUrl(e.target.value)} + required + placeholder="https://www.youtube.com/watch?v=..." + className="flex-1 px-4 py-3 bg-transparent text-sm outline-none placeholder:text-gray-400 dark:placeholder:text-slate-500" + /> + +
+
- + {/* Options row */} +
+ - + - + - +
+ + {t('advanced')} + + setExtraArgs(e.target.value)} + placeholder='["--sponsorblock-remove","all"]' + className="mt-2 w-full rounded-lg border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-900 px-3 py-2 text-sm text-gray-900 dark:text-gray-50 outline-none focus:ring-2 focus:ring-violet-500" + /> +
+
- {error &&

{error}

} - - + {error && ( +

{error}

+ )} ) }