Add UI theme settings and experimental dark theme support

- Introduced a new "Appearance" settings section in the settings modal to allow users to select between "Light" and "Dark (Experimental)" themes.
- Updated the application initialization to apply the saved UI theme immediately on page load.
- Enhanced the settings UI to load and save the selected theme.
- Implemented CSS variables for the new experimental dark theme, including color adjustments for various UI elements.
- Updated existing styles to support theme switching, ensuring proper color contrast and readability in both light and dark modes.
This commit is contained in:
2025-10-17 22:54:42 +03:00
parent 02fcfc1833
commit 97158739cc
4 changed files with 176 additions and 48 deletions

View File

@@ -19,6 +19,10 @@ const DEFAULT_SETTINGS = {
renderDebounce: 1500 // 300-3000ms - delay before visualization renders
},
ui: {
theme: 'light' // 'light' | 'experimental'
},
formatting: {
dateFormat: 'smart', // 'smart' | 'locale' | 'iso' | 'custom'
customDateFormat: 'yyyy-MM-dd HH:mm' // Used when dateFormat === 'custom'
@@ -284,5 +288,12 @@ function validateSetting(path, value) {
}
}
if (path === 'ui.theme') {
const validThemes = ['light', 'experimental'];
if (!validThemes.includes(value)) {
errors.push('Invalid theme value');
}
}
return errors;
}