Fix #16872
This commit is contained in:
syuilo 2025-11-27 13:00:11 +09:00
parent 105cc4b50a
commit 8fec44d0e9
1 changed files with 2 additions and 5 deletions

View File

@ -178,16 +178,13 @@ export async function common(createVue: () => Promise<App<Element>>) {
window.document.documentElement.dataset.colorScheme = store.s.darkMode ? 'dark' : 'light';
if (!isSafeMode) {
const darkTheme = prefer.model('darkTheme');
const lightTheme = prefer.model('lightTheme');
watch(darkTheme, (theme) => {
watch(prefer.r.darkTheme, (theme) => {
if (store.s.darkMode) {
applyTheme(theme ?? defaultDarkTheme);
}
});
watch(lightTheme, (theme) => {
watch(prefer.r.lightTheme, (theme) => {
if (!store.s.darkMode) {
applyTheme(theme ?? defaultLightTheme);
}