mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
fix flashbang
This commit is contained in:
@@ -75,8 +75,7 @@ function changeAppThemeStyle(themeMode) {
|
|||||||
let themeConfig = THEME_CONFIG[themeMode];
|
let themeConfig = THEME_CONFIG[themeMode];
|
||||||
if (!themeConfig) {
|
if (!themeConfig) {
|
||||||
console.error('Invalid theme mode:', themeMode);
|
console.error('Invalid theme mode:', themeMode);
|
||||||
// load system theme as fallback
|
themeMode = 'dark';
|
||||||
themeMode = systemIsDarkMode() ? 'dark' : 'light';
|
|
||||||
themeConfig = THEME_CONFIG[themeMode];
|
themeConfig = THEME_CONFIG[themeMode];
|
||||||
const appSettingsStore = useAppearanceSettingsStore();
|
const appSettingsStore = useAppearanceSettingsStore();
|
||||||
appSettingsStore.setThemeMode(themeMode);
|
appSettingsStore.setThemeMode(themeMode);
|
||||||
|
|||||||
@@ -286,9 +286,11 @@ export const useAppearanceSettingsStore = defineStore(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function normalizeThemeMode(mode) {
|
function normalizeThemeMode(mode) {
|
||||||
return Object.prototype.hasOwnProperty.call(THEME_CONFIG, mode)
|
if (Object.prototype.hasOwnProperty.call(THEME_CONFIG, mode)) {
|
||||||
? mode
|
return mode;
|
||||||
: 'light';
|
} else {
|
||||||
|
return 'dark';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user