({
settings,
onUpdate,
}: AdvancedSettingsProps)
| 29 | } |
| 30 | |
| 31 | export const AdvancedSettings = ({ |
| 32 | settings, |
| 33 | onUpdate, |
| 34 | }: AdvancedSettingsProps) => { |
| 35 | const updateRenaming = useCallback( |
| 36 | (pattern: string, startSequence: number) => { |
| 37 | onUpdate('renaming', {pattern, startSequence}); |
| 38 | }, |
| 39 | [onUpdate], |
| 40 | ); |
| 41 | |
| 42 | return ( |
| 43 | <div className="animate-in fade-in slide-in-from-bottom-4 duration-500 space-y-10"> |
| 44 | {/* 1. Theme Selector */} |
| 45 | <div> |
| 46 | <SectionHeader |
| 47 | icon={Monitor} |
| 48 | title="Appearance" |
| 49 | description="Choose how Blair looks on your device." |
| 50 | /> |
| 51 | <div className="grid grid-cols-3 gap-4 bg-white/50 dark:bg-slate-800 p-2 rounded-3xl border border-white/60 dark:border-white/5 mb-6"> |
| 52 | {[ |
| 53 | {id: 'light', icon: Sun, label: 'Light'}, |
| 54 | {id: 'dark', icon: Moon, label: 'Dark'}, |
| 55 | {id: 'system', icon: Monitor, label: 'System'}, |
| 56 | ].map(option => ( |
| 57 | <button |
| 58 | key={option.id} |
| 59 | onClick={() => onUpdate('theme', option.id as ThemeOption)} |
| 60 | className={clsx( |
| 61 | 'flex flex-col items-center gap-2 p-4 rounded-2xl transition-all border-2', |
| 62 | settings.theme === option.id |
| 63 | ? 'bg-white dark:bg-slate-700 border-indigo-500 text-indigo-600 dark:border-sky-500 dark:text-sky-400 shadow-md' |
| 64 | : 'border-transparent hover:bg-white/50 dark:hover:bg-slate-700/50 text-slate-500 dark:text-slate-400', |
| 65 | )} |
| 66 | > |
| 67 | <option.icon className="w-6 h-6" /> |
| 68 | <span className="font-bold">{option.label}</span> |
| 69 | </button> |
| 70 | ))} |
| 71 | </div> |
| 72 | </div> |
| 73 | |
| 74 | {/* 2. Automation */} |
| 75 | <div> |
| 76 | <SectionHeader |
| 77 | icon={Workflow} |
| 78 | title="Automation" |
| 79 | description="Settings for automatic saving." |
| 80 | /> |
| 81 | <div className="grid grid-cols-1 md:grid-cols-2 gap-6"> |
| 82 | <ToggleCard |
| 83 | title="Auto Download" |
| 84 | description="Automatically save files to your computer immediately after they finish processing." |
| 85 | active={settings.autoDownload} |
| 86 | onClick={() => onUpdate('autoDownload', !settings.autoDownload)} |
| 87 | icon={ArrowDownToLine} |
| 88 | /> |
nothing calls this directly
no outgoing calls
no test coverage detected