diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2022-05-28 01:31:23 +0900 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2022-05-28 01:31:23 +0900 |
| commit | fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb (patch) | |
| tree | 43d941bbacc9cfaa911fc785fce0b34af4ef6fcc /packages/client/src/scripts/theme.ts | |
| parent | Merge branch 'develop' into pizzax-indexeddb (diff) | |
| parent | fix(docs): correct information for drive upload (#8736) (diff) | |
| download | sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.tar.gz sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.tar.bz2 sharkey-fa99d9c6fee3a7d6f72e254e0aa55972cd6538fb.zip | |
Merge branch 'develop' into pizzax-indexeddb
Diffstat (limited to 'packages/client/src/scripts/theme.ts')
| -rw-r--r-- | packages/client/src/scripts/theme.ts | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts index 2cb78fae5c..b61b1684a8 100644 --- a/packages/client/src/scripts/theme.ts +++ b/packages/client/src/scripts/theme.ts @@ -1,5 +1,5 @@ import { globalEvents } from '@/events'; -import * as tinycolor from 'tinycolor2'; +import tinycolor from 'tinycolor2'; export type Theme = { id: string; @@ -10,29 +10,29 @@ export type Theme = { props: Record<string, string>; }; -export const lightTheme: Theme = require('@/themes/_light.json5'); -export const darkTheme: Theme = require('@/themes/_dark.json5'); +export const lightTheme: Theme = await import('@/themes/_light.json5'); +export const darkTheme: Theme = await import('@/themes/_dark.json5'); export const themeProps = Object.keys(lightTheme.props).filter(key => !key.startsWith('X')); export const builtinThemes = [ - require('@/themes/l-light.json5'), - require('@/themes/l-coffee.json5'), - require('@/themes/l-apricot.json5'), - require('@/themes/l-rainy.json5'), - require('@/themes/l-vivid.json5'), - require('@/themes/l-cherry.json5'), - require('@/themes/l-sushi.json5'), + await import('@/themes/l-light.json5'), + await import('@/themes/l-coffee.json5'), + await import('@/themes/l-apricot.json5'), + await import('@/themes/l-rainy.json5'), + await import('@/themes/l-vivid.json5'), + await import('@/themes/l-cherry.json5'), + await import('@/themes/l-sushi.json5'), - require('@/themes/d-dark.json5'), - require('@/themes/d-persimmon.json5'), - require('@/themes/d-astro.json5'), - require('@/themes/d-future.json5'), - require('@/themes/d-botanical.json5'), - require('@/themes/d-cherry.json5'), - require('@/themes/d-ice.json5'), - require('@/themes/d-pumpkin.json5'), - require('@/themes/d-black.json5'), + await import('@/themes/d-dark.json5'), + await import('@/themes/d-persimmon.json5'), + await import('@/themes/d-astro.json5'), + await import('@/themes/d-future.json5'), + await import('@/themes/d-botanical.json5'), + await import('@/themes/d-cherry.json5'), + await import('@/themes/d-ice.json5'), + await import('@/themes/d-pumpkin.json5'), + await import('@/themes/d-black.json5'), ] as Theme[]; let timeout = null; |