From d2fd7460ed81a3b470c8341130682e589e072884 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 00:41:11 +0900 Subject: [PATCH 01/45] Update CHANGELOG.md #16465 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71273f705a..7de981d49a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ - 既存のサーバーで当機能を有効化した場合は、処理量が多くなるため、一時的にストレージ使用量が増加する可能性があります。 - 増加量を抑えるには、最大処理継続時間をデフォルトより短くしてください。 - データベースサイズへの効果が見られない場合はautovacuumが有効になっているか確認してください + - ハイパーリンクによる参照は検知できないためリンク切れとなります。 + - 現時点では、2023-10-01以前にクリップされたリモートのノートは検知しないため削除対象となります。 - サーバーの初期設定が完了するまでは連合がオンにならないようになりました - 日本語における公開範囲名称の「ダイレクト」が「指名」に改称されました - 実際の動作に即した名称になり、馴染みのない人でも理解しやすくなりました From 2e0a34300a69805fc1c34b1212afad97caa75902 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 09:46:31 +0900 Subject: [PATCH 02/45] refactor --- packages/backend/src/core/entities/UserEntityService.ts | 1 + packages/backend/src/models/json-schema/user.ts | 2 +- packages/frontend/src/components/MkFlashPreview.vue | 2 +- packages/frontend/src/components/global/RouterView.vue | 8 +++++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index d4769d24d4..6abf205a56 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -481,6 +481,7 @@ export class UserEntityService implements OnModuleInit { const notificationsInfo = isMe && isDetailed ? await this.getNotificationsInfo(user.id) : null; + // TODO: 例えば avatarUrl: true など間違った型を設定しても型エラーにならないのをどうにかする(ジェネリクス使わない方法で実装するしかなさそう?) const packed = { id: user.id, name: user.name, diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 2b5f706ff9..9c88a078c0 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -65,7 +65,7 @@ export const packedUserLiteSchema = { avatarUrl: { type: 'string', format: 'url', - nullable: true, optional: false, + nullable: false, optional: false, }, avatarBlurhash: { type: 'string', diff --git a/packages/frontend/src/components/MkFlashPreview.vue b/packages/frontend/src/components/MkFlashPreview.vue index f8f6143a7c..b7278ac742 100644 --- a/packages/frontend/src/components/MkFlashPreview.vue +++ b/packages/frontend/src/components/MkFlashPreview.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only

