From 3055e6d8c7c533018ca10de55c8cc803499eba48 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 30 Dec 2020 10:15:16 +0900 Subject: localeとthemeのキャッシュクリア実装 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/init.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/client/init.ts') diff --git a/src/client/init.ts b/src/client/init.ts index 9683075785..7c3df68c34 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -91,10 +91,6 @@ if (_DEV_) { // タッチデバイスでCSSの:hoverを機能させる document.addEventListener('touchend', () => {}, { passive: true }); -if (localStorage.theme == null) { - applyTheme(require('@/themes/l-light.json5')); -} - //#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ // TODO: いつの日にか消したい const vh = window.innerHeight * 0.01; @@ -204,7 +200,7 @@ watch(defaultStore.reactiveState.darkMode, (darkMode) => { const themes = builtinThemes.concat(ColdDeviceStorage.get('themes')); applyTheme(themes.find(x => x.id === (darkMode ? ColdDeviceStorage.get('darkTheme') : ColdDeviceStorage.get('lightTheme')))); }); -}); +}, { immediate: localStorage.theme == null }); //#region Sync dark mode if (ColdDeviceStorage.get('syncDeviceDarkMode')) { -- cgit v1.2.3-freya