fix: dark mode theme switching and styling

- Apply theme immediately when saving settings (fixes theme not updating)
- Add dark mode CSS variables for success/warning/danger/info colors
- Fix shell-header background for dark mode
- Fix URL validation styles to use CSS variables
- Add explicit background/color to form inputs for dark mode support
- Quality gates: typecheck OK, lint OK, build OK
This commit is contained in:
Fusion
2026-05-19 23:13:10 +02:00
parent 94aa88c154
commit 461cb30b28
2 changed files with 33 additions and 9 deletions
+9
View File
@@ -53,6 +53,15 @@ export const SettingsPage = () => {
const updated = await updateUserConfig(update);
setConfig(updated);
setSaveStatus("saved");
// Apply theme immediately
const theme = updated.theme ?? "system";
if (theme === "system") {
document.documentElement.removeAttribute("data-theme");
} else {
document.documentElement.setAttribute("data-theme", theme);
}
setTimeout(() => setSaveStatus("idle"), 2000);
} catch {
setSaveStatus("error");