From 7e8485a5d3b87a6e1f9c4ff661c406d4efe7a5fd Mon Sep 17 00:00:00 2001 From: pa Date: Tue, 6 Jan 2026 20:46:00 +0900 Subject: [PATCH] fix flashbang --- src/shared/utils/base/ui.js | 3 +-- src/stores/settings/appearance.js | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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'; + } } /**