mirror of
https://github.com/olehomelchenko/astrolabe-nvc.git
synced 2025-12-21 21:22:23 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user