refactor(frontend): relocate theme script
This commit is contained in:
@@ -12,7 +12,7 @@ import type { App } from 'vue';
|
||||
import widgets from '@/widgets/index.js';
|
||||
import directives from '@/directives/index.js';
|
||||
import components from '@/components/index.js';
|
||||
import { applyTheme } from '@/utility/theme.js';
|
||||
import { applyTheme } from '@/theme.js';
|
||||
import { isDeviceDarkmode } from '@/utility/is-device-darkmode.js';
|
||||
import { updateI18n, i18n } from '@/i18n.js';
|
||||
import { $i, refreshAccount, login } from '@/account.js';
|
||||
|
@@ -56,7 +56,7 @@ import FormSection from '@/components/form/section.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
import { parsePluginMeta, installPlugin } from '@/plugin.js';
|
||||
import { parseThemeCode, installTheme } from '@/utility/theme.js';
|
||||
import { parseThemeCode, installTheme } from '@/theme.js';
|
||||
import { unisonReload } from '@/utility/unison-reload.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
||||
|
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { ref, computed } from 'vue';
|
||||
import MkCodeEditor from '@/components/MkCodeEditor.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { parseThemeCode, previewTheme, installTheme } from '@/utility/theme.js';
|
||||
import { parseThemeCode, previewTheme, installTheme } from '@/theme.js';
|
||||
import * as os from '@/os.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/utility/page-metadata.js';
|
||||
|
@@ -37,8 +37,8 @@ import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkSelect from '@/components/MkSelect.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { getBuiltinThemesRef } from '@/utility/theme.js';
|
||||
import type { Theme } from '@/utility/theme.js';
|
||||
import { getBuiltinThemesRef } from '@/theme.js';
|
||||
import type { Theme } from '@/theme.js';
|
||||
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
|
||||
import * as os from '@/os.js';
|
||||
import { getThemes, removeTheme } from '@/theme-store.js';
|
||||
|
@@ -83,7 +83,7 @@ import MkSelect from '@/components/MkSelect.vue';
|
||||
import FormSection from '@/components/form/section.vue';
|
||||
import FormLink from '@/components/form/link.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { getBuiltinThemesRef } from '@/utility/theme.js';
|
||||
import { getBuiltinThemesRef } from '@/theme.js';
|
||||
import { selectFile } from '@/utility/select-file.js';
|
||||
import { isDeviceDarkmode } from '@/utility/is-device-darkmode.js';
|
||||
import { store } from '@/store.js';
|
||||
|
@@ -81,13 +81,13 @@ import JSON5 from 'json5';
|
||||
import lightTheme from '@@/themes/_light.json5';
|
||||
import darkTheme from '@@/themes/_dark.json5';
|
||||
import { host } from '@@/js/config.js';
|
||||
import type { Theme } from '@/utility/theme.js';
|
||||
import type { Theme } from '@/theme.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkCodeEditor from '@/components/MkCodeEditor.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import { $i } from '@/account.js';
|
||||
import { applyTheme } from '@/utility/theme.js';
|
||||
import { applyTheme } from '@/theme.js';
|
||||
import * as os from '@/os.js';
|
||||
import { store } from '@/store.js';
|
||||
import { addTheme } from '@/theme-store.js';
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { hemisphere } from '@@/js/intl-const.js';
|
||||
import type { Theme } from '@/utility/theme.js';
|
||||
import type { Theme } from '@/theme.js';
|
||||
import type { SoundType } from '@/utility/sound.js';
|
||||
import type { Plugin } from '@/plugin.js';
|
||||
import { DEFAULT_DEVICE_KIND } from '@/utility/device-kind.js';
|
||||
|
@@ -3,8 +3,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import type { Theme } from '@/utility/theme.js';
|
||||
import { getBuiltinThemes } from '@/utility/theme.js';
|
||||
import type { Theme } from '@/theme.js';
|
||||
import { getBuiltinThemes } from '@/theme.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
|
||||
|
@@ -8,8 +8,8 @@ import tinycolor from 'tinycolor2';
|
||||
import lightTheme from '@@/themes/_light.json5';
|
||||
import darkTheme from '@@/themes/_dark.json5';
|
||||
import JSON5 from 'json5';
|
||||
import { deepClone } from './clone.js';
|
||||
import type { BundledTheme } from 'shiki/themes';
|
||||
import { deepClone } from '@/utility/clone.js';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { addTheme, getThemes } from '@/theme-store.js';
|
@@ -5,8 +5,8 @@
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { themeProps } from './theme.js';
|
||||
import type { Theme } from './theme.js';
|
||||
import type { Theme } from '@/theme.js';
|
||||
import { themeProps } from '@/theme.js';
|
||||
|
||||
export type Default = null;
|
||||
export type Color = string;
|
||||
|
Reference in New Issue
Block a user