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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user