diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 12bb56a874..30bc0f5219 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -187,6 +187,12 @@ export async function common(createVue: () => App) { if (instance.defaultLightTheme != null) ColdDeviceStorage.set('lightTheme', JSON.parse(instance.defaultLightTheme)); if (instance.defaultDarkTheme != null) ColdDeviceStorage.set('darkTheme', JSON.parse(instance.defaultDarkTheme)); defaultStore.set('themeInitial', false); + } else { + if (defaultStore.state.darkMode) { + applyTheme(darkTheme.value); + } else { + applyTheme(lightTheme.value); + } } }); diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index 067b4fab1e..ee96c50128 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -52,20 +52,16 @@ export function getConfig(): UserConfig { changeOrigin: true, target: 'http://127.0.0.1:3000/', }, - - '/assets': { - target: 'http://127.0.0.1:3000/', - }, - '/twemoji': { - target: 'http://127.0.0.1:3000/', - }, - '/sw.js': { - target: 'http://127.0.0.1:3000/', - }, + '/assets': 'http://127.0.0.1:3000/', + '/twemoji': 'http://127.0.0.1:3000/', + '/fluent-emoji': 'http://127.0.0.1:3000/', + '/sw.js': 'http://127.0.0.1:3000/', '/streaming': { target: 'ws://127.0.0.1:3000/', ws: true, }, + "favicon.ico": 'http://127.0.0.1:3000/', + "client-assets": "http://127.0.0.1:3000/" } },