diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-30 11:51:29 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-30 11:51:29 +0900 |
| commit | 8f14b42e81ba891744cad19e4c6aa0d2d30f5e53 (patch) | |
| tree | 616362cfeb09ac80db82d9d8f2039e0742788b2a /packages/frontend/src | |
| parent | vue-plyrやめるなど (diff) | |
| download | sharkey-8f14b42e81ba891744cad19e4c6aa0d2d30f5e53.tar.gz sharkey-8f14b42e81ba891744cad19e4c6aa0d2d30f5e53.tar.bz2 sharkey-8f14b42e81ba891744cad19e4c6aa0d2d30f5e53.zip | |
perf: インスタンスデフォルトテーマを予めjson5 -> jsonに変換しておくことでjson5を初期バンドルに含めずに済むように
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/boot/common.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index e9d6586f85..e1b12fe7d6 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -1,6 +1,5 @@ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent, App } from 'vue'; import { compareVersions } from 'compare-versions'; -import JSON5 from 'json5'; import widgets from '@/widgets'; import directives from '@/directives'; import components from '@/components'; @@ -180,8 +179,8 @@ export async function common(createVue: () => App<Element>) { fetchInstanceMetaPromise.then(() => { if (defaultStore.state.themeInitial) { - if (instance.defaultLightTheme != null) ColdDeviceStorage.set('lightTheme', JSON5.parse(instance.defaultLightTheme)); - if (instance.defaultDarkTheme != null) ColdDeviceStorage.set('darkTheme', JSON5.parse(instance.defaultDarkTheme)); + 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); } }); |