wip
This commit is contained in:
parent
c63c1c9040
commit
73d138d8b0
8 changed files with 34 additions and 101 deletions
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
const getPasswordStrength = require('syuilo-password-strength');
|
||||
const getPasswordStrength = await import('syuilo-password-strength');
|
||||
import { toUnicode } from 'punycode/';
|
||||
import { host, url } from '@/config';
|
||||
import MkButton from './ui/button.vue';
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export type UnicodeEmojiDef = {
|
|||
}
|
||||
|
||||
// initial converted from https://github.com/muan/emojilib/commit/242fe68be86ed6536843b83f7e32f376468b38fb
|
||||
export const emojilist = require('../emojilist.json') as UnicodeEmojiDef[];
|
||||
export const emojilist = await import('../emojilist.json') as UnicodeEmojiDef[];
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -255,10 +255,13 @@ type Plugin = {
|
|||
/**
|
||||
* 常にメモリにロードしておく必要がないような設定情報を保管するストレージ(非リアクティブ)
|
||||
*/
|
||||
import lightTheme from '@/themes/l-light.json5';
|
||||
import darkTheme from '@/themes/d-dark.json5'
|
||||
|
||||
export class ColdDeviceStorage {
|
||||
public static default = {
|
||||
lightTheme: require('@/themes/l-light.json5') as Theme,
|
||||
darkTheme: require('@/themes/d-dark.json5') as Theme,
|
||||
lightTheme,
|
||||
darkTheme,
|
||||
syncDeviceDarkMode: true,
|
||||
plugins: [] as Plugin[],
|
||||
mediaVolume: 0.5,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue