diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-11-12 02:02:25 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-11-12 02:02:25 +0900 |
| commit | 0e4a111f81cceed275d9bec2695f6e401fb654d8 (patch) | |
| tree | 40874799472fa07416f17b50a398ac33b7771905 /src/client/scripts | |
| parent | update deps (diff) | |
| download | misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.gz misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.bz2 misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.zip | |
refactoring
Resolve #7779
Diffstat (limited to '')
| -rw-r--r-- | packages/client/src/scripts/2fa.ts (renamed from src/client/scripts/2fa.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/aiscript/api.ts (renamed from src/client/scripts/aiscript/api.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/autocomplete.ts (renamed from src/client/scripts/autocomplete.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/check-word-mute.ts (renamed from src/client/scripts/check-word-mute.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/collect-page-vars.ts (renamed from src/client/scripts/collect-page-vars.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/contains.ts (renamed from src/client/scripts/contains.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/copy-to-clipboard.ts (renamed from src/client/scripts/copy-to-clipboard.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/extract-avg-color-from-blurhash.ts (renamed from src/client/scripts/extract-avg-color-from-blurhash.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/focus.ts (renamed from src/client/scripts/focus.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/form.ts (renamed from src/client/scripts/form.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/gen-search-query.ts (renamed from src/client/scripts/gen-search-query.ts) | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-account-from-id.ts (renamed from src/client/scripts/get-account-from-id.ts) | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-md5.ts (renamed from src/client/scripts/get-md5.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-static-image-url.ts (renamed from src/client/scripts/get-static-image-url.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-user-menu.ts (renamed from src/client/scripts/get-user-menu.ts) | 20 | ||||
| -rw-r--r-- | packages/client/src/scripts/hotkey.ts (renamed from src/client/scripts/hotkey.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/block.ts (renamed from src/client/scripts/hpml/block.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/evaluator.ts (renamed from src/client/scripts/hpml/evaluator.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/expr.ts (renamed from src/client/scripts/hpml/expr.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/index.ts (renamed from src/client/scripts/hpml/index.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/lib.ts (renamed from src/client/scripts/hpml/lib.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/type-checker.ts (renamed from src/client/scripts/hpml/type-checker.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/idb-proxy.ts (renamed from src/client/scripts/idb-proxy.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/initialize-sw.ts (renamed from src/client/scripts/initialize-sw.ts) | 8 | ||||
| -rw-r--r-- | packages/client/src/scripts/is-device-darkmode.ts (renamed from src/client/scripts/is-device-darkmode.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/is-device-touch.ts (renamed from src/client/scripts/is-device-touch.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/is-mobile.ts (renamed from src/client/scripts/is-mobile.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/keycode.ts (renamed from src/client/scripts/keycode.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/loading.ts (renamed from src/client/scripts/loading.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/login-id.ts (renamed from src/client/scripts/login-id.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/lookup-user.ts (renamed from src/client/scripts/lookup-user.ts) | 8 | ||||
| -rw-r--r-- | packages/client/src/scripts/paging.ts (renamed from src/client/scripts/paging.ts) | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/physics.ts (renamed from src/client/scripts/physics.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/please-login.ts (renamed from src/client/scripts/please-login.ts) | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/popout.ts (renamed from src/client/scripts/popout.ts) | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/reaction-picker.ts (renamed from src/client/scripts/reaction-picker.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/room/furniture.ts (renamed from src/client/scripts/room/furniture.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/room/furnitures.json5 (renamed from src/client/scripts/room/furnitures.json5) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/room/room.ts (renamed from src/client/scripts/room/room.ts) | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/scroll.ts (renamed from src/client/scripts/scroll.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/search.ts (renamed from src/client/scripts/search.ts) | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/select-file.ts (renamed from src/client/scripts/select-file.ts) | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/show-suspended-dialog.ts (renamed from src/client/scripts/show-suspended-dialog.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/sound.ts (renamed from src/client/scripts/sound.ts) | 4 | ||||
| -rw-r--r-- | packages/client/src/scripts/sticky-sidebar.ts (renamed from src/client/scripts/sticky-sidebar.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/theme-editor.ts (renamed from src/client/scripts/theme-editor.ts) | 0 | ||||
| -rw-r--r-- | packages/client/src/scripts/theme.ts (renamed from src/client/scripts/theme.ts) | 30 | ||||
| -rw-r--r-- | packages/client/src/scripts/unison-reload.ts (renamed from src/client/scripts/unison-reload.ts) | 0 |
48 files changed, 65 insertions, 65 deletions
diff --git a/src/client/scripts/2fa.ts b/packages/client/src/scripts/2fa.ts index 00363cffa6..00363cffa6 100644 --- a/src/client/scripts/2fa.ts +++ b/packages/client/src/scripts/2fa.ts diff --git a/src/client/scripts/aiscript/api.ts b/packages/client/src/scripts/aiscript/api.ts index 5dd08f34ac..20c15d809e 100644 --- a/src/client/scripts/aiscript/api.ts +++ b/packages/client/src/scripts/aiscript/api.ts @@ -1,6 +1,6 @@ import { utils, values } from '@syuilo/aiscript'; -import * as os from '@client/os'; -import { $i } from '@client/account'; +import * as os from '@/os'; +import { $i } from '@/account'; export function createAiScriptEnv(opts) { let apiRequests = 0; diff --git a/src/client/scripts/autocomplete.ts b/packages/client/src/scripts/autocomplete.ts index c0c33b2c7e..f2d5806484 100644 --- a/src/client/scripts/autocomplete.ts +++ b/packages/client/src/scripts/autocomplete.ts @@ -1,7 +1,7 @@ import { Ref, ref } from 'vue'; import * as getCaretCoordinates from 'textarea-caret'; import { toASCII } from 'punycode/'; -import { popup } from '@client/os'; +import { popup } from '@/os'; export class Autocomplete { private suggestion: { @@ -161,7 +161,7 @@ export class Autocomplete { const _y = ref(y); const _q = ref(q); - const { dispose } = await popup(import('@client/components/autocomplete.vue'), { + const { dispose } = await popup(import('@/components/autocomplete.vue'), { textarea: this.textarea, close: this.close, type: type, diff --git a/src/client/scripts/check-word-mute.ts b/packages/client/src/scripts/check-word-mute.ts index 3b1fa75b1e..3b1fa75b1e 100644 --- a/src/client/scripts/check-word-mute.ts +++ b/packages/client/src/scripts/check-word-mute.ts diff --git a/src/client/scripts/collect-page-vars.ts b/packages/client/src/scripts/collect-page-vars.ts index a4096fb2c2..a4096fb2c2 100644 --- a/src/client/scripts/collect-page-vars.ts +++ b/packages/client/src/scripts/collect-page-vars.ts diff --git a/src/client/scripts/contains.ts b/packages/client/src/scripts/contains.ts index 770bda63bb..770bda63bb 100644 --- a/src/client/scripts/contains.ts +++ b/packages/client/src/scripts/contains.ts diff --git a/src/client/scripts/copy-to-clipboard.ts b/packages/client/src/scripts/copy-to-clipboard.ts index ab13cab970..ab13cab970 100644 --- a/src/client/scripts/copy-to-clipboard.ts +++ b/packages/client/src/scripts/copy-to-clipboard.ts diff --git a/src/client/scripts/extract-avg-color-from-blurhash.ts b/packages/client/src/scripts/extract-avg-color-from-blurhash.ts index 123ab7a06d..123ab7a06d 100644 --- a/src/client/scripts/extract-avg-color-from-blurhash.ts +++ b/packages/client/src/scripts/extract-avg-color-from-blurhash.ts diff --git a/src/client/scripts/focus.ts b/packages/client/src/scripts/focus.ts index 0894877820..0894877820 100644 --- a/src/client/scripts/focus.ts +++ b/packages/client/src/scripts/focus.ts diff --git a/src/client/scripts/form.ts b/packages/client/src/scripts/form.ts index 7bf6cec452..7bf6cec452 100644 --- a/src/client/scripts/form.ts +++ b/packages/client/src/scripts/form.ts diff --git a/src/client/scripts/gen-search-query.ts b/packages/client/src/scripts/gen-search-query.ts index cafb3cccfe..57a06c280c 100644 --- a/src/client/scripts/gen-search-query.ts +++ b/packages/client/src/scripts/gen-search-query.ts @@ -1,5 +1,5 @@ -import { parseAcct } from '@/misc/acct'; -import { host as localHost } from '@client/config'; +import * as Acct from 'misskey-js/built/acct'; +import { host as localHost } from '@/config'; export async function genSearchQuery(v: any, q: string) { let host: string; @@ -13,7 +13,7 @@ export async function genSearchQuery(v: any, q: string) { host = at; } } else { - const user = await v.os.api('users/show', parseAcct(at)).catch(x => null); + const user = await v.os.api('users/show', Acct.parse(at)).catch(x => null); if (user) { userId = user.id; } else { diff --git a/src/client/scripts/get-account-from-id.ts b/packages/client/src/scripts/get-account-from-id.ts index 065b41118c..ba3adceecc 100644 --- a/src/client/scripts/get-account-from-id.ts +++ b/packages/client/src/scripts/get-account-from-id.ts @@ -1,4 +1,4 @@ -import { get } from '@client/scripts/idb-proxy'; +import { get } from '@/scripts/idb-proxy'; export async function getAccountFromId(id: string) { const accounts = await get('accounts') as { token: string; id: string; }[]; diff --git a/src/client/scripts/get-md5.ts b/packages/client/src/scripts/get-md5.ts index b002d762b1..b002d762b1 100644 --- a/src/client/scripts/get-md5.ts +++ b/packages/client/src/scripts/get-md5.ts diff --git a/src/client/scripts/get-static-image-url.ts b/packages/client/src/scripts/get-static-image-url.ts index 92c31914c7..e9a3e87cc8 100644 --- a/src/client/scripts/get-static-image-url.ts +++ b/packages/client/src/scripts/get-static-image-url.ts @@ -1,5 +1,5 @@ -import { url as instanceUrl } from '@client/config'; -import * as url from '../../prelude/url'; +import { url as instanceUrl } from '@/config'; +import * as url from '@/scripts/url'; export function getStaticImageUrl(baseUrl: string): string { const u = new URL(baseUrl); diff --git a/src/client/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index 3689a93b47..8d767afa25 100644 --- a/src/client/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -1,11 +1,11 @@ -import { i18n } from '@client/i18n'; -import copyToClipboard from '@client/scripts/copy-to-clipboard'; -import { host } from '@client/config'; -import { getAcct } from '@/misc/acct'; -import * as os from '@client/os'; -import { userActions } from '@client/store'; -import { router } from '@client/router'; -import { $i } from '@client/account'; +import { i18n } from '@/i18n'; +import copyToClipboard from '@/scripts/copy-to-clipboard'; +import { host } from '@/config'; +import * as Acct from 'misskey-js/built/acct'; +import * as os from '@/os'; +import { userActions } from '@/store'; +import { router } from '@/router'; +import { $i } from '@/account'; export function getUserMenu(user) { const meId = $i ? $i.id : null; @@ -102,7 +102,7 @@ export function getUserMenu(user) { } function reportAbuse() { - os.popup(import('@client/components/abuse-report-window.vue'), { + os.popup(import('@/components/abuse-report-window.vue'), { user: user, }, {}, 'closed'); } @@ -140,7 +140,7 @@ export function getUserMenu(user) { type: 'link', icon: 'fas fa-comments', text: i18n.locale.startMessaging, - to: '/my/messaging/' + getAcct(user), + to: '/my/messaging/' + Acct.toString(user), } : undefined, null, { icon: 'fas fa-list-ul', text: i18n.locale.addToList, diff --git a/src/client/scripts/hotkey.ts b/packages/client/src/scripts/hotkey.ts index 2b3f491fd8..2b3f491fd8 100644 --- a/src/client/scripts/hotkey.ts +++ b/packages/client/src/scripts/hotkey.ts diff --git a/src/client/scripts/hpml/block.ts b/packages/client/src/scripts/hpml/block.ts index 804c5c1124..804c5c1124 100644 --- a/src/client/scripts/hpml/block.ts +++ b/packages/client/src/scripts/hpml/block.ts diff --git a/src/client/scripts/hpml/evaluator.ts b/packages/client/src/scripts/hpml/evaluator.ts index 68d140ff50..20261d333d 100644 --- a/src/client/scripts/hpml/evaluator.ts +++ b/packages/client/src/scripts/hpml/evaluator.ts @@ -1,11 +1,11 @@ import autobind from 'autobind-decorator'; import { PageVar, envVarsDef, Fn, HpmlScope, HpmlError } from '.'; -import { version } from '@client/config'; +import { version } from '@/config'; import { AiScript, utils, values } from '@syuilo/aiscript'; import { createAiScriptEnv } from '../aiscript/api'; import { collectPageVars } from '../collect-page-vars'; import { initHpmlLib, initAiLib } from './lib'; -import * as os from '@client/os'; +import * as os from '@/os'; import { markRaw, ref, Ref, unref } from 'vue'; import { Expr, isLiteralValue, Variable } from './expr'; diff --git a/src/client/scripts/hpml/expr.ts b/packages/client/src/scripts/hpml/expr.ts index 00e3ed118b..00e3ed118b 100644 --- a/src/client/scripts/hpml/expr.ts +++ b/packages/client/src/scripts/hpml/expr.ts diff --git a/src/client/scripts/hpml/index.ts b/packages/client/src/scripts/hpml/index.ts index ac81eac2d9..ac81eac2d9 100644 --- a/src/client/scripts/hpml/index.ts +++ b/packages/client/src/scripts/hpml/index.ts diff --git a/src/client/scripts/hpml/lib.ts b/packages/client/src/scripts/hpml/lib.ts index 2a1ac73a40..2a1ac73a40 100644 --- a/src/client/scripts/hpml/lib.ts +++ b/packages/client/src/scripts/hpml/lib.ts diff --git a/src/client/scripts/hpml/type-checker.ts b/packages/client/src/scripts/hpml/type-checker.ts index 9633b3cd01..9633b3cd01 100644 --- a/src/client/scripts/hpml/type-checker.ts +++ b/packages/client/src/scripts/hpml/type-checker.ts diff --git a/src/client/scripts/idb-proxy.ts b/packages/client/src/scripts/idb-proxy.ts index 5f76ae30bb..5f76ae30bb 100644 --- a/src/client/scripts/idb-proxy.ts +++ b/packages/client/src/scripts/idb-proxy.ts diff --git a/src/client/scripts/initialize-sw.ts b/packages/client/src/scripts/initialize-sw.ts index 6f1874572a..d6dbd5dbd4 100644 --- a/src/client/scripts/initialize-sw.ts +++ b/packages/client/src/scripts/initialize-sw.ts @@ -1,7 +1,7 @@ -import { instance } from '@client/instance'; -import { $i } from '@client/account'; -import { api } from '@client/os'; -import { lang } from '@client/config'; +import { instance } from '@/instance'; +import { $i } from '@/account'; +import { api } from '@/os'; +import { lang } from '@/config'; export async function initializeSw() { if (instance.swPublickey && diff --git a/src/client/scripts/is-device-darkmode.ts b/packages/client/src/scripts/is-device-darkmode.ts index 854f38e517..854f38e517 100644 --- a/src/client/scripts/is-device-darkmode.ts +++ b/packages/client/src/scripts/is-device-darkmode.ts diff --git a/src/client/scripts/is-device-touch.ts b/packages/client/src/scripts/is-device-touch.ts index 3f0bfefed2..3f0bfefed2 100644 --- a/src/client/scripts/is-device-touch.ts +++ b/packages/client/src/scripts/is-device-touch.ts diff --git a/src/client/scripts/is-mobile.ts b/packages/client/src/scripts/is-mobile.ts index 60cb59f91e..60cb59f91e 100644 --- a/src/client/scripts/is-mobile.ts +++ b/packages/client/src/scripts/is-mobile.ts diff --git a/src/client/scripts/keycode.ts b/packages/client/src/scripts/keycode.ts index c127d54bb2..c127d54bb2 100644 --- a/src/client/scripts/keycode.ts +++ b/packages/client/src/scripts/keycode.ts diff --git a/src/client/scripts/loading.ts b/packages/client/src/scripts/loading.ts index 4b0a560e34..4b0a560e34 100644 --- a/src/client/scripts/loading.ts +++ b/packages/client/src/scripts/loading.ts diff --git a/src/client/scripts/login-id.ts b/packages/client/src/scripts/login-id.ts index 0f9c6be4a9..0f9c6be4a9 100644 --- a/src/client/scripts/login-id.ts +++ b/packages/client/src/scripts/login-id.ts diff --git a/src/client/scripts/lookup-user.ts b/packages/client/src/scripts/lookup-user.ts index c393472ae8..174fa9f879 100644 --- a/src/client/scripts/lookup-user.ts +++ b/packages/client/src/scripts/lookup-user.ts @@ -1,6 +1,6 @@ -import { parseAcct } from '@/misc/acct'; -import { i18n } from '@client/i18n'; -import * as os from '@client/os'; +import * as Acct from 'misskey-js/built/acct'; +import { i18n } from '@/i18n'; +import * as os from '@/os'; export async function lookupUser() { const { canceled, result } = await os.dialog({ @@ -13,7 +13,7 @@ export async function lookupUser() { os.pageWindow(`/user-info/${user.id}`); }; - const usernamePromise = os.api('users/show', parseAcct(result)); + const usernamePromise = os.api('users/show', Acct.parse(result)); const idPromise = os.api('users/show', { userId: result }); let _notFound = false; const notFound = () => { diff --git a/src/client/scripts/paging.ts b/packages/client/src/scripts/paging.ts index 1da518efa1..ef63ecc450 100644 --- a/src/client/scripts/paging.ts +++ b/packages/client/src/scripts/paging.ts @@ -1,5 +1,5 @@ import { markRaw } from 'vue'; -import * as os from '@client/os'; +import * as os from '@/os'; import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from './scroll'; const SECOND_FETCH_LIMIT = 30; diff --git a/src/client/scripts/physics.ts b/packages/client/src/scripts/physics.ts index 445b6296eb..445b6296eb 100644 --- a/src/client/scripts/physics.ts +++ b/packages/client/src/scripts/physics.ts diff --git a/src/client/scripts/please-login.ts b/packages/client/src/scripts/please-login.ts index a584e9fa96..928f6ec0f4 100644 --- a/src/client/scripts/please-login.ts +++ b/packages/client/src/scripts/please-login.ts @@ -1,6 +1,6 @@ -import { $i } from '@client/account'; -import { i18n } from '@client/i18n'; -import { dialog } from '@client/os'; +import { $i } from '@/account'; +import { i18n } from '@/i18n'; +import { dialog } from '@/os'; export function pleaseLogin() { if ($i) return; diff --git a/src/client/scripts/popout.ts b/packages/client/src/scripts/popout.ts index 6d92af4a05..51b8d72868 100644 --- a/src/client/scripts/popout.ts +++ b/packages/client/src/scripts/popout.ts @@ -1,4 +1,4 @@ -import * as config from '@client/config'; +import * as config from '@/config'; export function popout(path: string, w?: HTMLElement) { let url = path.startsWith('http://') || path.startsWith('https://') ? path : config.url + path; diff --git a/src/client/scripts/reaction-picker.ts b/packages/client/src/scripts/reaction-picker.ts index 38699c0979..e923326ece 100644 --- a/src/client/scripts/reaction-picker.ts +++ b/packages/client/src/scripts/reaction-picker.ts @@ -1,5 +1,5 @@ import { Ref, ref } from 'vue'; -import { popup } from '@client/os'; +import { popup } from '@/os'; class ReactionPicker { private src: Ref<HTMLElement | null> = ref(null); @@ -12,7 +12,7 @@ class ReactionPicker { } public async init() { - await popup(import('@client/components/emoji-picker-dialog.vue'), { + await popup(import('@/components/emoji-picker-dialog.vue'), { src: this.src, asReactionPicker: true, manualShowing: this.manualShowing diff --git a/src/client/scripts/room/furniture.ts b/packages/client/src/scripts/room/furniture.ts index 7734e32668..7734e32668 100644 --- a/src/client/scripts/room/furniture.ts +++ b/packages/client/src/scripts/room/furniture.ts diff --git a/src/client/scripts/room/furnitures.json5 b/packages/client/src/scripts/room/furnitures.json5 index 4a40994107..4a40994107 100644 --- a/src/client/scripts/room/furnitures.json5 +++ b/packages/client/src/scripts/room/furnitures.json5 diff --git a/src/client/scripts/room/room.ts b/packages/client/src/scripts/room/room.ts index 4450210c6c..7e04bec646 100644 --- a/src/client/scripts/room/room.ts +++ b/packages/client/src/scripts/room/room.ts @@ -10,7 +10,7 @@ import { BloomPass } from 'three/examples/jsm/postprocessing/BloomPass.js'; import { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'; import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js'; import { Furniture, RoomInfo } from './furniture'; -import { query as urlQuery } from '../../../prelude/url'; +import { query as urlQuery } from '@/scripts/url'; const furnitureDefs = require('./furnitures.json5'); THREE.ImageUtils.crossOrigin = ''; @@ -340,7 +340,7 @@ export class Room { @autobind private loadRoom() { const type = this.roomInfo.roomType; - new GLTFLoader().load(`/static-assets/client/room/rooms/${type}/${type}.glb`, gltf => { + new GLTFLoader().load(`/client-assets/room/rooms/${type}/${type}.glb`, gltf => { gltf.scene.traverse(child => { if (!(child instanceof THREE.Mesh)) return; @@ -375,7 +375,7 @@ export class Room { const def = furnitureDefs.find(d => d.id === furniture.type); return new Promise<GLTF>((res, rej) => { const loader = new GLTFLoader(); - loader.load(`/static-assets/client/room/furnitures/${furniture.type}/${furniture.type}.glb`, gltf => { + loader.load(`/client-assets/room/furnitures/${furniture.type}/${furniture.type}.glb`, gltf => { const model = gltf.scene; // Load animation diff --git a/src/client/scripts/scroll.ts b/packages/client/src/scripts/scroll.ts index 621fe88105..621fe88105 100644 --- a/src/client/scripts/scroll.ts +++ b/packages/client/src/scripts/scroll.ts diff --git a/src/client/scripts/search.ts b/packages/client/src/scripts/search.ts index 2221f5f279..b28cccfab7 100644 --- a/src/client/scripts/search.ts +++ b/packages/client/src/scripts/search.ts @@ -1,6 +1,6 @@ -import * as os from '@client/os'; -import { i18n } from '@client/i18n'; -import { router } from '@client/router'; +import * as os from '@/os'; +import { i18n } from '@/i18n'; +import { router } from '@/router'; export async function search() { const { canceled, result: query } = await os.dialog({ diff --git a/src/client/scripts/select-file.ts b/packages/client/src/scripts/select-file.ts index f7b971e113..5fbc545b26 100644 --- a/src/client/scripts/select-file.ts +++ b/packages/client/src/scripts/select-file.ts @@ -1,6 +1,6 @@ -import * as os from '@client/os'; -import { i18n } from '@client/i18n'; -import { defaultStore } from '@client/store'; +import * as os from '@/os'; +import { i18n } from '@/i18n'; +import { defaultStore } from '@/store'; export function selectFile(src: any, label: string | null, multiple = false) { return new Promise((res, rej) => { diff --git a/src/client/scripts/show-suspended-dialog.ts b/packages/client/src/scripts/show-suspended-dialog.ts index dde829cdae..3bc4800030 100644 --- a/src/client/scripts/show-suspended-dialog.ts +++ b/packages/client/src/scripts/show-suspended-dialog.ts @@ -1,5 +1,5 @@ -import * as os from '@client/os'; -import { i18n } from '@client/i18n'; +import * as os from '@/os'; +import { i18n } from '@/i18n'; export function showSuspendedDialog() { return os.dialog({ diff --git a/src/client/scripts/sound.ts b/packages/client/src/scripts/sound.ts index c51fa8f215..2b8279b3df 100644 --- a/src/client/scripts/sound.ts +++ b/packages/client/src/scripts/sound.ts @@ -1,4 +1,4 @@ -import { ColdDeviceStorage } from '@client/store'; +import { ColdDeviceStorage } from '@/store'; const cache = new Map<string, HTMLAudioElement>(); @@ -7,7 +7,7 @@ export function getAudio(file: string, useCache = true): HTMLAudioElement { if (useCache && cache.has(file)) { audio = cache.get(file); } else { - audio = new Audio(`/static-assets/client/sounds/${file}.mp3`); + audio = new Audio(`/client-assets/sounds/${file}.mp3`); if (useCache) cache.set(file, audio); } return audio; diff --git a/src/client/scripts/sticky-sidebar.ts b/packages/client/src/scripts/sticky-sidebar.ts index c67b8f37ac..c67b8f37ac 100644 --- a/src/client/scripts/sticky-sidebar.ts +++ b/packages/client/src/scripts/sticky-sidebar.ts diff --git a/src/client/scripts/theme-editor.ts b/packages/client/src/scripts/theme-editor.ts index 3d69d2836a..3d69d2836a 100644 --- a/src/client/scripts/theme-editor.ts +++ b/packages/client/src/scripts/theme-editor.ts diff --git a/src/client/scripts/theme.ts b/packages/client/src/scripts/theme.ts index 8b63821293..3b7f003d0f 100644 --- a/src/client/scripts/theme.ts +++ b/packages/client/src/scripts/theme.ts @@ -1,4 +1,4 @@ -import { globalEvents } from '@client/events'; +import { globalEvents } from '@/events'; import * as tinycolor from 'tinycolor2'; export type Theme = { @@ -10,25 +10,25 @@ export type Theme = { props: Record<string, string>; }; -export const lightTheme: Theme = require('@client/themes/_light.json5'); -export const darkTheme: Theme = require('@client/themes/_dark.json5'); +export const lightTheme: Theme = require('@/themes/_light.json5'); +export const darkTheme: Theme = require('@/themes/_dark.json5'); export const themeProps = Object.keys(lightTheme.props).filter(key => !key.startsWith('X')); export const builtinThemes = [ - require('@client/themes/l-light.json5'), - require('@client/themes/l-apricot.json5'), - require('@client/themes/l-rainy.json5'), - require('@client/themes/l-vivid.json5'), - require('@client/themes/l-sushi.json5'), + require('@/themes/l-light.json5'), + require('@/themes/l-apricot.json5'), + require('@/themes/l-rainy.json5'), + require('@/themes/l-vivid.json5'), + require('@/themes/l-sushi.json5'), - require('@client/themes/d-dark.json5'), - require('@client/themes/d-persimmon.json5'), - require('@client/themes/d-astro.json5'), - require('@client/themes/d-future.json5'), - require('@client/themes/d-botanical.json5'), - require('@client/themes/d-pumpkin.json5'), - require('@client/themes/d-black.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-pumpkin.json5'), + require('@/themes/d-black.json5'), ] as Theme[]; let timeout = null; diff --git a/src/client/scripts/unison-reload.ts b/packages/client/src/scripts/unison-reload.ts index 59af584c1b..59af584c1b 100644 --- a/src/client/scripts/unison-reload.ts +++ b/packages/client/src/scripts/unison-reload.ts |