diff --git a/src/shared/utils/base/ui.js b/src/shared/utils/base/ui.js index 9bac63f4..c5b2ab4f 100644 --- a/src/shared/utils/base/ui.js +++ b/src/shared/utils/base/ui.js @@ -75,8 +75,7 @@ function changeAppThemeStyle(themeMode) { let themeConfig = THEME_CONFIG[themeMode]; if (!themeConfig) { console.error('Invalid theme mode:', themeMode); - // load system theme as fallback - themeMode = systemIsDarkMode() ? 'dark' : 'light'; + themeMode = 'dark'; themeConfig = THEME_CONFIG[themeMode]; const appSettingsStore = useAppearanceSettingsStore(); appSettingsStore.setThemeMode(themeMode); diff --git a/src/stores/settings/appearance.js b/src/stores/settings/appearance.js index 152e985f..066b12ec 100644 --- a/src/stores/settings/appearance.js +++ b/src/stores/settings/appearance.js @@ -286,9 +286,11 @@ export const useAppearanceSettingsStore = defineStore( ); function normalizeThemeMode(mode) { - return Object.prototype.hasOwnProperty.call(THEME_CONFIG, mode) - ? mode - : 'light'; + if (Object.prototype.hasOwnProperty.call(THEME_CONFIG, mode)) { + return mode; + } else { + return 'dark'; + } } /**