From 350ebbadba3b1ce2f1f5b082fc62160ce8a72cad Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 18 Sep 2023 11:42:26 +0900 Subject: [PATCH 01/23] fix(frontend): prevent layout-shift of reactions viewer Fix #11842 --- packages/frontend/src/components/MkReactionsViewer.reaction.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 7da5790122..4349b7999e 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -158,7 +158,7 @@ useTooltip(buttonEl, async (showing) => { &.reacted, &.reacted:hover { background: var(--accentedBg); color: var(--accent); - border: 1px solid var(--accent); + box-shadow: 0 0 0px 1px var(--accent) inset; > .count { color: var(--accent); From 25ae4bca9cfc06828a83d3891d0c215c70032201 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 18 Sep 2023 13:25:49 +0900 Subject: [PATCH 02/23] tab --- .../frontend/src/components/MkReactionsViewer.reaction.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 4349b7999e..7e2fbb1619 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -156,9 +156,9 @@ useTooltip(buttonEl, async (showing) => { } &.reacted, &.reacted:hover { - background: var(--accentedBg); - color: var(--accent); - box-shadow: 0 0 0px 1px var(--accent) inset; + background: var(--accentedBg); + color: var(--accent); + box-shadow: 0 0 0px 1px var(--accent) inset; > .count { color: var(--accent); From aa80cfdb81061301c45ca22e045bcbcd8116f93b Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 18 Sep 2023 13:26:43 +0900 Subject: [PATCH 03/23] Update .eslintrc.js --- packages/shared/.eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index a02de4945a..89d1151683 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -71,7 +71,7 @@ module.exports = { '@typescript-eslint/no-inferrable-types': ['warn'], '@typescript-eslint/no-empty-function': ['off'], '@typescript-eslint/no-non-null-assertion': ['warn'], - '@typescript-eslint/explicit-function-return-type': ['warn'], + '@typescript-eslint/explicit-function-return-type': ['off'], '@typescript-eslint/no-misused-promises': ['error', { 'checksVoidReturn': false, }], From 44985ae8588a96968c1e6856083216b3d75b4c18 Mon Sep 17 00:00:00 2001 From: FineArchs <133759614+FineArchs@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:23:33 +0900 Subject: [PATCH 04/23] =?UTF-8?q?feat:=20Mk:api=E3=81=8C=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E6=99=82=E3=82=A8=E3=83=A9=E3=83=BC=E5=9E=8B=E3=81=AE=E5=80=A4?= =?UTF-8?q?=E3=82=92=E8=BF=94=E3=81=99=E3=82=88=E3=81=86=E3=81=AB=20(#2)?= =?UTF-8?q?=20(#11843)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Mk:apiが失敗時エラー型の値を返すように (#2) * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/frontend/src/scripts/aiscript/api.ts | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbcbdf58da..56c2552145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ - Playの操作を行うAPI TokenをAPIコンソールから発行できるように - リアクションの表示サイズをより大きくできるように - AiScriptを0.16.0に更新 +- Mk:apiが失敗した時にエラー型の値(AiScript 0.16.0で追加)を返すように - タイムラインでリスト/アンテナ選択時のパフォーマンスを改善 - 「Moderation note」、「Add moderation note」をローカライズできるように - 新しい実績を追加 diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts index c3acb6d145..dcb4a9105c 100644 --- a/packages/frontend/src/scripts/aiscript/api.ts +++ b/packages/frontend/src/scripts/aiscript/api.ts @@ -39,8 +39,11 @@ export function createAiScriptEnv(opts) { // バグがあればundefinedもあり得るため念のため if (typeof token.value !== 'string') throw new Error('invalid token'); } - const res = await os.api(ep.value, utils.valToJs(param), token ? token.value : (opts.token ?? null)); - return utils.jsToVal(res); + return os.api(ep.value, utils.valToJs(param), token ? token.value : (opts.token ?? null)).then(res => { + return utils.jsToVal(res); + }, err => { + return values.ERROR('request_failed', utils.jsToVal(err)); + }); }), 'Mk:save': values.FN_NATIVE(([key, value]) => { utils.assertString(key); From 5c48878dc558ff873e1633b9ad7abd3bee6b2fcb Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 19 Sep 2023 09:36:07 +0900 Subject: [PATCH 05/23] =?UTF-8?q?enhance(dev):=20=E9=96=A2=E6=95=B0?= =?UTF-8?q?=E5=91=BC=E3=81=B3=E5=87=BA=E3=81=97=E3=81=AE=E5=89=8D=E3=81=AB?= =?UTF-8?q?=E3=82=B9=E3=83=9A=E3=83=BC=E3=82=B9=E3=82=92=E5=85=A5=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=81=93=E3=81=A8=E3=82=92=E8=A8=B1=E5=8F=AF=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/pages/timeline.vue | 2 +- packages/shared/.eslintrc.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index f0ef2d10a1..307d77882b 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -58,7 +58,7 @@ let queue = $ref(0); let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global'); const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) }); -watch ($$(src), () => queue = 0); +watch($$(src), () => queue = 0); function queueUpdated(q: number): void { queue = q; diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index 89d1151683..cb6bd56f9c 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -64,6 +64,7 @@ module.exports = { 'object-curly-spacing': ['error', 'always'], 'space-infix-ops': ['error'], 'space-before-blocks': ['error', 'always'], + 'func-call-spacing': ['error', 'never'], '@typescript-eslint/no-explicit-any': ['warn'], '@typescript-eslint/no-unused-vars': ['warn'], '@typescript-eslint/no-unnecessary-condition': ['warn'], From bec338aa006719d6ef004b5b351eebdf47a62b50 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 19 Sep 2023 09:44:05 +0900 Subject: [PATCH 06/23] Update .eslintrc.js --- packages/shared/.eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index cb6bd56f9c..1ecad7ab75 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -64,7 +64,7 @@ module.exports = { 'object-curly-spacing': ['error', 'always'], 'space-infix-ops': ['error'], 'space-before-blocks': ['error', 'always'], - 'func-call-spacing': ['error', 'never'], + '@typescript-eslint/func-call-spacing': ['error', 'never'], '@typescript-eslint/no-explicit-any': ['warn'], '@typescript-eslint/no-unused-vars': ['warn'], '@typescript-eslint/no-unnecessary-condition': ['warn'], From 299c9c41188df46b64b04ba53cbded7a89998b6c Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 19 Sep 2023 10:58:42 +0900 Subject: [PATCH 07/23] =?UTF-8?q?feat(frontend):=20=E4=BB=BB=E6=84=8F?= =?UTF-8?q?=E3=81=AE=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E3=83=AA=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E3=82=BF=E3=82=A4=E3=83=A0=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E3=83=94=E3=83=B3?= =?UTF-8?q?=E7=95=99=E3=82=81=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + .../frontend/src/pages/settings/general.vue | 23 +++++++++++++++++++ packages/frontend/src/pages/timeline.vue | 19 +++++++++++---- packages/frontend/src/store.ts | 10 +++++--- 6 files changed, 49 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56c2552145..683c0a85a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ - ローカリゼーションの更新 ### Client +- 任意のユーザーリストをタイムラインページにピン留めできるように + - 設定->クライアント設定->全般 から設定可能です - ノート詳細ページを改修 - 読み込み時のパフォーマンスが向上しました - リノート一覧、リアクション一覧がタブとして追加されました diff --git a/locales/index.d.ts b/locales/index.d.ts index ac714258e2..bf7aff75df 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1114,6 +1114,7 @@ export interface Locale { "renotes": string; "loadReplies": string; "loadConversation": string; + "pinnedList": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d97b09f63c..2f88128c98 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1111,6 +1111,7 @@ replies: "返信" renotes: "リノート" loadReplies: "返信を見る" loadConversation: "会話を見る" +pinnedList: "ピン留めされたリスト" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index b486e6d80f..ff498e4164 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -30,6 +30,12 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.showFixedPostForm }} {{ i18n.ts.showFixedPostFormInChannel }} {{ i18n.ts.flagShowTimelineReplies }} + + + + {{ i18n.ts.add }} + {{ i18n.ts.remove }} + @@ -307,6 +313,23 @@ function removeEmojiIndex(lang: string) { os.promiseDialog(main()); } +async function setPinnedList() { + const lists = await os.api('users/lists/list'); + const { canceled, result: list } = await os.select({ + title: i18n.ts.selectList, + items: lists.map(x => ({ + value: x, text: x.name, + })), + }); + if (canceled) return; + + defaultStore.set('pinnedUserLists', [list]); +} + +function removePinnedList() { + defaultStore.set('pinnedUserLists', []); +} + let smashCount = 0; let smashTimer: number | null = null; function testNotification(): void { diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 307d77882b..c0b1f03ff0 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -16,7 +16,8 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -102,10 +103,15 @@ async function chooseChannel(ev: MouseEvent): Promise { os.popupMenu(items, ev.currentTarget ?? ev.target); } -function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global'): void { +function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | `list:${string}`): void { + let userList = null; + if (newSrc.startsWith('userList:')) { + const id = newSrc.substring('userList:'.length); + userList = defaultStore.reactiveState.pinnedUserLists.value.find(l => l.id === id); + } defaultStore.set('tl', { - ...defaultStore.state.tl, src: newSrc, + userList, }); srcWhenNotSignin = newSrc; } @@ -125,7 +131,12 @@ function focus(): void { const headerActions = $computed(() => []); -const headerTabs = $computed(() => [{ +const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({ + key: 'list:' + l.id, + title: l.name, + icon: 'ti ti-star', + iconOnly: true, +}))), { key: 'home', title: i18n.ts._timelines.home, icon: 'ti ti-home', diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 787a584f83..4b8001bfb4 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -4,7 +4,7 @@ */ import { markRaw, ref } from 'vue'; -import misskey from 'misskey-js'; +import * as Misskey from 'misskey-js'; import { Storage } from './pizzax'; interface PostFormAction { @@ -163,10 +163,14 @@ export const defaultStore = markRaw(new Storage('base', { tl: { where: 'deviceAccount', default: { - src: 'home' as 'home' | 'local' | 'social' | 'global', - arg: null, + src: 'home' as 'home' | 'local' | 'social' | 'global' | `list:${string}`, + userList: null as Misskey.entities.UserList | null, }, }, + pinnedUserLists: { + where: 'deviceAccount', + default: [] as Misskey.entities.UserList[], + }, overridedDeviceKind: { where: 'device', From b0f6c44f36f3173f5d232d1adb02fc09dfdcc003 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 19 Sep 2023 16:37:43 +0900 Subject: [PATCH 08/23] refactor(frontend): use ESM --- packages/frontend/@types/theme.d.ts | 2 +- packages/frontend/package.json | 1 + packages/frontend/src/_boot_.ts | 4 +- packages/frontend/src/account.ts | 16 ++++---- packages/frontend/src/boot/common.ts | 40 +++++++++---------- packages/frontend/src/boot/main-boot.ts | 30 +++++++------- packages/frontend/src/boot/sub-boot.ts | 2 +- packages/frontend/src/cache.ts | 4 +- .../frontend/src/components/MkAbuseReport.vue | 6 +-- .../src/components/MkAbuseReportWindow.vue | 4 +- .../src/components/MkAccountMoved.vue | 6 +-- .../components/MkAchievements.stories.impl.ts | 2 +- .../src/components/MkAchievements.vue | 6 +-- .../src/components/MkAnnouncementDialog.vue | 6 +-- packages/frontend/src/components/MkAsUi.vue | 4 +- .../components/MkAutocomplete.stories.impl.ts | 2 +- .../src/components/MkAutocomplete.vue | 20 +++++----- .../frontend/src/components/MkAvatars.vue | 2 +- .../frontend/src/components/MkCaptcha.vue | 4 +- .../src/components/MkChannelFollowButton.vue | 4 +- .../frontend/src/components/MkChannelList.vue | 4 +- .../src/components/MkChannelPreview.vue | 2 +- packages/frontend/src/components/MkChart.vue | 16 ++++---- .../frontend/src/components/MkClickerGame.vue | 10 ++--- .../frontend/src/components/MkClipPreview.vue | 2 +- .../frontend/src/components/MkColorInput.vue | 2 +- .../frontend/src/components/MkContainer.vue | 4 +- .../frontend/src/components/MkContextMenu.vue | 6 +-- .../src/components/MkCropperDialog.vue | 12 +++--- .../frontend/src/components/MkCwButton.vue | 4 +- .../src/components/MkDateSeparatedList.vue | 6 +-- packages/frontend/src/components/MkDialog.vue | 2 +- .../frontend/src/components/MkDonation.vue | 10 ++--- .../frontend/src/components/MkDrive.file.vue | 10 ++--- .../src/components/MkDrive.folder.vue | 10 ++--- .../src/components/MkDrive.navFolder.vue | 4 +- packages/frontend/src/components/MkDrive.vue | 12 +++--- .../src/components/MkDriveSelectDialog.vue | 4 +- .../frontend/src/components/MkDriveWindow.vue | 2 +- .../src/components/MkEmojiPicker.section.vue | 2 +- .../frontend/src/components/MkEmojiPicker.vue | 16 ++++---- .../src/components/MkEmojiPickerDialog.vue | 2 +- .../src/components/MkFeaturedPhotos.vue | 2 +- .../components/MkFileCaptionEditWindow.vue | 2 +- .../src/components/MkFileListForAdmin.vue | 6 +-- .../src/components/MkFlashPreview.vue | 2 +- .../src/components/MkFoldableSection.vue | 4 +- packages/frontend/src/components/MkFolder.vue | 2 +- .../src/components/MkFollowButton.vue | 10 ++--- .../src/components/MkForgotPassword.vue | 6 +-- .../frontend/src/components/MkFormDialog.vue | 2 +- .../src/components/MkGalleryPostPreview.vue | 2 +- packages/frontend/src/components/MkGoogle.vue | 2 +- .../frontend/src/components/MkHeatmap.vue | 10 ++--- .../src/components/MkImgWithBlurhash.vue | 6 +-- packages/frontend/src/components/MkInput.vue | 4 +- .../src/components/MkInstanceCardMini.vue | 4 +- .../src/components/MkInstanceStats.vue | 8 ++-- .../src/components/MkInstanceTicker.vue | 6 +-- .../frontend/src/components/MkInviteCode.vue | 6 +-- .../frontend/src/components/MkKeyValue.vue | 6 +-- .../frontend/src/components/MkLaunchPad.vue | 4 +- packages/frontend/src/components/MkLink.vue | 6 +-- .../frontend/src/components/MkMediaBanner.vue | 4 +- .../frontend/src/components/MkMediaImage.vue | 12 +++--- .../frontend/src/components/MkMediaList.vue | 6 +-- .../frontend/src/components/MkMediaVideo.vue | 6 +-- .../frontend/src/components/MkMention.vue | 6 +-- packages/frontend/src/components/MkMenu.vue | 8 ++-- .../frontend/src/components/MkMiniChart.vue | 2 +- packages/frontend/src/components/MkModal.vue | 8 ++-- packages/frontend/src/components/MkNote.vue | 36 ++++++++--------- .../src/components/MkNoteDetailed.vue | 32 +++++++-------- .../frontend/src/components/MkNoteHeader.vue | 6 +-- .../frontend/src/components/MkNotePreview.vue | 2 +- .../frontend/src/components/MkNoteSimple.vue | 2 +- .../frontend/src/components/MkNoteSub.vue | 8 ++-- packages/frontend/src/components/MkNotes.vue | 4 +- .../src/components/MkNotification.vue | 16 ++++---- .../MkNotificationSettingWindow.vue | 2 +- .../src/components/MkNotifications.vue | 8 ++-- packages/frontend/src/components/MkNumber.vue | 2 +- .../frontend/src/components/MkNumberDiff.vue | 2 +- .../src/components/MkObjectView.value.vue | 2 +- packages/frontend/src/components/MkOmit.vue | 2 +- .../frontend/src/components/MkPagePreview.vue | 2 +- .../frontend/src/components/MkPageWindow.vue | 20 +++++----- .../frontend/src/components/MkPagination.vue | 12 +++--- .../src/components/MkPlusOneEffect.vue | 2 +- packages/frontend/src/components/MkPoll.vue | 10 ++--- .../frontend/src/components/MkPollEditor.vue | 6 +-- .../frontend/src/components/MkPostForm.vue | 30 +++++++------- .../src/components/MkPostFormAttaches.vue | 4 +- .../MkPushNotificationAllowButton.vue | 8 ++-- packages/frontend/src/components/MkRange.vue | 2 +- .../src/components/MkReactionEffect.vue | 2 +- .../components/MkReactionsViewer.details.vue | 2 +- .../components/MkReactionsViewer.reaction.vue | 12 +++--- .../src/components/MkReactionsViewer.vue | 2 +- .../src/components/MkRemoteCaution.vue | 2 +- .../src/components/MkRetentionHeatmap.vue | 10 ++--- .../src/components/MkRetentionLineChart.vue | 12 +++--- .../src/components/MkRippleEffect.vue | 2 +- .../frontend/src/components/MkRolePreview.vue | 2 +- packages/frontend/src/components/MkSelect.vue | 6 +-- packages/frontend/src/components/MkSignin.vue | 10 ++--- .../src/components/MkSigninDialog.vue | 2 +- .../src/components/MkSignupDialog.form.vue | 10 ++--- .../MkSignupDialog.rules.stories.impl.ts | 4 +- .../src/components/MkSignupDialog.rules.vue | 6 +-- .../src/components/MkSignupDialog.vue | 4 +- .../src/components/MkSubNoteContent.vue | 6 +-- .../src/components/MkSwitch.button.vue | 2 +- .../frontend/src/components/MkTextarea.vue | 2 +- .../frontend/src/components/MkTimeline.vue | 8 ++-- packages/frontend/src/components/MkToast.vue | 4 +- .../src/components/MkTokenGenerateWindow.vue | 2 +- .../frontend/src/components/MkTooltip.vue | 6 +-- .../frontend/src/components/MkUpdated.vue | 6 +-- .../frontend/src/components/MkUrlPreview.vue | 12 +++--- .../src/components/MkUrlPreviewPopup.vue | 4 +- .../MkUserAnnouncementEditDialog.vue | 4 +- .../src/components/MkUserCardMini.vue | 4 +- .../frontend/src/components/MkUserInfo.vue | 10 ++--- .../frontend/src/components/MkUserList.vue | 4 +- .../src/components/MkUserOnlineIndicator.vue | 2 +- .../frontend/src/components/MkUserPopup.vue | 16 ++++---- .../src/components/MkUserSelectDialog.vue | 10 ++--- .../components/MkUserSetupDialog.Follow.vue | 8 ++-- .../components/MkUserSetupDialog.Privacy.vue | 8 ++-- .../components/MkUserSetupDialog.Profile.vue | 10 ++--- .../src/components/MkUserSetupDialog.User.vue | 6 +-- .../src/components/MkUserSetupDialog.vue | 10 ++--- .../src/components/MkVisibilityPicker.vue | 2 +- .../MkVisitorDashboard.ActiveUsersChart.vue | 10 ++--- .../src/components/MkVisitorDashboard.vue | 10 ++--- .../frontend/src/components/MkWidgets.vue | 4 +- packages/frontend/src/components/MkWindow.vue | 8 ++-- .../src/components/MkYouTubePlayer.vue | 4 +- .../frontend/src/components/form/suspense.vue | 4 +- .../src/components/global/MkA.stories.impl.ts | 2 +- .../frontend/src/components/global/MkA.vue | 12 +++--- .../frontend/src/components/global/MkAcct.vue | 4 +- .../components/global/MkAd.stories.impl.ts | 2 +- .../frontend/src/components/global/MkAd.vue | 12 +++--- .../src/components/global/MkAvatar.vue | 8 ++-- .../src/components/global/MkCustomEmoji.vue | 6 +-- .../src/components/global/MkEmoji.vue | 6 +-- .../src/components/global/MkError.vue | 6 +-- .../global/MkMisskeyFlavoredMarkdown.ts | 4 +- .../components/global/MkPageHeader.tabs.vue | 2 +- .../src/components/global/MkPageHeader.vue | 6 +-- .../src/components/global/MkSpacer.vue | 2 +- .../components/global/MkTime.stories.impl.ts | 4 +- .../frontend/src/components/global/MkTime.vue | 4 +- .../frontend/src/components/global/MkUrl.vue | 8 ++-- .../src/components/global/RouterView.vue | 2 +- .../src/components/page/page.note.vue | 2 +- .../src/components/page/page.text.vue | 4 +- packages/frontend/src/config.ts | 2 +- packages/frontend/src/custom-emojis.ts | 6 +-- .../frontend/src/directives/click-anime.ts | 2 +- .../frontend/src/directives/follow-append.ts | 2 +- packages/frontend/src/directives/ripple.ts | 2 +- packages/frontend/src/directives/tooltip.ts | 4 +- .../frontend/src/directives/user-preview.ts | 2 +- packages/frontend/src/filters/date.ts | 2 +- packages/frontend/src/filters/number.ts | 2 +- packages/frontend/src/filters/user.ts | 2 +- packages/frontend/src/i18n.ts | 6 +-- packages/frontend/src/instance.ts | 6 +-- packages/frontend/src/navbar.ts | 16 ++++---- packages/frontend/src/nirax.ts | 2 +- packages/frontend/src/os.ts | 10 ++--- packages/frontend/src/pages/_error_.vue | 16 ++++---- packages/frontend/src/pages/about-misskey.vue | 16 ++++---- packages/frontend/src/pages/about.emojis.vue | 6 +-- .../frontend/src/pages/about.federation.vue | 2 +- packages/frontend/src/pages/about.vue | 14 +++---- packages/frontend/src/pages/achievements.vue | 8 ++-- packages/frontend/src/pages/admin-file.vue | 10 ++--- packages/frontend/src/pages/admin-user.vue | 12 +++--- .../src/pages/admin/RolesEditorFormula.vue | 4 +- .../frontend/src/pages/admin/_header_.vue | 6 +-- packages/frontend/src/pages/admin/abuses.vue | 4 +- packages/frontend/src/pages/admin/ads.vue | 6 +-- .../src/pages/admin/announcements.vue | 6 +-- .../src/pages/admin/bot-protection.vue | 6 +-- .../frontend/src/pages/admin/branding.vue | 10 ++--- .../frontend/src/pages/admin/database.vue | 10 ++--- .../src/pages/admin/email-settings.vue | 8 ++-- .../frontend/src/pages/admin/federation.vue | 4 +- packages/frontend/src/pages/admin/files.vue | 6 +-- packages/frontend/src/pages/admin/index.vue | 12 +++--- .../src/pages/admin/instance-block.vue | 8 ++-- packages/frontend/src/pages/admin/invites.vue | 6 +-- .../frontend/src/pages/admin/moderation.vue | 8 ++-- .../src/pages/admin/object-storage.vue | 8 ++-- .../src/pages/admin/other-settings.vue | 8 ++-- .../src/pages/admin/overview.active-users.vue | 10 ++--- .../src/pages/admin/overview.ap-requests.vue | 12 +++--- .../src/pages/admin/overview.federation.vue | 8 ++-- .../src/pages/admin/overview.instances.vue | 6 +-- .../src/pages/admin/overview.moderators.vue | 4 +- .../frontend/src/pages/admin/overview.pie.vue | 4 +- .../src/pages/admin/overview.queue.chart.vue | 10 ++--- .../src/pages/admin/overview.queue.vue | 4 +- .../src/pages/admin/overview.stats.vue | 8 ++-- .../src/pages/admin/overview.users.vue | 6 +-- .../frontend/src/pages/admin/overview.vue | 8 ++-- .../src/pages/admin/proxy-account.vue | 8 ++-- .../src/pages/admin/queue.chart.chart.vue | 10 ++--- .../frontend/src/pages/admin/queue.chart.vue | 8 ++-- packages/frontend/src/pages/admin/queue.vue | 8 ++-- packages/frontend/src/pages/admin/relays.vue | 6 +-- .../frontend/src/pages/admin/roles.edit.vue | 8 ++-- .../frontend/src/pages/admin/roles.editor.vue | 6 +-- .../frontend/src/pages/admin/roles.role.vue | 10 ++--- packages/frontend/src/pages/admin/roles.vue | 10 ++--- .../frontend/src/pages/admin/security.vue | 8 ++-- .../frontend/src/pages/admin/server-rules.vue | 8 ++-- .../frontend/src/pages/admin/settings.vue | 8 ++-- packages/frontend/src/pages/admin/users.vue | 10 ++--- packages/frontend/src/pages/ads.vue | 8 ++-- packages/frontend/src/pages/announcements.vue | 8 ++-- .../frontend/src/pages/antenna-timeline.vue | 10 ++--- packages/frontend/src/pages/api-console.vue | 4 +- packages/frontend/src/pages/auth.form.vue | 4 +- packages/frontend/src/pages/auth.vue | 8 ++-- .../frontend/src/pages/channel-editor.vue | 10 ++--- packages/frontend/src/pages/channel.vue | 16 ++++---- packages/frontend/src/pages/channels.vue | 6 +-- packages/frontend/src/pages/clicker.vue | 2 +- packages/frontend/src/pages/clip.vue | 10 ++--- .../src/pages/custom-emojis-manager.vue | 8 ++-- packages/frontend/src/pages/drive.vue | 4 +- .../frontend/src/pages/emoji-edit-dialog.vue | 8 ++-- packages/frontend/src/pages/emojis.emoji.vue | 6 +-- .../frontend/src/pages/explore.featured.vue | 2 +- packages/frontend/src/pages/explore.roles.vue | 2 +- packages/frontend/src/pages/explore.users.vue | 4 +- packages/frontend/src/pages/explore.vue | 4 +- packages/frontend/src/pages/favorites.vue | 6 +-- .../frontend/src/pages/flash/flash-edit.vue | 8 ++-- .../frontend/src/pages/flash/flash-index.vue | 6 +-- packages/frontend/src/pages/flash/flash.vue | 16 ++++---- .../frontend/src/pages/follow-requests.vue | 10 ++--- packages/frontend/src/pages/follow.vue | 6 +-- packages/frontend/src/pages/gallery/edit.vue | 10 ++--- packages/frontend/src/pages/gallery/index.vue | 6 +-- packages/frontend/src/pages/gallery/post.vue | 14 +++---- packages/frontend/src/pages/instance-info.vue | 14 +++---- packages/frontend/src/pages/invite.vue | 10 ++--- packages/frontend/src/pages/list.vue | 10 ++--- packages/frontend/src/pages/miauth.vue | 8 ++-- .../frontend/src/pages/my-antennas/create.vue | 6 +-- .../frontend/src/pages/my-antennas/edit.vue | 8 ++-- .../frontend/src/pages/my-antennas/editor.vue | 4 +- .../frontend/src/pages/my-antennas/index.vue | 6 +-- .../frontend/src/pages/my-clips/index.vue | 6 +-- .../frontend/src/pages/my-lists/index.vue | 10 ++--- packages/frontend/src/pages/my-lists/list.vue | 14 +++---- packages/frontend/src/pages/not-found.vue | 8 ++-- packages/frontend/src/pages/note.vue | 10 ++--- packages/frontend/src/pages/notifications.vue | 6 +-- packages/frontend/src/pages/oauth.vue | 6 +-- .../page-editor/els/page-editor.el.image.vue | 4 +- .../page-editor/els/page-editor.el.note.vue | 4 +- .../els/page-editor.el.section.vue | 6 +-- .../page-editor/els/page-editor.el.text.vue | 2 +- .../page-editor/page-editor.container.vue | 2 +- .../src/pages/page-editor/page-editor.vue | 14 +++---- packages/frontend/src/pages/page.vue | 14 +++---- packages/frontend/src/pages/pages.vue | 6 +-- packages/frontend/src/pages/registry.keys.vue | 6 +-- .../frontend/src/pages/registry.value.vue | 6 +-- packages/frontend/src/pages/registry.vue | 6 +-- .../frontend/src/pages/reset-password.vue | 8 ++-- packages/frontend/src/pages/role.vue | 10 ++--- packages/frontend/src/pages/scratchpad.vue | 16 ++++---- packages/frontend/src/pages/search.note.vue | 10 ++--- packages/frontend/src/pages/search.user.vue | 10 ++--- packages/frontend/src/pages/search.vue | 10 ++--- .../src/pages/settings/2fa.qrdialog.vue | 6 +-- packages/frontend/src/pages/settings/2fa.vue | 6 +-- .../frontend/src/pages/settings/accounts.vue | 8 ++-- packages/frontend/src/pages/settings/api.vue | 6 +-- packages/frontend/src/pages/settings/apps.vue | 8 ++-- .../src/pages/settings/custom-css.vue | 10 ++--- packages/frontend/src/pages/settings/deck.vue | 6 +-- .../src/pages/settings/drive-cleaner.vue | 12 +++--- .../frontend/src/pages/settings/drive.vue | 12 +++--- .../frontend/src/pages/settings/email.vue | 10 ++--- .../frontend/src/pages/settings/general.vue | 16 ++++---- .../src/pages/settings/import-export.vue | 10 ++--- .../frontend/src/pages/settings/index.vue | 18 ++++----- .../src/pages/settings/instance-mute.vue | 8 ++-- .../frontend/src/pages/settings/migration.vue | 10 ++--- .../src/pages/settings/mute-block.vue | 10 ++--- .../frontend/src/pages/settings/navbar.vue | 12 +++--- .../src/pages/settings/notifications.vue | 8 ++-- .../frontend/src/pages/settings/other.vue | 12 +++--- .../src/pages/settings/plugin.install.vue | 10 ++--- .../frontend/src/pages/settings/plugin.vue | 10 ++--- .../pages/settings/preferences-backups.vue | 18 ++++----- .../frontend/src/pages/settings/privacy.vue | 10 ++--- .../frontend/src/pages/settings/profile.vue | 16 ++++---- .../frontend/src/pages/settings/reaction.vue | 10 ++--- .../frontend/src/pages/settings/roles.vue | 10 ++--- .../frontend/src/pages/settings/security.vue | 6 +-- .../src/pages/settings/sounds.sound.vue | 4 +- .../frontend/src/pages/settings/sounds.vue | 6 +-- .../pages/settings/statusbar.statusbar.vue | 6 +-- .../frontend/src/pages/settings/statusbar.vue | 8 ++-- .../src/pages/settings/theme.install.vue | 8 ++-- .../src/pages/settings/theme.manage.vue | 10 ++--- .../frontend/src/pages/settings/theme.vue | 18 ++++----- .../src/pages/settings/webhook.edit.vue | 8 ++-- .../src/pages/settings/webhook.new.vue | 6 +-- .../frontend/src/pages/settings/webhook.vue | 4 +- .../frontend/src/pages/settings/word-mute.vue | 12 +++--- packages/frontend/src/pages/share.vue | 8 ++-- .../frontend/src/pages/signup-complete.vue | 6 +-- packages/frontend/src/pages/tag.vue | 10 ++--- packages/frontend/src/pages/theme-editor.vue | 16 ++++---- .../frontend/src/pages/timeline.tutorial.vue | 8 ++-- packages/frontend/src/pages/timeline.vue | 16 ++++---- .../frontend/src/pages/user-list-timeline.vue | 10 ++--- packages/frontend/src/pages/user-tag.vue | 4 +- .../frontend/src/pages/user/achievements.vue | 4 +- .../src/pages/user/activity.following.vue | 12 +++--- .../src/pages/user/activity.heatmap.vue | 10 ++--- .../src/pages/user/activity.notes.vue | 12 +++--- .../frontend/src/pages/user/activity.pv.vue | 12 +++--- .../frontend/src/pages/user/followers.vue | 6 +-- .../frontend/src/pages/user/following.vue | 6 +-- packages/frontend/src/pages/user/home.vue | 24 +++++------ .../src/pages/user/index.activity.vue | 4 +- .../frontend/src/pages/user/index.photos.vue | 10 ++--- .../src/pages/user/index.timeline.vue | 2 +- packages/frontend/src/pages/user/index.vue | 10 ++--- .../frontend/src/pages/welcome.entrance.a.vue | 10 ++--- packages/frontend/src/pages/welcome.setup.vue | 8 ++-- .../frontend/src/pages/welcome.timeline.vue | 6 +-- packages/frontend/src/pages/welcome.vue | 6 +-- packages/frontend/src/pizzax.ts | 12 +++--- packages/frontend/src/plugin.ts | 6 +-- packages/frontend/src/router.ts | 2 +- packages/frontend/src/scripts/achievements.ts | 4 +- packages/frontend/src/scripts/aiscript/api.ts | 10 ++--- packages/frontend/src/scripts/api.ts | 4 +- packages/frontend/src/scripts/array.ts | 2 +- packages/frontend/src/scripts/autocomplete.ts | 2 +- packages/frontend/src/scripts/clicker-game.ts | 2 +- packages/frontend/src/scripts/collapsed.ts | 2 +- packages/frontend/src/scripts/confetti.ts | 2 +- packages/frontend/src/scripts/device-kind.ts | 2 +- .../src/scripts/extract-url-from-mfm.ts | 2 +- .../frontend/src/scripts/gen-search-query.ts | 2 +- .../src/scripts/get-account-from-id.ts | 2 +- .../src/scripts/get-drive-file-menu.ts | 10 ++--- .../frontend/src/scripts/get-note-menu.ts | 18 ++++----- .../frontend/src/scripts/get-note-summary.ts | 2 +- .../frontend/src/scripts/get-user-menu.ts | 18 ++++----- packages/frontend/src/scripts/hotkey.ts | 2 +- packages/frontend/src/scripts/init-chart.ts | 2 +- .../frontend/src/scripts/initialize-sw.ts | 2 +- packages/frontend/src/scripts/intl-const.ts | 2 +- .../frontend/src/scripts/isFfVisibleForMe.ts | 2 +- packages/frontend/src/scripts/lookup-user.ts | 4 +- packages/frontend/src/scripts/lookup.ts | 8 ++-- packages/frontend/src/scripts/media-proxy.ts | 6 +-- packages/frontend/src/scripts/please-login.ts | 6 +-- packages/frontend/src/scripts/popout.ts | 4 +- .../frontend/src/scripts/reaction-picker.ts | 2 +- packages/frontend/src/scripts/select-file.ts | 10 ++--- .../frontend/src/scripts/show-moved-dialog.ts | 6 +-- .../src/scripts/show-suspended-dialog.ts | 4 +- packages/frontend/src/scripts/sound.ts | 2 +- packages/frontend/src/scripts/theme-editor.ts | 2 +- packages/frontend/src/scripts/theme.ts | 2 +- packages/frontend/src/scripts/touch.ts | 2 +- packages/frontend/src/scripts/upload.ts | 12 +++--- .../frontend/src/scripts/use-chart-tooltip.ts | 2 +- .../frontend/src/scripts/use-note-capture.ts | 4 +- packages/frontend/src/store.ts | 2 +- packages/frontend/src/stream.ts | 4 +- packages/frontend/src/theme-store.ts | 8 ++-- .../src/ui/_common_/announcements.vue | 2 +- packages/frontend/src/ui/_common_/common.ts | 10 ++--- packages/frontend/src/ui/_common_/common.vue | 14 +++---- .../src/ui/_common_/navbar-for-mobile.vue | 10 ++--- packages/frontend/src/ui/_common_/navbar.vue | 10 ++--- .../src/ui/_common_/statusbar-federation.vue | 6 +-- .../src/ui/_common_/statusbar-rss.vue | 4 +- .../src/ui/_common_/statusbar-user-list.vue | 8 ++-- .../frontend/src/ui/_common_/statusbars.vue | 2 +- .../src/ui/_common_/stream-indicator.vue | 8 ++-- .../frontend/src/ui/_common_/sw-inject.ts | 10 ++--- packages/frontend/src/ui/_common_/upload.vue | 6 +-- packages/frontend/src/ui/classic.header.vue | 10 ++--- packages/frontend/src/ui/classic.sidebar.vue | 20 +++++----- packages/frontend/src/ui/classic.vue | 16 ++++---- packages/frontend/src/ui/deck.vue | 20 +++++----- .../frontend/src/ui/deck/antenna-column.vue | 6 +-- .../frontend/src/ui/deck/channel-column.vue | 6 +-- packages/frontend/src/ui/deck/column.vue | 6 +-- packages/frontend/src/ui/deck/deck-store.ts | 6 +-- .../frontend/src/ui/deck/direct-column.vue | 2 +- packages/frontend/src/ui/deck/list-column.vue | 4 +- packages/frontend/src/ui/deck/main-column.vue | 12 +++--- .../frontend/src/ui/deck/mentions-column.vue | 2 +- .../src/ui/deck/notifications-column.vue | 6 +-- .../src/ui/deck/role-timeline-column.vue | 6 +-- packages/frontend/src/ui/deck/tl-column.vue | 10 ++--- .../frontend/src/ui/deck/widgets-column.vue | 4 +- packages/frontend/src/ui/minimum.vue | 6 +-- packages/frontend/src/ui/universal.vue | 24 +++++------ .../frontend/src/ui/universal.widgets.vue | 4 +- packages/frontend/src/ui/visitor.vue | 14 +++---- packages/frontend/src/ui/zen.vue | 8 ++-- .../frontend/src/widgets/WidgetActivity.vue | 8 ++-- .../frontend/src/widgets/WidgetAichan.vue | 2 +- .../frontend/src/widgets/WidgetAiscript.vue | 10 ++--- .../src/widgets/WidgetAiscriptApp.vue | 10 ++--- .../frontend/src/widgets/WidgetButton.vue | 8 ++-- .../frontend/src/widgets/WidgetCalendar.vue | 6 +-- .../frontend/src/widgets/WidgetClicker.vue | 2 +- packages/frontend/src/widgets/WidgetClock.vue | 6 +-- .../src/widgets/WidgetDigitalClock.vue | 4 +- .../frontend/src/widgets/WidgetFederation.vue | 12 +++--- .../src/widgets/WidgetInstanceCloud.vue | 8 ++-- .../src/widgets/WidgetInstanceInfo.vue | 6 +-- .../frontend/src/widgets/WidgetJobQueue.vue | 10 ++--- packages/frontend/src/widgets/WidgetMemo.vue | 6 +-- .../src/widgets/WidgetNotifications.vue | 6 +-- .../src/widgets/WidgetOnlineUsers.vue | 10 ++--- .../frontend/src/widgets/WidgetPhotos.vue | 12 +++--- .../frontend/src/widgets/WidgetPostForm.vue | 2 +- .../frontend/src/widgets/WidgetProfile.vue | 6 +-- packages/frontend/src/widgets/WidgetRss.vue | 10 ++--- .../frontend/src/widgets/WidgetRssTicker.vue | 8 ++-- .../frontend/src/widgets/WidgetSlideshow.vue | 8 ++-- .../frontend/src/widgets/WidgetTimeline.vue | 10 ++--- .../frontend/src/widgets/WidgetTrends.vue | 10 ++--- .../frontend/src/widgets/WidgetUnixClock.vue | 2 +- .../frontend/src/widgets/WidgetUserList.vue | 8 ++-- .../src/widgets/server-metric/disk.vue | 2 +- .../src/widgets/server-metric/index.vue | 8 ++-- .../src/widgets/server-metric/mem.vue | 2 +- .../src/widgets/server-metric/net.vue | 2 +- packages/frontend/src/widgets/widget.ts | 6 +-- packages/frontend/test/init.ts | 2 +- packages/frontend/test/scroll.test.ts | 2 +- packages/frontend/tsconfig.json | 2 +- .../sw/src/scripts/create-notification.ts | 10 ++--- packages/sw/src/scripts/lang.ts | 2 +- packages/sw/src/scripts/operations.ts | 4 +- packages/sw/src/sw.ts | 6 +-- 459 files changed, 1643 insertions(+), 1642 deletions(-) diff --git a/packages/frontend/@types/theme.d.ts b/packages/frontend/@types/theme.d.ts index f4ba42b89d..376bbb0e9c 100644 --- a/packages/frontend/@types/theme.d.ts +++ b/packages/frontend/@types/theme.d.ts @@ -4,7 +4,7 @@ */ declare module '@/themes/*.json5' { - import { Theme } from '@/scripts/theme'; + import { Theme } from '@/scripts/theme.js'; const theme: Theme; diff --git a/packages/frontend/package.json b/packages/frontend/package.json index d38611c2fc..a89bd84ff0 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -1,6 +1,7 @@ { "name": "frontend", "private": true, + "type": "module", "scripts": { "watch": "vite", "build": "vite build", diff --git a/packages/frontend/src/_boot_.ts b/packages/frontend/src/_boot_.ts index a397e57ad3..efb78fe447 100644 --- a/packages/frontend/src/_boot_.ts +++ b/packages/frontend/src/_boot_.ts @@ -7,8 +7,8 @@ import 'vite/modulepreload-polyfill'; import '@/style.scss'; -import { mainBoot } from './boot/main-boot'; -import { subBoot } from './boot/sub-boot'; +import { mainBoot } from '@/boot/main-boot.js'; +import { subBoot } from '@/boot/sub-boot.js'; const subBootPaths = ['/share', '/auth', '/miauth', '/signup-complete']; diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts index 43bda37b6c..0e4e4b50ff 100644 --- a/packages/frontend/src/account.ts +++ b/packages/frontend/src/account.ts @@ -5,14 +5,14 @@ import { defineAsyncComponent, reactive, ref } from 'vue'; import * as Misskey from 'misskey-js'; -import { showSuspendedDialog } from './scripts/show-suspended-dialog'; -import { i18n } from './i18n'; -import { miLocalStorage } from './local-storage'; -import { MenuButton } from './types/menu'; -import { del, get, set } from '@/scripts/idb-proxy'; -import { apiUrl } from '@/config'; -import { waiting, api, popup, popupMenu, success, alert } from '@/os'; -import { unisonReload, reloadChannel } from '@/scripts/unison-reload'; +import { showSuspendedDialog } from '@/scripts/show-suspended-dialog.js'; +import { i18n } from '@/i18n.js'; +import { miLocalStorage } from '@/local-storage.js'; +import { MenuButton } from '@/types/menu.js'; +import { del, get, set } from '@/scripts/idb-proxy.js'; +import { apiUrl } from '@/config.js'; +import { waiting, api, popup, popupMenu, success, alert } from '@/os.js'; +import { unisonReload, reloadChannel } from '@/scripts/unison-reload.js'; // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 8f5de88ccd..2175bd1a7f 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -5,26 +5,26 @@ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent, App } from 'vue'; import { compareVersions } from 'compare-versions'; -import widgets from '@/widgets'; -import directives from '@/directives'; -import components from '@/components'; -import { version, ui, lang, updateLocale } from '@/config'; -import { applyTheme } from '@/scripts/theme'; -import { isDeviceDarkmode } from '@/scripts/is-device-darkmode'; -import { i18n, updateI18n } from '@/i18n'; -import { confirm, alert, post, popup, toast } from '@/os'; -import { $i, refreshAccount, login, updateAccount, signout } from '@/account'; -import { defaultStore, ColdDeviceStorage } from '@/store'; -import { fetchInstance, instance } from '@/instance'; -import { deviceKind } from '@/scripts/device-kind'; -import { reloadChannel } from '@/scripts/unison-reload'; -import { reactionPicker } from '@/scripts/reaction-picker'; -import { getUrlWithoutLoginId } from '@/scripts/login-id'; -import { getAccountFromId } from '@/scripts/get-account-from-id'; -import { deckStore } from '@/ui/deck/deck-store'; -import { miLocalStorage } from '@/local-storage'; -import { fetchCustomEmojis } from '@/custom-emojis'; -import { mainRouter } from '@/router'; +import widgets from '@/widgets/index.js'; +import directives from '@/directives/index.js'; +import components from '@/components/index.js'; +import { version, ui, lang, updateLocale } from '@/config.js'; +import { applyTheme } from '@/scripts/theme.js'; +import { isDeviceDarkmode } from '@/scripts/is-device-darkmode.js'; +import { i18n, updateI18n } from '@/i18n.js'; +import { confirm, alert, post, popup, toast } from '@/os.js'; +import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js'; +import { defaultStore, ColdDeviceStorage } from '@/store.js'; +import { fetchInstance, instance } from '@/instance.js'; +import { deviceKind } from '@/scripts/device-kind.js'; +import { reloadChannel } from '@/scripts/unison-reload.js'; +import { reactionPicker } from '@/scripts/reaction-picker.js'; +import { getUrlWithoutLoginId } from '@/scripts/login-id.js'; +import { getAccountFromId } from '@/scripts/get-account-from-id.js'; +import { deckStore } from '@/ui/deck/deck-store.js'; +import { miLocalStorage } from '@/local-storage.js'; +import { fetchCustomEmojis } from '@/custom-emojis.js'; +import { mainRouter } from '@/router.js'; export async function common(createVue: () => App) { console.info(`Misskey v${version}`); diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 9ab1f6e14c..f2af951d63 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -4,21 +4,21 @@ */ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue'; -import { common } from './common'; -import { version, ui, lang, updateLocale } from '@/config'; -import { i18n, updateI18n } from '@/i18n'; -import { confirm, alert, post, popup, toast } from '@/os'; -import { useStream } from '@/stream'; -import * as sound from '@/scripts/sound'; -import { $i, refreshAccount, login, updateAccount, signout } from '@/account'; -import { defaultStore, ColdDeviceStorage } from '@/store'; -import { makeHotkey } from '@/scripts/hotkey'; -import { reactionPicker } from '@/scripts/reaction-picker'; -import { miLocalStorage } from '@/local-storage'; -import { claimAchievement, claimedAchievements } from '@/scripts/achievements'; -import { mainRouter } from '@/router'; -import { initializeSw } from '@/scripts/initialize-sw'; -import { deckStore } from '@/ui/deck/deck-store'; +import { common } from './common.js'; +import { version, ui, lang, updateLocale } from '@/config.js'; +import { i18n, updateI18n } from '@/i18n.js'; +import { confirm, alert, post, popup, toast } from '@/os.js'; +import { useStream } from '@/stream.js'; +import * as sound from '@/scripts/sound.js'; +import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js'; +import { defaultStore, ColdDeviceStorage } from '@/store.js'; +import { makeHotkey } from '@/scripts/hotkey.js'; +import { reactionPicker } from '@/scripts/reaction-picker.js'; +import { miLocalStorage } from '@/local-storage.js'; +import { claimAchievement, claimedAchievements } from '@/scripts/achievements.js'; +import { mainRouter } from '@/router.js'; +import { initializeSw } from '@/scripts/initialize-sw.js'; +import { deckStore } from '@/ui/deck/deck-store.js'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( diff --git a/packages/frontend/src/boot/sub-boot.ts b/packages/frontend/src/boot/sub-boot.ts index 2cc19f2df3..9b4670e130 100644 --- a/packages/frontend/src/boot/sub-boot.ts +++ b/packages/frontend/src/boot/sub-boot.ts @@ -4,7 +4,7 @@ */ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue'; -import { common } from './common'; +import { common } from './common.js'; export async function subBoot() { const { isClientUpdated } = await common(() => createApp( diff --git a/packages/frontend/src/cache.ts b/packages/frontend/src/cache.ts index 1f3d28ba57..25d2b3c15f 100644 --- a/packages/frontend/src/cache.ts +++ b/packages/frontend/src/cache.ts @@ -4,8 +4,8 @@ */ import * as Misskey from 'misskey-js'; -import { Cache } from '@/scripts/cache'; -import { api } from '@/os'; +import { Cache } from '@/scripts/cache.js'; +import { api } from '@/os.js'; export const clipsCache = new Cache(1000 * 60 * 30, () => api('clips/list')); export const rolesCache = new Cache(1000 * 60 * 30, () => api('admin/roles/list')); diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue index cb97875bcd..66114b8734 100644 --- a/packages/frontend/src/components/MkAbuseReport.vue +++ b/packages/frontend/src/components/MkAbuseReport.vue @@ -44,9 +44,9 @@ SPDX-License-Identifier: AGPL-3.0-only import MkButton from '@/components/MkButton.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import MkKeyValue from '@/components/MkKeyValue.vue'; -import * as os from '@/os'; -import { i18n } from '@/i18n'; -import { dateString } from '@/filters/date'; +import * as os from '@/os.js'; +import { i18n } from '@/i18n.js'; +import { dateString } from '@/filters/date.js'; const props = defineProps<{ report: any; diff --git a/packages/frontend/src/components/MkAbuseReportWindow.vue b/packages/frontend/src/components/MkAbuseReportWindow.vue index 6e0dee6973..7814681ea2 100644 --- a/packages/frontend/src/components/MkAbuseReportWindow.vue +++ b/packages/frontend/src/components/MkAbuseReportWindow.vue @@ -35,8 +35,8 @@ import * as Misskey from 'misskey-js'; import MkWindow from '@/components/MkWindow.vue'; import MkTextarea from '@/components/MkTextarea.vue'; import MkButton from '@/components/MkButton.vue'; -import * as os from '@/os'; -import { i18n } from '@/i18n'; +import * as os from '@/os.js'; +import { i18n } from '@/i18n.js'; const props = defineProps<{ user: Misskey.entities.User; diff --git a/packages/frontend/src/components/MkAccountMoved.vue b/packages/frontend/src/components/MkAccountMoved.vue index e68efb1a3b..155d9fe3a9 100644 --- a/packages/frontend/src/components/MkAccountMoved.vue +++ b/packages/frontend/src/components/MkAccountMoved.vue @@ -15,9 +15,9 @@ SPDX-License-Identifier: AGPL-3.0-only import { ref } from 'vue'; import * as Misskey from 'misskey-js'; import MkMention from './MkMention.vue'; -import { i18n } from '@/i18n'; -import { host as localHost } from '@/config'; -import { api } from '@/os'; +import { i18n } from '@/i18n.js'; +import { host as localHost } from '@/config.js'; +import { api } from '@/os.js'; const user = ref(); diff --git a/packages/frontend/src/components/MkAchievements.stories.impl.ts b/packages/frontend/src/components/MkAchievements.stories.impl.ts index fd971e5ac6..a67e1def13 100644 --- a/packages/frontend/src/components/MkAchievements.stories.impl.ts +++ b/packages/frontend/src/components/MkAchievements.stories.impl.ts @@ -9,7 +9,7 @@ import { rest } from 'msw'; import { userDetailed } from '../../.storybook/fakes'; import { commonHandlers } from '../../.storybook/mocks'; import MkAchievements from './MkAchievements.vue'; -import { ACHIEVEMENT_TYPES } from '@/scripts/achievements'; +import { ACHIEVEMENT_TYPES } from '@/scripts/achievements.js'; export const Empty = { render(args) { return { diff --git a/packages/frontend/src/components/MkAchievements.vue b/packages/frontend/src/components/MkAchievements.vue index f9d62773f5..bea0ed26d8 100644 --- a/packages/frontend/src/components/MkAchievements.vue +++ b/packages/frontend/src/components/MkAchievements.vue @@ -54,9 +54,9 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/components/MkMiniChart.vue b/packages/frontend/src/components/MkMiniChart.vue index eee1e10399..8d2a147306 100644 --- a/packages/frontend/src/components/MkMiniChart.vue +++ b/packages/frontend/src/components/MkMiniChart.vue @@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { watch } from 'vue'; import { v4 as uuid } from 'uuid'; import tinycolor from 'tinycolor2'; -import { useInterval } from '@/scripts/use-interval'; +import { useInterval } from '@/scripts/use-interval.js'; const props = defineProps<{ src: number[]; diff --git a/packages/frontend/src/components/MkModal.vue b/packages/frontend/src/components/MkModal.vue index 4ba078d4eb..ec5039c504 100644 --- a/packages/frontend/src/components/MkModal.vue +++ b/packages/frontend/src/components/MkModal.vue @@ -43,10 +43,10 @@ SPDX-License-Identifier: AGPL-3.0-only