mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-07 06:52:28 +00:00
feat(web): add appearance setting (follow system / dark / light) (#253)
* feat(web): add appearance setting (follow system / dark / light) Add user-facing appearance preference to the settings page, allowing users to choose between Follow System, Dark, and Light themes. The preference is persisted to localStorage and takes priority over automatic detection in the existing theme pipeline. * fix(web): update theme on cross-tab appearance change The storage event handler only updated React state without calling updateScheme(), leaving data-theme and useTheme subscribers stale. * fix(web): move cross-tab appearance sync to global initializeTheme The storage event listener was inside useAppearance(), which is only mounted on the settings page. Other pages never received cross-tab theme updates. Move the listener into initializeTheme() so all pages respond to appearance changes from other tabs.
This commit is contained in:
@@ -249,6 +249,10 @@ export default {
|
||||
'settings.language.title': 'Language',
|
||||
'settings.language.label': 'Language',
|
||||
'settings.display.title': 'Display',
|
||||
'settings.display.appearance': 'Appearance',
|
||||
'settings.display.appearance.system': 'Follow System',
|
||||
'settings.display.appearance.dark': 'Dark',
|
||||
'settings.display.appearance.light': 'Light',
|
||||
'settings.display.fontSize': 'Font Size',
|
||||
'settings.voice.title': 'Voice Assistant',
|
||||
'settings.voice.language': 'Voice Language',
|
||||
|
||||
Reference in New Issue
Block a user