diff --git a/packages/frontend/src/components/global/RouterView.vue b/packages/frontend/src/components/global/RouterView.vue index 27f7b18559..3a508eaca0 100644 --- a/packages/frontend/src/components/global/RouterView.vue +++ b/packages/frontend/src/components/global/RouterView.vue @@ -30,19 +30,21 @@ const props = defineProps<{ router?: Router; }>(); -const router = props.router ?? inject(DI.router); +const _router = props.router ?? inject(DI.router); -if (router == null) { +if (_router == null) { throw new Error('no router provided'); } +const router = _router; + const viewId = randomId(); provide(DI.viewId, viewId); const currentDepth = inject(DI.routerCurrentDepth, 0); provide(DI.routerCurrentDepth, currentDepth + 1); -const current = router.current!; +const current = router.current; const currentPageComponent = shallowRef('component' in current.route ? current.route.component : MkLoadingPage); const currentPageProps = ref(current.props); let currentRoutePath = current.route.path; From 231ccae006c607ff457522f5a6b2087b0a1eece3 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 09:57:33 +0900 Subject: [PATCH 03/45] tweak locale --- locales/index.d.ts | 6 +++--- locales/ja-JP.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index c078f4ece3..3ec4e2b241 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -12032,15 +12032,15 @@ export interface Locale extends ILocale { */ "youCanConfigureMoreFederationSettingsLater": string; /** - * 受信コンテンツの自動クリーニング + * リモートコンテンツの自動クリーニング */ "remoteContentsCleaning": string; /** - * 連合を行うと、継続して多くのコンテンツを受信します。自動クリーニングを有効にすると、参照されていない古くなったコンテンツを自動でサーバーから削除し、ストレージを節約できます。 + * 連合を行うと、継続して多くのコンテンツを受信します。自動クリーニングを有効にすると、参照されていない古くなったリモートコンテンツを自動でサーバーから削除し、ストレージを節約できます。 */ "remoteContentsCleaning_description": string; /** - * ハイパーリンクなど、一部の参照方法はシステム上で検知できません。 + * ローカル内リモートコンテンツへのハイパーリンクはリンク切れとなります。 */ "remoteContentsCleaning_description2": string; /** diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f24b93d139..0043386ad9 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -3216,9 +3216,9 @@ _serverSetupWizard: doYouConnectToFediverse_description1: "分散型サーバーで構成されるネットワーク(Fediverse)に接続すると、他のサーバーと相互にコンテンツのやり取りが可能です。" doYouConnectToFediverse_description2: "Fediverseと接続することは「連合」とも呼ばれます。" youCanConfigureMoreFederationSettingsLater: "連合可能なサーバーの指定など、高度な設定も後ほど可能です。" - remoteContentsCleaning: "受信コンテンツの自動クリーニング" - remoteContentsCleaning_description: "連合を行うと、継続して多くのコンテンツを受信します。自動クリーニングを有効にすると、参照されていない古くなったコンテンツを自動でサーバーから削除し、ストレージを節約できます。" - remoteContentsCleaning_description2: "ハイパーリンクなど、一部の参照方法はシステム上で検知できません。" + remoteContentsCleaning: "リモートコンテンツの自動クリーニング" + remoteContentsCleaning_description: "連合を行うと、継続して多くのコンテンツを受信します。自動クリーニングを有効にすると、参照されていない古くなったリモートコンテンツを自動でサーバーから削除し、ストレージを節約できます。" + remoteContentsCleaning_description2: "ローカル内リモートコンテンツへのハイパーリンクはリンク切れとなります。" adminInfo: "管理者情報" adminInfo_description: "問い合わせを受け付けるために使用される管理者情報を設定します。" adminInfo_mustBeFilled: "オープンサーバー、または連合がオンの場合は必ず入力が必要です。" From 25df56dfd0b97acfb4d6c76c9154f560f56ab150 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:14:17 +0900 Subject: [PATCH 04/45] refactor --- .../frontend/src/components/MkMediaList.vue | 2 ++ .../frontend/src/components/MkPageWindow.vue | 31 ++++++++----------- .../src/components/MkRoleSelectDialog.vue | 4 +-- .../src/pages/settings/plugin.install.vue | 2 +- .../src/pages/welcome.entrance.classic.vue | 2 +- .../frontend/src/utility/extract-mentions.ts | 2 +- 6 files changed, 19 insertions(+), 24 deletions(-) diff --git a/packages/frontend/src/components/MkMediaList.vue b/packages/frontend/src/components/MkMediaList.vue index 4a1100c324..bfc8179e13 100644 --- a/packages/frontend/src/components/MkMediaList.vue +++ b/packages/frontend/src/components/MkMediaList.vue @@ -94,6 +94,8 @@ async function calcAspectRatio() { onMounted(() => { calcAspectRatio(); + if (gallery.value == null) return; // TSを黙らすため + lightbox = new PhotoSwipeLightbox({ dataSource: props.mediaList .filter(media => { diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue index cf60c1ca3e..d21e09a984 100644 --- a/packages/frontend/src/components/MkPageWindow.vue +++ b/packages/frontend/src/components/MkPageWindow.vue @@ -23,8 +23,8 @@ SPDX-License-Identifier: AGPL-3.0-only
- - + +
@@ -58,20 +58,15 @@ const windowRouter = createRouter(props.initialPath); const pageMetadata = ref(null); const windowEl = useTemplateRef('windowEl'); -const history = ref<{ path: string; }[]>([{ +const _history_ = ref<{ path: string; }[]>([{ path: windowRouter.getCurrentFullPath(), }]); const buttonsLeft = computed(() => { - const buttons: Record[] = []; - - if (history.value.length > 1) { - buttons.push({ - icon: 'ti ti-arrow-left', - onClick: back, - }); - } - - return buttons; + return _history_.value.length > 1 ? [{ + icon: 'ti ti-arrow-left', + title: i18n.ts.goBack, + onClick: back, + }] : []; }); const buttonsRight = computed(() => { const buttons = [{ @@ -97,12 +92,12 @@ function getSearchMarker(path: string) { const searchMarkerId = ref(getSearchMarker(props.initialPath)); windowRouter.addListener('push', ctx => { - history.value.push({ path: ctx.fullPath }); + _history_.value.push({ path: ctx.fullPath }); }); windowRouter.addListener('replace', ctx => { - history.value.pop(); - history.value.push({ path: ctx.fullPath }); + _history_.value.pop(); + _history_.value.push({ path: ctx.fullPath }); }); windowRouter.addListener('change', ctx => { @@ -150,8 +145,8 @@ const contextmenu = computed(() => ([{ }])); function back() { - history.value.pop(); - windowRouter.replaceByPath(history.value.at(-1)!.path); + _history_.value.pop(); + windowRouter.replaceByPath(_history_.value.at(-1)!.path); } function reload() { diff --git a/packages/frontend/src/components/MkRoleSelectDialog.vue b/packages/frontend/src/components/MkRoleSelectDialog.vue index fc7ba50fb3..f1cc98def4 100644 --- a/packages/frontend/src/components/MkRoleSelectDialog.vue +++ b/packages/frontend/src/components/MkRoleSelectDialog.vue @@ -105,9 +105,7 @@ async function addRole() { .map(r => ({ text: r.name, value: r })); const { canceled, result: role } = await os.select({ items }); - if (canceled) { - return; - } + if (canceled || role == null) return; selectedRoleIds.value.push(role.id); } diff --git a/packages/frontend/src/pages/settings/plugin.install.vue b/packages/frontend/src/pages/settings/plugin.install.vue index 22b53b4b96..8ed7f2a7b6 100644 --- a/packages/frontend/src/pages/settings/plugin.install.vue +++ b/packages/frontend/src/pages/settings/plugin.install.vue @@ -40,7 +40,7 @@ async function install() { code.value = null; router.push('/settings/plugin'); - } catch (err) { + } catch (err: any) { os.alert({ type: 'error', title: 'Install failed', diff --git a/packages/frontend/src/pages/welcome.entrance.classic.vue b/packages/frontend/src/pages/welcome.entrance.classic.vue index c2cf937c71..cddec3332e 100644 --- a/packages/frontend/src/pages/welcome.entrance.classic.vue +++ b/packages/frontend/src/pages/welcome.entrance.classic.vue @@ -53,7 +53,7 @@ function getInstanceIcon(instance: Misskey.entities.FederationInstance): string misskeyApiGet('federation/instances', { sort: '+pubSub', limit: 20, - blocked: 'false', + blocked: false, }).then(_instances => { instances.value = _instances; }); diff --git a/packages/frontend/src/utility/extract-mentions.ts b/packages/frontend/src/utility/extract-mentions.ts index d518562053..2ec9349718 100644 --- a/packages/frontend/src/utility/extract-mentions.ts +++ b/packages/frontend/src/utility/extract-mentions.ts @@ -9,7 +9,7 @@ import * as mfm from 'mfm-js'; export function extractMentions(nodes: mfm.MfmNode[]): mfm.MfmMention['props'][] { // TODO: 重複を削除 - const mentionNodes = mfm.extract(nodes, (node) => node.type === 'mention'); + const mentionNodes = mfm.extract(nodes, (node) => node.type === 'mention') as mfm.MfmMention[]; const mentions = mentionNodes.map(x => x.props); return mentions; From 3e9118af3dc84d4842d7ef9f1a36053d30e97ba8 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:15:11 +0900 Subject: [PATCH 05/45] =?UTF-8?q?fix(frontend):=20lookup=E3=83=9A=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=81=A7=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88URL?= =?UTF-8?q?=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=9F=E9=9A=9B=E3=81=AB?= =?UTF-8?q?=E6=AD=A3=E3=81=97=E3=81=8F=E5=8B=95=E4=BD=9C=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + packages/frontend/src/pages/lookup.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de981d49a..ddd6c86f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ - Fix: 照会ダイアログでap/showでローカルユーザーを解決した際@username@nullに飛ばされる問題を修正 - Fix: アイコンのデコレーションを付ける際にデコレーションが表示されなくなる問題を修正 - Fix: 管理中アカウント一覧で正しい表示が行われない問題を修正 +- Fix: lookupページでリモートURLを指定した際に正しく動作しない問題を修正 ### Server - Feat: サーバー管理コマンド diff --git a/packages/frontend/src/pages/lookup.vue b/packages/frontend/src/pages/lookup.vue index 8a1e952d85..182b2f703d 100644 --- a/packages/frontend/src/pages/lookup.vue +++ b/packages/frontend/src/pages/lookup.vue @@ -48,7 +48,7 @@ function _fetch_() { if (res.type === 'User') { mainRouter.replace('/@:acct/:page?', { params: { - acct: res.host != null ? `${res.object.username}@${res.object.host}` : res.object.username, + acct: res.object.host != null ? `${res.object.username}@${res.object.host}` : res.object.username, }, }); } else if (res.type === 'Note') { From aa8daca914c663c1bb923bc31d3ae60485a25220 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:23:41 +0900 Subject: [PATCH 06/45] chore(frontend): skip typecheck for auto-generated files --- packages/frontend/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/tsconfig.json b/packages/frontend/tsconfig.json index c445ada034..662dc6ed4e 100644 --- a/packages/frontend/tsconfig.json +++ b/packages/frontend/tsconfig.json @@ -55,6 +55,7 @@ "./@types/**/*.ts" ], "exclude": [ - ".storybook/**/*" + ".storybook/**/*", + "./src/**/*.stories.ts" ] } From 55eb18f5a6aa1cb12f8e1c401656253fa1b09068 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:29:45 +0900 Subject: [PATCH 07/45] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddd6c86f80..c1be9ba1f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,8 @@ - サーバーの初期設定が完了するまでは連合がオンにならないようになりました - 日本語における公開範囲名称の「ダイレクト」が「指名」に改称されました - 実際の動作に即した名称になり、馴染みのない人でも理解しやすくなりました - - 他サービスにおける「ダイレクトメッセージ」に相当するMisskeyの機能は「チャット」ですが、「ダイレクト投稿」という名称の機能が存在するとそちらがダイレクトメッセージ機能であるような誤解を生んでいました + - 他サービスにおける「ダイレクトメッセージ」に相当するMisskeyの機能は「チャット」ですが(過去のバージョンのMisskeyでも、当該機能は「チャット」ではなく「ダイレクトメッセージ」でした)、「ダイレクト投稿」という名称の機能が存在するとそちらがダイレクトメッセージ機能であるような誤解を生んでいました + - 今後、「チャット」の名称を「ダイレクトメッセージ」に戻す可能性があります - mfm.jsをアップデートしました - Enhance: Unicode 15.1 および 16.0 に収録されている絵文字に対応 - Enhance: acctに `.` が入っているユーザーのメンションに対応 @@ -29,6 +30,7 @@ - プラグインは1.xに対応したものが必要です - Playはそのまま動作しますが、新規に作られるプリセットは1.xになります - 以前のバージョンから無効化されていた note_view_interruptor が有効になりました + - ハンドラは同期的である必要があります - Feat: セーフモード - プラグイン・テーマ・カスタムCSSの使用でクライアントの起動に問題が発生した際に、これらを無効にして起動できます - 以下の方法でセーフモードを起動できます From ee96f77ef28466a71f24c46edbea6a4f687834ca Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 12:09:19 +0900 Subject: [PATCH 08/45] refactor --- packages/frontend/lib/vite-plugin-create-search-index.ts | 2 +- .../src/components/global/MkPageHeader.stories.impl.ts | 4 +++- packages/frontend/src/ui/_common_/statusbar-federation.vue | 2 +- packages/frontend/test/home.test.ts | 2 +- packages/frontend/test/note.test.ts | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/frontend/lib/vite-plugin-create-search-index.ts b/packages/frontend/lib/vite-plugin-create-search-index.ts index 4e20828909..f17b43b0e3 100644 --- a/packages/frontend/lib/vite-plugin-create-search-index.ts +++ b/packages/frontend/lib/vite-plugin-create-search-index.ts @@ -8,7 +8,7 @@ import { parse as vueSfcParse } from 'vue/compiler-sfc'; import { createLogger, - EnvironmentModuleGraph, + type EnvironmentModuleGraph, type LogErrorOptions, type LogOptions, normalizePath, diff --git a/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts b/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts index 15938d0495..0ac6304054 100644 --- a/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts +++ b/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts @@ -2,7 +2,7 @@ * SPDX-FileCopyrightText: syuilo and misskey-project * SPDX-License-Identifier: AGPL-3.0-only */ - + import { waitFor } from '@storybook/test'; import MkPageHeader from './MkPageHeader.vue'; import type { StoryObj } from '@storybook/vue3'; @@ -59,6 +59,7 @@ export const Icon = { { ...OneTab.args.tabs[0], icon: 'ti ti-home', + title: 'Home', }, ], }, @@ -71,6 +72,7 @@ export const IconOnly = { { key: Icon.args.tabs[0].key, icon: Icon.args.tabs[0].icon, + title: Icon.args.tabs[0].title, iconOnly: true, }, ], diff --git a/packages/frontend/src/ui/_common_/statusbar-federation.vue b/packages/frontend/src/ui/_common_/statusbar-federation.vue index c79f690cff..079f1f92bb 100644 --- a/packages/frontend/src/ui/_common_/statusbar-federation.vue +++ b/packages/frontend/src/ui/_common_/statusbar-federation.vue @@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only mode="default" > - + {{ instance.host }} diff --git a/packages/frontend/test/home.test.ts b/packages/frontend/test/home.test.ts index a67ea40176..f3fa89d6ae 100644 --- a/packages/frontend/test/home.test.ts +++ b/packages/frontend/test/home.test.ts @@ -15,7 +15,7 @@ import 'intersection-observer'; describe('XHome', () => { const renderHome = (user: Partial): RenderResult => { return render(XHome, { - props: { user, disableNotes: true }, + props: { user: user as Misskey.entities.UserDetailed, disableNotes: true }, global: { directives, components }, }); }; diff --git a/packages/frontend/test/note.test.ts b/packages/frontend/test/note.test.ts index fda2d9ad7b..2d5d2712d6 100644 --- a/packages/frontend/test/note.test.ts +++ b/packages/frontend/test/note.test.ts @@ -29,7 +29,7 @@ describe('MkMediaImage', () => { comment: null, properties: {}, ...image, - } as DriveFile, + } as Misskey.entities.DriveFile, }, global: { directives, components }, }); From c5bb88143850fb0544054d67e505171674887e8c Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 12:40:11 +0900 Subject: [PATCH 09/45] refactor --- packages/frontend/src/aiscript/ui.ts | 8 +++----- packages/frontend/src/pages/scratchpad.vue | 10 ++++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/aiscript/ui.ts b/packages/frontend/src/aiscript/ui.ts index a27ece512e..9c330da3c5 100644 --- a/packages/frontend/src/aiscript/ui.ts +++ b/packages/frontend/src/aiscript/ui.ts @@ -4,11 +4,11 @@ */ import { utils, values } from '@syuilo/aiscript'; -import { genId } from '@/utility/id.js'; import { ref } from 'vue'; -import type { Ref } from 'vue'; import * as Misskey from 'misskey-js'; import { assertStringAndIsIn } from './common.js'; +import type { Ref } from 'vue'; +import { genId } from '@/utility/id.js'; const ALIGNS = ['left', 'center', 'right'] as const; const FONTS = ['serif', 'sans-serif', 'monospace'] as const; @@ -21,16 +21,15 @@ type BorderStyle = (typeof BORDER_STYLES)[number]; export type AsUiComponentBase = { id: string; hidden?: boolean; + children?: AsUiComponent['id'][]; }; export type AsUiRoot = AsUiComponentBase & { type: 'root'; - children: AsUiComponent['id'][]; }; export type AsUiContainer = AsUiComponentBase & { type: 'container'; - children?: AsUiComponent['id'][]; align?: Align; bgColor?: string; fgColor?: string; @@ -123,7 +122,6 @@ export type AsUiSelect = AsUiComponentBase & { export type AsUiFolder = AsUiComponentBase & { type: 'folder'; - children?: AsUiComponent['id'][]; title?: string; opened?: boolean; }; diff --git a/packages/frontend/src/pages/scratchpad.vue b/packages/frontend/src/pages/scratchpad.vue index 751a67190a..7fb64c2947 100644 --- a/packages/frontend/src/pages/scratchpad.vue +++ b/packages/frontend/src/pages/scratchpad.vue @@ -82,10 +82,10 @@ const logs = ref<{ text: string; print: boolean; }[]>([]); -const root = ref(); +const root = ref(); const components = ref[]>([]); const uiKey = ref(0); -const uiInspectorOpenedComponents = ref(new Map); +const uiInspectorOpenedComponents = ref(new Map, boolean>); const saved = miLocalStorage.getItem('scratchpad'); if (saved) { @@ -186,11 +186,13 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); const showns = computed(() => { + if (root.value == null) return new Set(); const result = new Set(); (function addChildrenToResult(c: AsUiComponent) { result.add(c.id); - if (c.children) { - const childComponents = components.value.filter(v => c.children.includes(v.value.id)); + const children = c.children; + if (children) { + const childComponents = components.value.filter(v => children.includes(v.value.id)); for (const child of childComponents) { addChildrenToResult(child.value); } From 98e07c3bd113306496920f7ceafe91228228b22f Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 12:41:24 +0900 Subject: [PATCH 10/45] perf(frontend): use WeakMap --- packages/frontend/src/pages/scratchpad.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/scratchpad.vue b/packages/frontend/src/pages/scratchpad.vue index 7fb64c2947..d73363d058 100644 --- a/packages/frontend/src/pages/scratchpad.vue +++ b/packages/frontend/src/pages/scratchpad.vue @@ -85,7 +85,7 @@ const logs = ref<{ const root = ref(); const components = ref[]>([]); const uiKey = ref(0); -const uiInspectorOpenedComponents = ref(new Map, boolean>); +const uiInspectorOpenedComponents = ref(new WeakMap, boolean>); const saved = miLocalStorage.getItem('scratchpad'); if (saved) { From 87d09f255dd702627bbc6fa58692eebba3830889 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 15:59:39 +0900 Subject: [PATCH 11/45] refactor --- packages/backend/src/misc/json-schema.ts | 2 + .../src/models/json-schema/user-webhook.ts | 55 +++++++++++++++++++ .../server/api/endpoints/i/webhooks/list.ts | 48 ++++------------ .../server/api/endpoints/i/webhooks/show.ts | 24 +------- .../frontend/src/pages/settings/navbar.vue | 2 +- 5 files changed, 71 insertions(+), 60 deletions(-) create mode 100644 packages/backend/src/models/json-schema/user-webhook.ts diff --git a/packages/backend/src/misc/json-schema.ts b/packages/backend/src/misc/json-schema.ts index dca92e1037..ed7d5bfc3a 100644 --- a/packages/backend/src/misc/json-schema.ts +++ b/packages/backend/src/misc/json-schema.ts @@ -65,6 +65,7 @@ import { packedMetaDetailedSchema, packedMetaLiteSchema, } from '@/models/json-schema/meta.js'; +import { packedUserWebhookSchema } from '@/models/json-schema/user-webhook.js'; import { packedSystemWebhookSchema } from '@/models/json-schema/system-webhook.js'; import { packedAbuseReportNotificationRecipientSchema } from '@/models/json-schema/abuse-report-notification-recipient.js'; import { packedChatMessageSchema, packedChatMessageLiteSchema, packedChatMessageLiteForRoomSchema, packedChatMessageLiteFor1on1Schema } from '@/models/json-schema/chat-message.js'; @@ -134,6 +135,7 @@ export const refs = { MetaLite: packedMetaLiteSchema, MetaDetailedOnly: packedMetaDetailedOnlySchema, MetaDetailed: packedMetaDetailedSchema, + UserWebhook: packedUserWebhookSchema, SystemWebhook: packedSystemWebhookSchema, AbuseReportNotificationRecipient: packedAbuseReportNotificationRecipientSchema, ChatMessage: packedChatMessageSchema, diff --git a/packages/backend/src/models/json-schema/user-webhook.ts b/packages/backend/src/models/json-schema/user-webhook.ts new file mode 100644 index 0000000000..8ea0991716 --- /dev/null +++ b/packages/backend/src/models/json-schema/user-webhook.ts @@ -0,0 +1,55 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { webhookEventTypes } from '@/models/Webhook.js'; + +export const packedUserWebhookSchema = { + type: 'object', + properties: { + id: { + type: 'string', + format: 'id', + optional: false, nullable: false, + }, + userId: { + type: 'string', + format: 'id', + optional: false, nullable: false, + }, + name: { + type: 'string', + optional: false, nullable: false, + }, + on: { + type: 'array', + items: { + type: 'string', + optional: false, nullable: false, + enum: webhookEventTypes, + }, + }, + url: { + type: 'string', + optional: false, nullable: false, + }, + secret: { + type: 'string', + optional: false, nullable: false, + }, + active: { + type: 'boolean', + optional: false, nullable: false, + }, + latestSentAt: { + type: 'string', + format: 'date-time', + optional: false, nullable: true, + }, + latestStatus: { + type: 'integer', + optional: false, nullable: true, + }, + }, +} as const; diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts index 394c178f2a..8a3ba9e026 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts @@ -21,29 +21,7 @@ export const meta = { type: 'array', items: { type: 'object', - properties: { - id: { - type: 'string', - format: 'misskey:id', - }, - userId: { - type: 'string', - format: 'misskey:id', - }, - name: { type: 'string' }, - on: { - type: 'array', - items: { - type: 'string', - enum: webhookEventTypes, - }, - }, - url: { type: 'string' }, - secret: { type: 'string' }, - active: { type: 'boolean' }, - latestSentAt: { type: 'string', format: 'date-time', nullable: true }, - latestStatus: { type: 'integer', nullable: true }, - }, + ref: 'UserWebhook', }, }, } as const; @@ -65,19 +43,17 @@ export default class extends Endpoint { // eslint- userId: me.id, }); - return webhooks.map(webhook => ( - { - id: webhook.id, - userId: webhook.userId, - name: webhook.name, - on: webhook.on, - url: webhook.url, - secret: webhook.secret, - active: webhook.active, - latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null, - latestStatus: webhook.latestStatus, - } - )); + return webhooks.map(webhook => ({ + id: webhook.id, + userId: webhook.userId, + name: webhook.name, + on: webhook.on, + url: webhook.url, + secret: webhook.secret, + active: webhook.active, + latestSentAt: webhook.latestSentAt ? webhook.latestSentAt.toISOString() : null, + latestStatus: webhook.latestStatus, + })); }); } } diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts index 4a0c09ff0c..1c19081c98 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts @@ -28,29 +28,7 @@ export const meta = { res: { type: 'object', - properties: { - id: { - type: 'string', - format: 'misskey:id', - }, - userId: { - type: 'string', - format: 'misskey:id', - }, - name: { type: 'string' }, - on: { - type: 'array', - items: { - type: 'string', - enum: webhookEventTypes, - }, - }, - url: { type: 'string' }, - secret: { type: 'string' }, - active: { type: 'boolean' }, - latestSentAt: { type: 'string', format: 'date-time', nullable: true }, - latestStatus: { type: 'integer', nullable: true }, - }, + ref: 'UserWebhook', }, } as const; diff --git a/packages/frontend/src/pages/settings/navbar.vue b/packages/frontend/src/pages/settings/navbar.vue index 09c1199d0c..f7c634b42e 100644 --- a/packages/frontend/src/pages/settings/navbar.vue +++ b/packages/frontend/src/pages/settings/navbar.vue @@ -91,7 +91,7 @@ async function addItem() { value: '-', text: i18n.ts.divider, }], }); - if (canceled) return; + if (canceled || item == null) return; items.value = [...items.value, { id: genId(), type: item, From bf82b4963357161df2b310ec40992636c54d90b9 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 16:27:16 +0900 Subject: [PATCH 12/45] refactor --- packages/frontend/src/pages/emoji-edit-dialog.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/frontend/src/pages/emoji-edit-dialog.vue b/packages/frontend/src/pages/emoji-edit-dialog.vue index b4fc4a46d9..201ce003f0 100644 --- a/packages/frontend/src/pages/emoji-edit-dialog.vue +++ b/packages/frontend/src/pages/emoji-edit-dialog.vue @@ -156,12 +156,9 @@ async function done() { isSensitive: isSensitive.value, localOnly: localOnly.value, roleIdsThatCanBeUsedThisEmojiAsReaction: rolesThatCanBeUsedThisEmojiAsReaction.value.map(x => x.id), + fileId: file.value ? file.value.id : undefined, }; - if (file.value) { - params.fileId = file.value.id; - } - if (props.emoji) { await os.apiWithDialog('admin/emoji/update', { id: props.emoji.id, @@ -177,7 +174,12 @@ async function done() { windowEl.value?.close(); } else { - const created = await os.apiWithDialog('admin/emoji/add', params); + if (params.fileId == null) return; + + const created = await os.apiWithDialog('admin/emoji/add', { + ...params, + fileId: params.fileId, // TSを黙らすため + }); emit('done', { created: created, From 575379a6838ef71fa0a5bd52d81308bc5f8426a8 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 27 Aug 2025 16:48:32 +0900 Subject: [PATCH 13/45] refactor --- packages/frontend/src/components/MkWidgets.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/MkWidgets.vue b/packages/frontend/src/components/MkWidgets.vue index f606b0b001..08a018ea9b 100644 --- a/packages/frontend/src/components/MkWidgets.vue +++ b/packages/frontend/src/components/MkWidgets.vue @@ -51,6 +51,7 @@ export type DefaultStoredWidget = { diff --git a/packages/frontend/src/utility/drive.ts b/packages/frontend/src/utility/drive.ts index 5ff066f61b..fb2825e7f7 100644 --- a/packages/frontend/src/utility/drive.ts +++ b/packages/frontend/src/utility/drive.ts @@ -300,15 +300,13 @@ export async function createCroppedImageDriveFileFromImageDriveFile(imageDriveFi }); } -export async function selectDriveFolder(initialFolder: Misskey.entities.DriveFolder['id'] | null): Promise { +export async function selectDriveFolder(initialFolder: Misskey.entities.DriveFolder['id'] | null): Promise<(Misskey.entities.DriveFolder | null)[]> { return new Promise(async resolve => { const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkDriveFolderSelectDialog.vue').then(x => x.default), { initialFolder, }, { done: folders => { - if (folders) { - resolve(folders); - } + resolve(folders); }, closed: () => dispose(), }); From 25c2007f59e1d0592e2de5911fed7bfd7f094f33 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 28 Aug 2025 10:39:39 +0900 Subject: [PATCH 22/45] build-misskey-js-with-types (#16470) --- packages/misskey-js/src/autogen/types.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index be24e3ec5f..908a9289f3 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -9329,8 +9329,10 @@ export interface operations { mcaptchaSecretKey: string | null; recaptchaSecretKey: string | null; turnstileSecretKey: string | null; - sensitiveMediaDetection: string; - sensitiveMediaDetectionSensitivity: string; + /** @enum {string} */ + sensitiveMediaDetection: 'none' | 'all' | 'local' | 'remote'; + /** @enum {string} */ + sensitiveMediaDetectionSensitivity: 'medium' | 'low' | 'high' | 'veryLow' | 'veryHigh'; setSensitiveFlagAutomatically: boolean; enableSensitiveMediaDetectionForVideos: boolean; /** Format: id */ From 3e2441998107d37f9d0f683430c5dedd4c5cd0b5 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:15:17 +0900 Subject: [PATCH 23/45] refactor --- packages/frontend/src/components/MkDrive.vue | 3 ++- packages/frontend/src/components/MkLaunchPad.vue | 3 ++- packages/frontend/src/components/form/suspense.vue | 2 +- packages/frontend/src/pages/about.emojis.vue | 2 +- packages/frontend/src/pages/channels.vue | 5 +++++ packages/frontend/src/pages/explore.users.vue | 13 ++++--------- .../frontend/src/pages/settings/notifications.vue | 6 +----- packages/frontend/src/ui/_common_/navbar-h.vue | 6 +++++- 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue index 83169496ff..9f1364aec4 100644 --- a/packages/frontend/src/components/MkDrive.vue +++ b/packages/frontend/src/components/MkDrive.vue @@ -152,11 +152,12 @@ import { getDriveFileMenu } from '@/utility/get-drive-file-menu.js'; import { Paginator } from '@/utility/paginator.js'; const props = withDefaults(defineProps<{ - initialFolder?: Misskey.entities.DriveFolder['id'] | null; + initialFolder?: Misskey.entities.DriveFolder | Misskey.entities.DriveFolder['id'] | null; type?: string; multiple?: boolean; select?: 'file' | 'folder' | null; }>(), { + initialFolder: null, multiple: false, select: null, }); diff --git a/packages/frontend/src/components/MkLaunchPad.vue b/packages/frontend/src/components/MkLaunchPad.vue index 584afff55c..d8725ade0b 100644 --- a/packages/frontend/src/components/MkLaunchPad.vue +++ b/packages/frontend/src/components/MkLaunchPad.vue @@ -34,9 +34,10 @@ import { deviceKind } from '@/utility/device-kind.js'; import { prefer } from '@/preferences.js'; const props = withDefaults(defineProps<{ - anchorElement?: HTMLElement; + anchorElement?: HTMLElement | null; anchor?: { x: string; y: string; }; }>(), { + anchorElement: null, anchor: () => ({ x: 'right', y: 'center' }), }); diff --git a/packages/frontend/src/components/form/suspense.vue b/packages/frontend/src/components/form/suspense.vue index 821f07510b..3b23acf612 100644 --- a/packages/frontend/src/components/form/suspense.vue +++ b/packages/frontend/src/components/form/suspense.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
diff --git a/packages/frontend/src/pages/about.emojis.vue b/packages/frontend/src/pages/about.emojis.vue index 43133bb573..7e514c5a73 100644 --- a/packages/frontend/src/pages/about.emojis.vue +++ b/packages/frontend/src/pages/about.emojis.vue @@ -48,7 +48,7 @@ import { $i } from '@/i.js'; const customEmojiTags = getCustomEmojiTags(); const q = ref(''); -const searchEmojis = ref(null); +const searchEmojis = ref(null); const selectedTags = ref(new Set()); function search() { diff --git a/packages/frontend/src/pages/channels.vue b/packages/frontend/src/pages/channels.vue index 324e0c573a..1e7301d06d 100644 --- a/packages/frontend/src/pages/channels.vue +++ b/packages/frontend/src/pages/channels.vue @@ -110,6 +110,11 @@ async function search() { const type = searchType.value.toString().trim(); + if (type !== 'nameAndDescription' && type !== 'nameOnly') { + console.error(`Unrecognized search type: ${type}`); + return; + } + channelPaginator.value = markRaw(new Paginator('channels/search', { limit: 10, params: { diff --git a/packages/frontend/src/pages/explore.users.vue b/packages/frontend/src/pages/explore.users.vue index 72f2a6813c..08f9f5e582 100644 --- a/packages/frontend/src/pages/explore.users.vue +++ b/packages/frontend/src/pages/explore.users.vue @@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
@@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- + @@ -78,22 +78,17 @@ const props = defineProps<{ }>(); const origin = ref('local'); -const tagsEl = useTemplateRef('tagsEl'); const tagsLocal = ref([]); const tagsRemote = ref([]); -watch(() => props.tag, () => { - if (tagsEl.value) tagsEl.value.toggleContent(props.tag == null); -}); - -const tagUsersPaginator = markRaw(new Paginator('hashtags/users', { +const tagUsersPaginator = props.tag != null ? markRaw(new Paginator('hashtags/users', { limit: 30, params: { tag: props.tag, origin: 'combined', sort: '+follower', }, -})); +})) : null; const pinnedUsersPaginator = markRaw(new Paginator('pinned-users', { noPaging: true, diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue index 2f2b57bdaf..84ecc23e84 100644 --- a/packages/frontend/src/pages/settings/notifications.vue +++ b/packages/frontend/src/pages/settings/notifications.vue @@ -55,11 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +
diff --git a/packages/frontend/src/ui/_common_/navbar-h.vue b/packages/frontend/src/ui/_common_/navbar-h.vue index 4f91078893..a78bdd52d1 100644 --- a/packages/frontend/src/ui/_common_/navbar-h.vue +++ b/packages/frontend/src/ui/_common_/navbar-h.vue @@ -57,6 +57,7 @@ import { i18n } from '@/i18n.js'; import { prefer } from '@/preferences.js'; import { openAccountMenu as openAccountMenu_ } from '@/accounts.js'; import { $i } from '@/i.js'; +import { getHTMLElementOrNull } from '@/utility/get-dom-node-or-null.js'; const WINDOW_THRESHOLD = 1400; @@ -72,8 +73,11 @@ const otherNavItemIndicated = computed(() => { }); async function more(ev: MouseEvent) { + const target = getHTMLElementOrNull(ev.currentTarget ?? ev.target); + if (!target) return; + const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkLaunchPad.vue').then(x => x.default), { - anchorElement: ev.currentTarget ?? ev.target, + anchorElement: target, anchor: { x: 'center', y: 'bottom' }, }, { closed: () => dispose(), From 8c2b96ad37f9e7fa5401721d30faba3e3f106732 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:16:40 +0900 Subject: [PATCH 24/45] lint --- packages/backend/src/core/WebhookTestService.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/core/WebhookTestService.ts b/packages/backend/src/core/WebhookTestService.ts index 907b5ea6be..6714bda9a9 100644 --- a/packages/backend/src/core/WebhookTestService.ts +++ b/packages/backend/src/core/WebhookTestService.ts @@ -244,7 +244,6 @@ export class WebhookTestService { case 'reaction': return; default: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars const _exhaustiveAssertion: never = params.type; return; } @@ -327,7 +326,6 @@ export class WebhookTestService { break; } default: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars const _exhaustiveAssertion: never = params.type; return; } @@ -412,7 +410,7 @@ export class WebhookTestService { name: user.name, username: user.username, host: user.host, - avatarUrl: user.avatarId == null ? null : user.avatarUrl, + avatarUrl: (user.avatarId == null ? null : user.avatarUrl) ?? '', avatarBlurhash: user.avatarId == null ? null : user.avatarBlurhash, avatarDecorations: user.avatarDecorations.map(it => ({ id: it.id, From ff6f1159767808b78cc8cda45d5097e387aecece Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:30:03 +0900 Subject: [PATCH 25/45] refactor --- packages/backend/src/core/entities/UserEntityService.ts | 4 ++-- packages/backend/src/models/json-schema/user.ts | 4 ++-- packages/frontend/src/pages/user/index.activity.vue | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 6abf205a56..4237de7170 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -471,8 +471,8 @@ export class UserEntityService implements OnModuleInit { (profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount : null; - const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : null; - const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : null; + const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保 + const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保 const unreadAnnouncements = isMe && isDetailed ? (await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({ createdAt: this.idService.parse(announcement.id).date.toISOString(), diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index dfefcd96f2..d4b22cc403 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -465,11 +465,11 @@ export const packedMeDetailedOnlySchema = { }, isModerator: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保 }, isAdmin: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保 }, injectFeaturedNote: { type: 'boolean', diff --git a/packages/frontend/src/pages/user/index.activity.vue b/packages/frontend/src/pages/user/index.activity.vue index 45bc35067b..210021618e 100644 --- a/packages/frontend/src/pages/user/index.activity.vue +++ b/packages/frontend/src/pages/user/index.activity.vue @@ -34,7 +34,7 @@ const props = withDefaults(defineProps<{ limit: 50, }); -const chartSrc = ref('per-user-notes'); +const chartSrc = ref<'per-user-notes' | 'per-user-pv'>('per-user-notes'); function showMenu(ev: MouseEvent) { os.popupMenu([{ From fc1693f768ee997253da6bbc70bbbd6ed580e216 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:39:54 +0900 Subject: [PATCH 26/45] =?UTF-8?q?=E3=81=9D=E3=82=82=E3=81=9D=E3=82=82null?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=82=8B=E3=81=93=E3=81=A8=E3=81=AF=E3=81=82?= =?UTF-8?q?=E3=82=8A=E5=BE=97=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/entities/UserEntityService.ts | 4 ++-- packages/backend/src/models/json-schema/user.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 4237de7170..47021359e1 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -471,8 +471,8 @@ export class UserEntityService implements OnModuleInit { (profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount : null; - const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保 - const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保 + const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : undefined; + const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : undefined; const unreadAnnouncements = isMe && isDetailed ? (await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({ createdAt: this.idService.parse(announcement.id).date.toISOString(), diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index d4b22cc403..c507d8d5c6 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -465,11 +465,11 @@ export const packedMeDetailedOnlySchema = { }, isModerator: { type: 'boolean', - nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保 + nullable: false, optional: false, }, isAdmin: { type: 'boolean', - nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保 + nullable: false, optional: false, }, injectFeaturedNote: { type: 'boolean', From 084ccf5c9a99c7bb0ed0e906a8ad430aac7ec67d Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 28 Aug 2025 11:45:46 +0900 Subject: [PATCH 27/45] build-misskey-js-with-types (#16471) * build-misskey-js-with-types * build-misskey-js-with-types --- packages/misskey-js/src/autogen/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 908a9289f3..d92ef599f3 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4058,8 +4058,8 @@ export type components = { /** Format: id */ bannerId: string | null; followedMessage: string | null; - isModerator: boolean | null; - isAdmin: boolean | null; + isModerator: boolean; + isAdmin: boolean; injectFeaturedNote: boolean; receiveAnnouncementEmail: boolean; alwaysMarkNsfw: boolean; From cfd4d7c57b565fc5c592f0a03079c4a7527d4f7e Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:20:11 +0900 Subject: [PATCH 28/45] refactor --- .../src/components/MkChannelList.stories.impl.ts | 10 +++------- packages/frontend/src/components/MkSignin.password.vue | 2 +- .../src/components/global/MkAd.stories.impl.ts | 7 +++---- .../src/components/global/StackingRouterView.vue | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/frontend/src/components/MkChannelList.stories.impl.ts b/packages/frontend/src/components/MkChannelList.stories.impl.ts index 867526ea5e..33a61c8f7a 100644 --- a/packages/frontend/src/components/MkChannelList.stories.impl.ts +++ b/packages/frontend/src/components/MkChannelList.stories.impl.ts @@ -3,14 +3,13 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ -/* eslint-disable import/no-default-export */ -import type { StoryObj } from '@storybook/vue3'; import { HttpResponse, http } from 'msw'; import { action } from 'storybook/actions'; import { channel } from '../../.storybook/fakes.js'; import { commonHandlers } from '../../.storybook/mocks.js'; import MkChannelList from './MkChannelList.vue'; +import type { StoryObj } from '@storybook/vue3'; +import { Paginator } from '@/utility/paginator.js'; export const Default = { render(args) { return { @@ -33,10 +32,7 @@ export const Default = { }; }, args: { - pagination: { - endpoint: 'channels/search', - limit: 10, - }, + paginator: new Paginator('channels/search', {}), }, parameters: { chromatic: { diff --git a/packages/frontend/src/components/MkSignin.password.vue b/packages/frontend/src/components/MkSignin.password.vue index cd003a39df..3b3b6a0b73 100644 --- a/packages/frontend/src/components/MkSignin.password.vue +++ b/packages/frontend/src/components/MkSignin.password.vue @@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +
{{ i18n.ts.continue }} diff --git a/packages/frontend/src/components/global/MkAd.stories.impl.ts b/packages/frontend/src/components/global/MkAd.stories.impl.ts index c5a928b5cf..07e06a6897 100644 --- a/packages/frontend/src/components/global/MkAd.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAd.stories.impl.ts @@ -2,11 +2,10 @@ * SPDX-FileCopyrightText: syuilo and misskey-project * SPDX-License-Identifier: AGPL-3.0-only */ - -/* eslint-disable @typescript-eslint/explicit-function-return-type */ + import { expect, userEvent, waitFor, within } from '@storybook/test'; -import type { StoryObj } from '@storybook/vue3'; import MkAd from './MkAd.vue'; +import type { StoryObj } from '@storybook/vue3'; import { i18n } from '@/i18n.js'; const common = { @@ -68,7 +67,7 @@ const common = { await expect(imgAgain).toBeInTheDocument(); }, args: { - prefer: [], + preferForms: [], specify: { id: 'someadid', ratio: 1, diff --git a/packages/frontend/src/components/global/StackingRouterView.vue b/packages/frontend/src/components/global/StackingRouterView.vue index 9e47517244..4c56767608 100644 --- a/packages/frontend/src/components/global/StackingRouterView.vue +++ b/packages/frontend/src/components/global/StackingRouterView.vue @@ -87,7 +87,7 @@ router.useListener('change', ({ resolved }) => { const fullPath = router.getCurrentFullPath(); if (tabs.value.some(tab => tab.routePath === routePath && deepEqual(resolved.props, tab.props))) { - const newTabs = []; + const newTabs = [] as typeof tabs.value; for (const tab of tabs.value) { newTabs.push(tab); From bca3602da2764a3ee044e0e836666b65dad435ef Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:24:25 +0900 Subject: [PATCH 29/45] refactor --- .../components/MkStreamingNotificationsTimeline.vue | 2 +- packages/frontend/src/pages/flash/flash.vue | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue b/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue index 93ffee8d98..15e8e2105f 100644 --- a/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue +++ b/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue @@ -59,7 +59,7 @@ import { isSeparatorNeeded, getSeparatorInfo } from '@/utility/timeline-date-sep import { Paginator } from '@/utility/paginator.js'; const props = defineProps<{ - excludeTypes?: typeof notificationTypes[number][]; + excludeTypes?: typeof notificationTypes[number][] | null; }>(); const rootEl = useTemplateRef('rootEl'); diff --git a/packages/frontend/src/pages/flash/flash.vue b/packages/frontend/src/pages/flash/flash.vue index 560d2a46ea..f318a9f817 100644 --- a/packages/frontend/src/pages/flash/flash.vue +++ b/packages/frontend/src/pages/flash/flash.vue @@ -196,13 +196,13 @@ async function run() { const isLegacy = !flash.value.script.replaceAll(' ', '').startsWith('///@1.0.0'); - const { Interpreter, Parser, values } = isLegacy ? await import('@syuilo/aiscript-0-19-0') : await import('@syuilo/aiscript'); + const { Interpreter, Parser, values } = isLegacy ? (await import('@syuilo/aiscript-0-19-0') as any) : await import('@syuilo/aiscript'); const parser = new Parser(); components.value = []; - aiscript.value = new Interpreter({ + const interpreter = new Interpreter({ ...createAiScriptEnv({ storageKey: 'flash:' + flash.value.id, }), @@ -221,6 +221,8 @@ async function run() { }, }); + aiscript.value = interpreter; + let ast; try { ast = parser.parse(flash.value.script); @@ -232,8 +234,8 @@ async function run() { return; } try { - await aiscript.value.exec(ast); - } catch (err) { + await interpreter.exec(ast); + } catch (err: any) { os.alert({ type: 'error', title: 'AiScript Error', From 8b347e23e3cf20b8377285535ec6b271291f85da Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:30:52 +0900 Subject: [PATCH 30/45] refactor --- packages/frontend/src/pages/api-console.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/frontend/src/pages/api-console.vue b/packages/frontend/src/pages/api-console.vue index 7571696b84..f436fc72fa 100644 --- a/packages/frontend/src/pages/api-console.vue +++ b/packages/frontend/src/pages/api-console.vue @@ -68,6 +68,11 @@ function send() { function onEndpointChange() { misskeyApi('endpoint', { endpoint: endpoint.value }, withCredential.value ? undefined : null).then(resp => { + if (resp == null) { + body.value = '{}'; + return; + } + const endpointBody = {}; for (const p of resp.params) { endpointBody[p.name] = From 195a80622bf8f77a48e7b380741109ccf07e0468 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:31:05 +0900 Subject: [PATCH 31/45] New Crowdin updates (#16457) * New translations ja-jp.yml (Spanish) * New translations ja-jp.yml (Catalan) * New translations ja-jp.yml (Italian) * New translations ja-jp.yml (English) * New translations ja-jp.yml (Chinese Simplified) * New translations ja-jp.yml (Korean) * New translations ja-jp.yml (Turkish) * New translations ja-jp.yml (Chinese Traditional) * New translations ja-jp.yml (Chinese Simplified) * New translations ja-jp.yml (Catalan) * New translations ja-jp.yml (Chinese Traditional) * New translations ja-jp.yml (Chinese Simplified) * New translations ja-jp.yml (Chinese Traditional) * New translations ja-jp.yml (Catalan) * New translations ja-jp.yml (Italian) * New translations ja-jp.yml (Spanish) * New translations ja-jp.yml (Italian) * New translations ja-jp.yml (Korean) * New translations ja-jp.yml (English) --- locales/ca-ES.yml | 3 ++- locales/en-US.yml | 5 ++--- locales/es-ES.yml | 3 ++- locales/it-IT.yml | 3 ++- locales/ko-KR.yml | 3 ++- locales/tr-TR.yml | 1 - locales/zh-CN.yml | 3 ++- locales/zh-TW.yml | 3 ++- 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index f1a97bb63b..8180ee0bd8 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -1668,7 +1668,7 @@ _serverSettings: restartServerSetupWizardConfirm_text: "Algunes configuracions actuals seran restablertes." entrancePageStyle: "Estil de la pàgina d'inici" showTimelineForVisitor: "Mostrar la línia de temps" - showActivityiesForVisitor: "Mostrar les activitats" + showActivitiesForVisitor: "Mostrar activitat" _userGeneratedContentsVisibilityForVisitor: all: "Tot obert al públic " localOnly: "Només es publiquen els continguts locals, el contingut remot es manté privat" @@ -3120,6 +3120,7 @@ _serverSetupWizard: youCanConfigureMoreFederationSettingsLater: "Les configuracions avançades, com especificar els servidors amb els quals es pot federar, es poden fer més tard." remoteContentsCleaning: "Neteja automàtica del contingut rebut" remoteContentsCleaning_description: "Quan es comença a federar es rep un munt de contingut, quan s'activa la neteja automàtica el contingut antic que no es consulta serà eliminat del servidor, el que permet estalviar espai d'emmagatzematge." + remoteContentsCleaning_description2: "Alguns mètodes de referència, com els enllaços, no poden ser detectats pel sistema." adminInfo: "Informació de l'administrador " adminInfo_description: "Estableix la informació de l'administrador que es farà servir per rebre consultes." adminInfo_mustBeFilled: "Aquesta informació ha de ser omplerta si el servidor té els registres oberts o la federació es troba activada." diff --git a/locales/en-US.yml b/locales/en-US.yml index b8a9fdbc44..d9c8374fad 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1218,8 +1218,8 @@ showRepliesToOthersInTimeline: "Show replies to others in timeline" hideRepliesToOthersInTimeline: "Hide replies to others from timeline" showRepliesToOthersInTimelineAll: "Show replies to others from everyone you follow in timeline" hideRepliesToOthersInTimelineAll: "Hide replies to others from everyone you follow in timeline" -confirmShowRepliesAll: "This operation is irreversible. Would you really like to show replies to others from everyone you follow in your timeline?" -confirmHideRepliesAll: "This operation is irreversible. Would you really like to hide replies to others from everyone you follow in your timeline?" +confirmShowRepliesAll: "Are you sure you want to show replies from everyone you follow in your timeline? This action is irreversible." +confirmHideRepliesAll: "Are you sure you want to hide replies from everyone you follow in your timeline? This action is irreversible." externalServices: "External Services" sourceCode: "Source code" sourceCodeIsNotYetProvided: "Source code is not yet available. Contact the administrator to fix this problem." @@ -1668,7 +1668,6 @@ _serverSettings: restartServerSetupWizardConfirm_text: "Some current settings will be reset." entrancePageStyle: "Entrance page style" showTimelineForVisitor: "Show timeline" - showActivityiesForVisitor: "Show activities" _userGeneratedContentsVisibilityForVisitor: all: "Everything is public" localOnly: "Only local content is published, remote content is kept private" diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 5d01c20e05..c8b17dee71 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -1668,7 +1668,7 @@ _serverSettings: restartServerSetupWizardConfirm_text: "Algunas configuraciones actuales se restablecerán" entrancePageStyle: "Estilo de la página de inicio" showTimelineForVisitor: "Mostrar la línea de tiempo" - showActivityiesForVisitor: "Mostrar actividades" + showActivitiesForVisitor: "Mostrar actividades" _userGeneratedContentsVisibilityForVisitor: all: "Todo es público." localOnly: "Sólo se publica el contenido local, el remoto se mantiene privado" @@ -3120,6 +3120,7 @@ _serverSetupWizard: youCanConfigureMoreFederationSettingsLater: "Los ajustes avanzados, como la especificación de servidores federados, pueden configurarse más adelante." remoteContentsCleaning: "Limpieza automática de los contenidos recibidos" remoteContentsCleaning_description: "La federación puede dar lugar a un flujo continuo de contenido. Al habilitar la limpieza automática, se eliminará del servidor el contenido obsoleto y sin referencias para ahorrar espacio de almacenamiento." + remoteContentsCleaning_description2: "Ciertos métodos de referencia, como los hipervínculos, no pueden ser detectados por el sistema." adminInfo: "Información del administrador" adminInfo_description: "Establece la información del administrador para recibir consultas." adminInfo_mustBeFilled: "Esta información debe ser introducida en el caso de registros abiertos o la federación esté activada." diff --git a/locales/it-IT.yml b/locales/it-IT.yml index 9d91e558f9..410e9b3aae 100644 --- a/locales/it-IT.yml +++ b/locales/it-IT.yml @@ -1668,7 +1668,7 @@ _serverSettings: restartServerSetupWizardConfirm_text: "Verranno ripristinate alcune tue impostazioni personalizzate." entrancePageStyle: "Stile della pagina di ingresso" showTimelineForVisitor: "Mostra la Timeline a visitatori non autenticati" - showActivityiesForVisitor: "Mostra le attività a visitatori non autenticati" + showActivitiesForVisitor: "Mostrare la propria attività" _userGeneratedContentsVisibilityForVisitor: all: "Tutto pubblico" localOnly: "Pubblica solo contenuti locali, mantieni privati ​​i contenuti remoti" @@ -3120,6 +3120,7 @@ _serverSetupWizard: youCanConfigureMoreFederationSettingsLater: "Puoi svolgere la configurazione avanzata anche dopo. Ad esempio specificando quali server possono federarsi." remoteContentsCleaning: "Pulizia automatica dei contenuti in arrivo" remoteContentsCleaning_description: "Con la federazione funzionante, riceverai sempre più contenuti. Abilitando la pulizia automatica, i contenuti non referenziati e obsoleti verranno rimossi automaticamente dai tuoi server, risparmiando spazio di archiviazione." + remoteContentsCleaning_description2: "Alcuni metodi di riferimento, come i collegamenti ipertestuali, non possono essere rilevati sul sistema." adminInfo: "Informazioni sull'amministratore" adminInfo_description: "Imposta le informazioni dell'amministratore utilizzate per accettare le richieste." adminInfo_mustBeFilled: "Questa operazione è necessaria su un server aperto o se è attiva la federazione." diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index bcd927e758..7e8adeb9e4 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -1668,7 +1668,7 @@ _serverSettings: restartServerSetupWizardConfirm_text: "현재 일부 설정은 리셋됩니다." entrancePageStyle: "입구 페이지의 스타일" showTimelineForVisitor: "타임라인 표시" - showActivityiesForVisitor: "활동 표시" + showActivitiesForVisitor: "액티비티 표시하기" _userGeneratedContentsVisibilityForVisitor: all: "모두 공개" localOnly: "로컬 콘텐츠만 공개하고 리모트 콘텐츠는 비공개" @@ -3120,6 +3120,7 @@ _serverSetupWizard: youCanConfigureMoreFederationSettingsLater: "나중에 연합 가능한 서버의 지정 등 고급 설정을 할 수 있습니다." remoteContentsCleaning: "리모트 콘텐츠 자동 정리" remoteContentsCleaning_description: "연합 중인 서버가 있는 경우, 리모트 서버에서 대단히 많은 콘텐츠를 받아오게 됩니다. 자동 정리 기능을 활성화하면, 오래되고 서버에서 더 이상 조회되지 않는 콘텐츠를 자동으로 서버에서 삭제하여, 스토리지를 절약할 수 있습니다." + remoteContentsCleaning_description2: "로컬 내 원격 콘텐츠로의 하이퍼링크는 깨진 링크로 됩니다." adminInfo: "관리자 정보" adminInfo_description: "문의 접수를 위해 사용되는 관리자 정보를 설정합니다." adminInfo_mustBeFilled: "오픈 서버 혹은 연합이 켜져 있는 경우 반드시 입력해야 합니다." diff --git a/locales/tr-TR.yml b/locales/tr-TR.yml index 2efb51f08f..bde027ba69 100644 --- a/locales/tr-TR.yml +++ b/locales/tr-TR.yml @@ -1668,7 +1668,6 @@ _serverSettings: restartServerSetupWizardConfirm_text: "Bazı mevcut ayarlar sıfırlanacaktır." entrancePageStyle: "Giriş sayfası stili" showTimelineForVisitor: "Panoyu göster" - showActivityiesForVisitor: "Aktiviteleri göster" _userGeneratedContentsVisibilityForVisitor: all: "Her şey halka açıktır." localOnly: "Yalnızca yerel içerik yayınlanır, uzak içerik gizli tutulur." diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 08f3fda096..3c203ce36b 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1668,7 +1668,7 @@ _serverSettings: restartServerSetupWizardConfirm_text: "现有的部分设定将重置。" entrancePageStyle: "入口页面样式" showTimelineForVisitor: "显示时间线" - showActivityiesForVisitor: "显示活动" + showActivitiesForVisitor: "显示活动" _userGeneratedContentsVisibilityForVisitor: all: "全部公开" localOnly: "仅公开本地内容,隐藏远程内容" @@ -3120,6 +3120,7 @@ _serverSetupWizard: youCanConfigureMoreFederationSettingsLater: "可在之后进行如哪些服务器可以进行联合等高级设置。" remoteContentsCleaning: "自动清理传入内容" remoteContentsCleaning_description: "加入联合后,服务器将持续接收大量内容。打开自动清理后,将自动删除无法找到的旧内容,可节省存储空间。" + remoteContentsCleaning_description2: "如超链接之类的某些引用方法无法被系统检测到。" adminInfo: "管理员信息" adminInfo_description: "设置用于接受询问的管理员信息。" adminInfo_mustBeFilled: "开放服务器或开启了联合的情况下必须输入。" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 1656896133..80566a01c8 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1668,7 +1668,7 @@ _serverSettings: restartServerSetupWizardConfirm_text: "當前的部分設定將會被重設。" entrancePageStyle: "入口頁面的樣式" showTimelineForVisitor: "顯示時間軸" - showActivityiesForVisitor: "顯示活動" + showActivitiesForVisitor: "顯示活動" _userGeneratedContentsVisibilityForVisitor: all: "全部公開\n" localOnly: "僅公開本地內容,遠端內容則不公開\n" @@ -3120,6 +3120,7 @@ _serverSetupWizard: youCanConfigureMoreFederationSettingsLater: "您可以在稍後進行更高級的設定,例如指定可以聯繫的伺服器等。\n" remoteContentsCleaning: "自動清理接收的內容" remoteContentsCleaning_description: "進行聯邦後,會持續接收大量內容。啟用自動清理功能後,系統會自動從伺服器中刪除未被參照的過時內容,以節省儲存空間。" + remoteContentsCleaning_description2: "有些引用方式系統上無法檢測到,例如超連結。" adminInfo: "管理員資訊" adminInfo_description: "設定用於接收查詢的管理者資訊。\n" adminInfo_mustBeFilled: "當設置為開放伺服器或啟用聯邦時,必須填寫此資訊。\n" From 9cd918f12b1f47f437712eed472acde496705a10 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Aug 2025 05:33:23 +0000 Subject: [PATCH 32/45] Bump version to 2025.8.0-beta.5 --- package.json | 2 +- packages/misskey-js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index efac6ec621..6bcb0bd460 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2025.8.0-beta.4", + "version": "2025.8.0-beta.5", "codename": "nasubi", "repository": { "type": "git", diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index 60dcca35ee..de5dfeea3d 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "misskey-js", - "version": "2025.8.0-beta.4", + "version": "2025.8.0-beta.5", "description": "Misskey SDK for JavaScript", "license": "MIT", "main": "./built/index.js", From f0833cffe9342cca0dc4ea7420acee56e686f643 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 19:47:58 +0900 Subject: [PATCH 33/45] refactor --- packages/frontend/src/components/global/MkAvatar.vue | 1 - .../frontend/src/components/global/RouterView.vue | 12 ++++-------- packages/frontend/src/pages/settings/webhook.new.vue | 3 ++- packages/frontend/src/preferences/manager.ts | 2 ++ 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index 8a9cc5286a..c2548cc7be 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -84,7 +84,6 @@ const bound = computed(() => props.link : {}); const url = computed(() => { - if (props.user.avatarUrl == null) return null; if (prefer.s.disableShowingAnimatedImages || prefer.s.dataSaver.avatar) return getStaticImageUrl(props.user.avatarUrl); return props.user.avatarUrl; }); diff --git a/packages/frontend/src/components/global/RouterView.vue b/packages/frontend/src/components/global/RouterView.vue index 3a508eaca0..d42beb531d 100644 --- a/packages/frontend/src/components/global/RouterView.vue +++ b/packages/frontend/src/components/global/RouterView.vue @@ -54,14 +54,10 @@ router.useListener('change', ({ resolved }) => { if (resolved == null || 'redirect' in resolved.route) return; if (resolved.route.path === currentRoutePath && deepEqual(resolved.props, currentPageProps.value)) return; - function _() { - currentPageComponent.value = resolved.route.component; - currentPageProps.value = resolved.props; - key.value = router.getCurrentFullPath(); - currentRoutePath = resolved.route.path; - } - - _(); + currentPageComponent.value = resolved.route.component; + currentPageProps.value = resolved.props; + key.value = router.getCurrentFullPath(); + currentRoutePath = resolved.route.path; }); diff --git a/packages/frontend/src/pages/settings/webhook.new.vue b/packages/frontend/src/pages/settings/webhook.new.vue index 6c4dff5551..5f36e6bcfc 100644 --- a/packages/frontend/src/pages/settings/webhook.new.vue +++ b/packages/frontend/src/pages/settings/webhook.new.vue @@ -40,6 +40,7 @@ SPDX-License-Identifier: AGPL-3.0-only