fix: theme fallback issue

This commit is contained in:
pa
2026-01-05 20:35:16 +09:00
committed by Natsumi
parent c80562c623
commit 61813da917
3 changed files with 6 additions and 16 deletions

View File

@@ -204,20 +204,6 @@
</span>
</button>
<el-divider></el-divider>
<div class="nav-menu-theme__custom">
<span class="nav-menu-theme__custom-label">{{
t('view.settings.appearance.theme_color.header')
}}</span>
<el-color-picker
:model-value="currentPrimary"
size="small"
:disabled="isApplyingPrimaryColor"
:teleported="false"
@change="handleCustomThemeColorChange" />
</div>
</div>
<template #reference>
<button type="button" class="nav-menu-theme__item" @click.prevent>

View File

@@ -78,6 +78,8 @@ function changeAppThemeStyle(themeMode) {
// load system theme as fallback
themeMode = systemIsDarkMode() ? 'dark' : 'light';
themeConfig = THEME_CONFIG[themeMode];
const appSettingsStore = useAppearanceSettingsStore();
appSettingsStore.setThemeMode(themeMode);
}
const cssFiles = Array.isArray(themeConfig.cssFiles)

View File

@@ -211,7 +211,6 @@ export const useAppearanceSettingsStore = defineStore(
themeMode.value = normalizedThemeMode;
applyThemeMode();
await changeAppThemeStyle(themeMode.value);
await initPrimaryColor();
displayVRCPlusIconsAsAvatar.value =
@@ -462,6 +461,7 @@ export const useAppearanceSettingsStore = defineStore(
configRepository.setString('VRCX_ThemeMode', normalizedThemeMode);
applyThemeMode();
}
function applyThemeMode() {
if (themeMode.value === 'light') {
setIsDarkMode(false);
@@ -471,6 +471,7 @@ export const useAppearanceSettingsStore = defineStore(
setIsDarkMode(true);
}
}
/**
* @param {boolean} isDark
*/
@@ -878,7 +879,8 @@ export const useAppearanceSettingsStore = defineStore(
setNotificationIconDot,
applyCompactTableMode,
setNavCollapsed,
toggleNavCollapsed
toggleNavCollapsed,
setThemeMode
};
}
);