fix theme

This commit is contained in:
FruitRiin 2023-11-19 18:47:27 +09:00
parent ddef9cab5f
commit 14e0d1f252
2 changed files with 12 additions and 10 deletions

View File

@ -187,6 +187,12 @@ export async function common(createVue: () => App<Element>) {
if (instance.defaultLightTheme != null) ColdDeviceStorage.set('lightTheme', JSON.parse(instance.defaultLightTheme)); if (instance.defaultLightTheme != null) ColdDeviceStorage.set('lightTheme', JSON.parse(instance.defaultLightTheme));
if (instance.defaultDarkTheme != null) ColdDeviceStorage.set('darkTheme', JSON.parse(instance.defaultDarkTheme)); if (instance.defaultDarkTheme != null) ColdDeviceStorage.set('darkTheme', JSON.parse(instance.defaultDarkTheme));
defaultStore.set('themeInitial', false); defaultStore.set('themeInitial', false);
} else {
if (defaultStore.state.darkMode) {
applyTheme(darkTheme.value);
} else {
applyTheme(lightTheme.value);
}
} }
}); });

View File

@ -52,20 +52,16 @@ export function getConfig(): UserConfig {
changeOrigin: true, changeOrigin: true,
target: 'http://127.0.0.1:3000/', target: 'http://127.0.0.1:3000/',
}, },
'/assets': 'http://127.0.0.1:3000/',
'/assets': { '/twemoji': 'http://127.0.0.1:3000/',
target: 'http://127.0.0.1:3000/', '/fluent-emoji': 'http://127.0.0.1:3000/',
}, '/sw.js': 'http://127.0.0.1:3000/',
'/twemoji': {
target: 'http://127.0.0.1:3000/',
},
'/sw.js': {
target: 'http://127.0.0.1:3000/',
},
'/streaming': { '/streaming': {
target: 'ws://127.0.0.1:3000/', target: 'ws://127.0.0.1:3000/',
ws: true, ws: true,
}, },
"favicon.ico": 'http://127.0.0.1:3000/',
"client-assets": "http://127.0.0.1:3000/"
} }
}, },