@@ -244,6 +247,12 @@ const maxTextLength = computed((): number => {
return instance ? instance.maxNoteTextLength : 1000;
});
+const cwTextLength = computed((): number => {
+ return cw.value?.length ?? 0;
+});
+
+const maxCwTextLength = 100;
+
const canPost = computed((): boolean => {
return !props.mock && !posting.value && !posted.value &&
(
@@ -254,6 +263,7 @@ const canPost = computed((): boolean => {
quoteId.value != null
) &&
(textLength.value <= maxTextLength.value) &&
+ (cwTextLength.value <= maxCwTextLength) &&
(files.value.length <= 16) &&
(!poll.value || poll.value.choices.length >= 2);
});
@@ -1273,12 +1283,34 @@ html[data-color-scheme=light] .preview {
}
}
+.cwOuter {
+ width: 100%;
+ position: relative;
+}
+
.cw {
z-index: 1;
padding-bottom: 8px;
border-bottom: solid 0.5px var(--MI_THEME-divider);
}
+.cwTextCount {
+ position: absolute;
+ top: 0;
+ right: 2px;
+ padding: 2px 6px;
+ font-size: .9em;
+ color: var(--MI_THEME-warn);
+ border-radius: 6px;
+ max-width: 100%;
+ min-width: 1.6em;
+ text-align: center;
+
+ &.cwTextOver {
+ color: #ff2a2a;
+ }
+}
+
.hashtags {
z-index: 1;
padding-top: 8px;
From 93e7aad44e137007ecbc16e661d372be51f637a8 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 17 Feb 2025 13:34:17 +0900
Subject: [PATCH 19/50] tweak error log
---
.../backend/src/queue/processors/InboxProcessorService.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts
index 004fe1382d..079e014da8 100644
--- a/packages/backend/src/queue/processors/InboxProcessorService.ts
+++ b/packages/backend/src/queue/processors/InboxProcessorService.ts
@@ -107,12 +107,12 @@ export class InboxProcessorService implements OnApplicationShutdown {
// それでもわからなければ終了
if (authUser == null) {
- throw new Bull.UnrecoverableError('skip: failed to resolve user');
+ throw new Bull.UnrecoverableError(`skip: failed to resolve user ${getApId(activity.actor)}`);
}
// publicKey がなくても終了
if (authUser.key == null) {
- throw new Bull.UnrecoverableError('skip: failed to resolve user publicKey');
+ throw new Bull.UnrecoverableError(`skip: failed to resolve user publicKey ${getApId(activity.actor)}`);
}
// HTTP-Signatureの検証
From 34f8345bc8330e0e53ab9e043a4b6db7b150636f Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Mon, 17 Feb 2025 14:38:15 +0900
Subject: [PATCH 20/50] clean up dev logs
---
packages/frontend-shared/js/scroll.ts | 1 -
packages/frontend/src/components/global/MkA.vue | 2 +-
packages/frontend/src/nirax.ts | 4 +---
packages/frontend/src/pizzax.ts | 13 ++++---------
4 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/packages/frontend-shared/js/scroll.ts b/packages/frontend-shared/js/scroll.ts
index 4f2e9105c3..508864b12c 100644
--- a/packages/frontend-shared/js/scroll.ts
+++ b/packages/frontend-shared/js/scroll.ts
@@ -134,7 +134,6 @@ export function scrollToBottom(
export function isTopVisible(el: HTMLElement, tolerance = 1): boolean {
const scrollTop = getScrollPosition(el);
- if (_DEV_) console.log(scrollTop, tolerance, scrollTop <= tolerance);
return scrollTop <= tolerance;
}
diff --git a/packages/frontend/src/components/global/MkA.vue b/packages/frontend/src/components/global/MkA.vue
index 87fa9c8252..8eacf16d6d 100644
--- a/packages/frontend/src/components/global/MkA.vue
+++ b/packages/frontend/src/components/global/MkA.vue
@@ -15,9 +15,9 @@ export type MkABehavior = 'window' | 'browser' | null;
diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue
index e6b4a0b222..0791c1343b 100644
--- a/packages/frontend/src/pages/note.vue
+++ b/packages/frontend/src/pages/note.vue
@@ -63,6 +63,7 @@ import { dateString } from '@/filters/date.js';
import MkClipPreview from '@/components/MkClipPreview.vue';
import { defaultStore } from '@/store.js';
import { pleaseLogin } from '@/scripts/please-login.js';
+import { getAppearNote } from '@/scripts/get-appear-note.js';
import { serverContext, assertServerContext } from '@/server-context.js';
import { $i } from '@/account.js';
@@ -132,10 +133,11 @@ function fetchNote() {
noteId: props.noteId,
}).then(res => {
note.value = res;
+ const appearNote = getAppearNote(res);
// 古いノートは被クリップ数をカウントしていないので、2023-10-01以前のものは強制的にnotes/clipsを叩く
- if (note.value.clippedCount > 0 || new Date(note.value.createdAt).getTime() < new Date('2023-10-01').getTime()) {
+ if ((appearNote.clippedCount ?? 0) > 0 || new Date(appearNote.createdAt).getTime() < new Date('2023-10-01').getTime()) {
misskeyApi('notes/clips', {
- noteId: note.value.id,
+ noteId: appearNote.id,
}).then((_clips) => {
clips.value = _clips;
});
@@ -170,7 +172,7 @@ definePageMetadata(() => ({
avatar: note.value.user,
path: `/notes/${note.value.id}`,
share: {
- title: i18n.tsx.noteOf({ user: note.value.user.name }),
+ title: i18n.tsx.noteOf({ user: note.value.user.name ?? note.value.user.username }),
text: note.value.text,
},
} : {},
From 15b0345335397ae6df8c85871793adab49343ec7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?=
<46447427+samunohito@users.noreply.github.com>
Date: Wed, 26 Feb 2025 16:28:35 +0900
Subject: [PATCH 43/50] =?UTF-8?q?enhance(frontend):=20=E3=82=B3=E3=83=B3?=
=?UTF-8?q?=E3=83=88=E3=83=AD=E3=83=BC=E3=83=AB=E3=83=91=E3=83=8D=E3=83=AB?=
=?UTF-8?q?=E3=81=AE=E3=83=A6=E3=83=BC=E3=82=B6=E6=A4=9C=E7=B4=A2=E3=81=A7?=
=?UTF-8?q?=E5=85=A5=E5=8A=9B=E3=81=95=E3=82=8C=E3=81=9F=E6=83=85=E5=A0=B1?=
=?UTF-8?q?=E3=82=92=E3=83=9A=E3=83=BC=E3=82=B8=E9=81=B7=E7=A7=BB=E3=81=A7?=
=?UTF-8?q?=E6=90=8D=E3=81=AA=E3=82=8F=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?=
=?UTF-8?q?=E3=81=AB=20(#15438)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* enhance(frontend): コントロールパネルのユーザ検索で入力された情報をページ遷移で損なわないように
* sessionStorageよりも更に短命な方法で持つように変更
* add comment
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
---
CHANGELOG.md | 1 +
packages/frontend/src/account.ts | 5 +-
packages/frontend/src/memory-storage.ts | 57 +++++++++++++++++++++
packages/frontend/src/pages/admin/users.vue | 46 ++++++++++++++---
4 files changed, 101 insertions(+), 8 deletions(-)
create mode 100644 packages/frontend/src/memory-storage.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d51369f4bb..940a4309bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@
- Enhance: 開発者モードでメニューからファイルIDをコピー出来るように `#15441'
- Enhance: ノートに埋め込まれたメディアのコンテキストメニューから管理者用のファイル管理画面を開けるように ( #15440 )
- Enhance: リアクションする際に確認ダイアログを表示できるように
+- Enhance: コントロールパネルのユーザ検索で入力された情報をページ遷移で損なわないように `#15437`
- Enhance: CWの注釈で入力済みの文字数を表示
- Fix: ノートページで、クリップ一覧が表示されないことがある問題を修正
- Fix: コンディショナルロールを手動で割り当てできる導線を削除 `#13529`
diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts
index 9006150bc8..17d690cd3a 100644
--- a/packages/frontend/src/account.ts
+++ b/packages/frontend/src/account.ts
@@ -7,6 +7,7 @@ import { defineAsyncComponent, reactive, ref } from 'vue';
import * as Misskey from 'misskey-js';
import { apiUrl } from '@@/js/config.js';
import type { MenuItem, MenuButton } from '@/types/menu.js';
+import { defaultMemoryStorage } from '@/memory-storage';
import { showSuspendedDialog } from '@/scripts/show-suspended-dialog.js';
import { i18n } from '@/i18n.js';
import { miLocalStorage } from '@/local-storage.js';
@@ -40,6 +41,8 @@ export function incNotesCount() {
export async function signout() {
if (!$i) return;
+ defaultMemoryStorage.clear();
+
waiting();
document.cookie.split(';').forEach((cookie) => {
const cookieName = cookie.split('=')[0].trim();
@@ -107,7 +110,7 @@ export async function removeAccount(idOrToken: Account['id']) {
}
function fetchAccount(token: string, id?: string, forceShowDialog?: boolean): Promise
{
- document.cookie = "token=; path=/; max-age=0";
+ document.cookie = 'token=; path=/; max-age=0';
document.cookie = `token=${token}; path=/queue; max-age=86400; SameSite=Strict; Secure`; // bull dashboardの認証とかで使う
return new Promise((done, fail) => {
diff --git a/packages/frontend/src/memory-storage.ts b/packages/frontend/src/memory-storage.ts
new file mode 100644
index 0000000000..df0dc1308f
--- /dev/null
+++ b/packages/frontend/src/memory-storage.ts
@@ -0,0 +1,57 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export type MemoryStorage = {
+ has: (key: string) => boolean;
+ getItem: (key: string) => T | null;
+ setItem: (key: string, value: unknown) => void;
+ removeItem: (key: string) => void;
+ clear: () => void;
+ size: number;
+};
+
+class MemoryStorageImpl implements MemoryStorage {
+ private readonly storage: Map;
+
+ constructor() {
+ this.storage = new Map();
+ }
+
+ has(key: string): boolean {
+ return this.storage.has(key);
+ }
+
+ getItem(key: string): T | null {
+ return this.storage.has(key) ? this.storage.get(key) as T : null;
+ }
+
+ setItem(key: string, value: unknown): void {
+ this.storage.set(key, value);
+ }
+
+ removeItem(key: string): void {
+ this.storage.delete(key);
+ }
+
+ clear(): void {
+ this.storage.clear();
+ }
+
+ get size(): number {
+ return this.storage.size;
+ }
+}
+
+export function createMemoryStorage(): MemoryStorage {
+ return new MemoryStorageImpl();
+}
+
+/**
+ * SessionStorageよりも更に短い期間でクリアされるストレージです
+ * - ブラウザの再読み込みやタブの閉じると内容が揮発します
+ * - このストレージは他のタブと共有されません
+ * - アカウント切り替えやログアウトを行うと内容が揮発します
+ */
+export const defaultMemoryStorage: MemoryStorage = createMemoryStorage();
diff --git a/packages/frontend/src/pages/admin/users.vue b/packages/frontend/src/pages/admin/users.vue
index 870c3ce88b..91104b676d 100644
--- a/packages/frontend/src/pages/admin/users.vue
+++ b/packages/frontend/src/pages/admin/users.vue
@@ -9,6 +9,9 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+ {{ i18n.ts.reset }}
+
{{ i18n.ts.sort }}
@@ -57,8 +60,10 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/pages/search.user.vue b/packages/frontend/src/pages/search.user.vue
index e8bc4cd6d3..2b8faf5465 100644
--- a/packages/frontend/src/pages/search.user.vue
+++ b/packages/frontend/src/pages/search.user.vue
@@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.searchResult }}
-
+
@@ -49,14 +49,16 @@ const props = withDefaults(defineProps<{
const router = useRouter();
-const key = ref('');
+const key = ref(0);
+const userPagination = ref
>();
+
const searchQuery = ref(toRef(props, 'query').value);
const searchOrigin = ref(toRef(props, 'origin').value);
-const userPagination = ref();
async function search() {
const query = searchQuery.value.toString().trim();
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (query == null || query === '') return;
//#region AP lookup
@@ -76,6 +78,7 @@ async function search() {
if (res.type === 'User') {
router.push(`/@${res.object.username}@${res.object.host}`);
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
} else if (res.type === 'Note') {
router.push(`/notes/${res.object.id}`);
}
@@ -118,6 +121,6 @@ async function search() {
},
};
- key.value = query;
+ key.value++;
}
diff --git a/packages/frontend/src/scripts/gen-search-query.ts b/packages/frontend/src/scripts/gen-search-query.ts
deleted file mode 100644
index a85ee01e26..0000000000
--- a/packages/frontend/src/scripts/gen-search-query.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * SPDX-FileCopyrightText: syuilo and misskey-project
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-import * as Misskey from 'misskey-js';
-import { host as localHost } from '@@/js/config.js';
-
-export async function genSearchQuery(v: any, q: string) {
- let host: string;
- let userId: string;
- if (q.split(' ').some(x => x.startsWith('@'))) {
- for (const at of q.split(' ').filter(x => x.startsWith('@')).map(x => x.substring(1))) {
- if (at.includes('.')) {
- if (at === localHost || at === '.') {
- host = null;
- } else {
- host = at;
- }
- } else {
- const user = await v.api('users/show', Misskey.acct.parse(at)).catch(x => null);
- if (user) {
- userId = user.id;
- } else {
- // todo: show error
- }
- }
- }
- }
- return {
- query: q.split(' ').filter(x => !x.startsWith('/') && !x.startsWith('@')).join(' '),
- host: host,
- userId: userId,
- };
-}
From cc09de7b27bcc3ce1145171086e65e4dcf7cacbf Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Thu, 27 Feb 2025 16:13:37 +0900
Subject: [PATCH 47/50] New Crowdin updates (#15560)
* New translations ja-jp.yml (Russian)
* New translations ja-jp.yml (Catalan)
* New translations ja-jp.yml (Korean)
* New translations ja-jp.yml (Portuguese)
* New translations ja-jp.yml (Turkish)
* New translations ja-jp.yml (Chinese Traditional)
* New translations ja-jp.yml (English)
* New translations ja-jp.yml (Japanese, Kansai)
* New translations ja-jp.yml (Romanian)
* New translations ja-jp.yml (French)
* New translations ja-jp.yml (Spanish)
* New translations ja-jp.yml (Arabic)
* New translations ja-jp.yml (Czech)
* New translations ja-jp.yml (German)
* New translations ja-jp.yml (Greek)
* New translations ja-jp.yml (Italian)
* New translations ja-jp.yml (Dutch)
* New translations ja-jp.yml (Norwegian)
* New translations ja-jp.yml (Polish)
* New translations ja-jp.yml (Slovak)
* New translations ja-jp.yml (Swedish)
* New translations ja-jp.yml (Ukrainian)
* New translations ja-jp.yml (Chinese Simplified)
* New translations ja-jp.yml (Vietnamese)
* New translations ja-jp.yml (Indonesian)
* New translations ja-jp.yml (Bengali)
* New translations ja-jp.yml (Thai)
* New translations ja-jp.yml (Uzbek)
* New translations ja-jp.yml (Lao)
* New translations ja-jp.yml (Korean (Gyeongsang))
* New translations ja-jp.yml (Catalan)
---
locales/ar-SA.yml | 4 ++++
locales/bn-BD.yml | 3 +++
locales/ca-ES.yml | 8 ++++++++
locales/cs-CZ.yml | 4 ++++
locales/de-DE.yml | 4 ++++
locales/el-GR.yml | 2 ++
locales/en-US.yml | 4 ++++
locales/es-ES.yml | 4 ++++
locales/fr-FR.yml | 4 ++++
locales/id-ID.yml | 4 ++++
locales/it-IT.yml | 4 ++++
locales/ja-KS.yml | 4 ++++
locales/ko-GS.yml | 3 +++
locales/ko-KR.yml | 4 ++++
locales/lo-LA.yml | 2 ++
locales/nl-NL.yml | 2 ++
locales/no-NO.yml | 2 ++
locales/pl-PL.yml | 3 +++
locales/pt-PT.yml | 4 ++++
locales/ro-RO.yml | 2 ++
locales/ru-RU.yml | 4 ++++
locales/sk-SK.yml | 3 +++
locales/sv-SE.yml | 2 ++
locales/th-TH.yml | 4 ++++
locales/tr-TR.yml | 2 ++
locales/uk-UA.yml | 3 +++
locales/uz-UZ.yml | 3 +++
locales/vi-VN.yml | 4 ++++
locales/zh-CN.yml | 4 ++++
locales/zh-TW.yml | 4 ++++
30 files changed, 104 insertions(+)
diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml
index 91c90ce75a..1a3eeaead3 100644
--- a/locales/ar-SA.yml
+++ b/locales/ar-SA.yml
@@ -1584,3 +1584,7 @@ _offlineScreen:
_remoteLookupErrors:
_noSuchObject:
title: "غير موجود"
+_search:
+ searchScopeAll: "الكل"
+ searchScopeLocal: "المحلي"
+ searchScopeUser: "مستخدم محدد"
diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml
index 709874ac20..d9a58ce824 100644
--- a/locales/bn-BD.yml
+++ b/locales/bn-BD.yml
@@ -1348,3 +1348,6 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "পাওয়া যায়নি"
+_search:
+ searchScopeAll: "সবগুলো"
+ searchScopeLocal: "স্থানীয়"
diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml
index d12da0676f..a42ebb0a5a 100644
--- a/locales/ca-ES.yml
+++ b/locales/ca-ES.yml
@@ -2854,3 +2854,11 @@ _bootErrors:
otherOption1: "Esborrar la configuració i la memòria cau del client"
otherOption2: "Iniciar client senzill"
otherOption3: "Iniciar l'eina de reparació "
+_search:
+ searchScopeAll: "Tot"
+ searchScopeLocal: "Local"
+ searchScopeServer: "Instància "
+ searchScopeUser: "Especificar usuari"
+ pleaseEnterServerHost: "Introdueix l'adreça de la instància "
+ pleaseSelectUser: "Selecciona un usuari"
+ serverHostPlaceholder: "Ex: misskey.example.com"
diff --git a/locales/cs-CZ.yml b/locales/cs-CZ.yml
index afa3047c1d..fea8902ab8 100644
--- a/locales/cs-CZ.yml
+++ b/locales/cs-CZ.yml
@@ -2024,3 +2024,7 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Nenalezeno"
+_search:
+ searchScopeAll: "Vše"
+ searchScopeLocal: "Místní"
+ searchScopeUser: "Upřesnit uživatele"
diff --git a/locales/de-DE.yml b/locales/de-DE.yml
index d9072683cb..30f8574594 100644
--- a/locales/de-DE.yml
+++ b/locales/de-DE.yml
@@ -2614,3 +2614,7 @@ _remoteLookupErrors:
_noSuchObject:
title: "Nicht gefunden"
description: "Die angeforderte Ressource konnte nicht gefunden werden, bitte überprüfe die URI erneut."
+_search:
+ searchScopeAll: "Alle"
+ searchScopeLocal: "Lokal"
+ searchScopeUser: "Spezifischer Benutzer"
diff --git a/locales/el-GR.yml b/locales/el-GR.yml
index 4657842ca5..272ec07d89 100644
--- a/locales/el-GR.yml
+++ b/locales/el-GR.yml
@@ -397,3 +397,5 @@ _moderationLogTypes:
suspend: "Αποβολή"
_reversi:
total: "Σύνολο"
+_search:
+ searchScopeLocal: "Τοπικό"
diff --git a/locales/en-US.yml b/locales/en-US.yml
index fe4bbef391..04ddd2966a 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -2854,3 +2854,7 @@ _bootErrors:
otherOption1: "Delete client settings and cache"
otherOption2: "Start the simple client"
otherOption3: "Launch the repair tool"
+_search:
+ searchScopeAll: "All"
+ searchScopeLocal: "Local"
+ searchScopeUser: "Specific user"
diff --git a/locales/es-ES.yml b/locales/es-ES.yml
index 05d5e8c4c7..070bc397cb 100644
--- a/locales/es-ES.yml
+++ b/locales/es-ES.yml
@@ -2589,3 +2589,7 @@ _followRequest:
_remoteLookupErrors:
_noSuchObject:
title: "No se encuentra"
+_search:
+ searchScopeAll: "Todo"
+ searchScopeLocal: "Local"
+ searchScopeUser: "Especificar usuario"
diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml
index ccfd462a76..09a4d4bc84 100644
--- a/locales/fr-FR.yml
+++ b/locales/fr-FR.yml
@@ -2364,3 +2364,7 @@ _embedCodeGen:
_remoteLookupErrors:
_noSuchObject:
title: "Non trouvé"
+_search:
+ searchScopeAll: "Tous"
+ searchScopeLocal: "Local"
+ searchScopeUser: "Spécifier l'utilisateur·rice"
diff --git a/locales/id-ID.yml b/locales/id-ID.yml
index 7be56b1494..75e420aac7 100644
--- a/locales/id-ID.yml
+++ b/locales/id-ID.yml
@@ -2610,3 +2610,7 @@ _mediaControls:
_remoteLookupErrors:
_noSuchObject:
title: "Tidak dapat ditemukan"
+_search:
+ searchScopeAll: "Semua"
+ searchScopeLocal: "Lokal"
+ searchScopeUser: "Pengguna spesifik"
diff --git a/locales/it-IT.yml b/locales/it-IT.yml
index 66cdd5af76..eaf9e81b0e 100644
--- a/locales/it-IT.yml
+++ b/locales/it-IT.yml
@@ -2854,3 +2854,7 @@ _bootErrors:
otherOption1: "Nelle impostazioni, cancellare le impostazioni del client e svuotare la cache"
otherOption2: "Avviare il client predefinito"
otherOption3: "Avviare lo strumento di riparazione"
+_search:
+ searchScopeAll: "Tutte"
+ searchScopeLocal: "Locale"
+ searchScopeUser: "Profilo specifico"
diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml
index e5d0f153a6..f00eb6a6e3 100644
--- a/locales/ja-KS.yml
+++ b/locales/ja-KS.yml
@@ -2854,3 +2854,7 @@ _bootErrors:
otherOption1: "クライアント設定とキャッシュをほかす"
otherOption2: "簡易クライアントを起動"
otherOption3: "修復ツールを起動"
+_search:
+ searchScopeAll: "みんな"
+ searchScopeLocal: "ローカル"
+ searchScopeUser: "ユーザー指定"
diff --git a/locales/ko-GS.yml b/locales/ko-GS.yml
index 4b9650b636..ce83ef0e07 100644
--- a/locales/ko-GS.yml
+++ b/locales/ko-GS.yml
@@ -843,3 +843,6 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "몬 찾앗십니다"
+_search:
+ searchScopeAll: "말캉"
+ searchScopeUser: "사용자 지정"
diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml
index d956b37934..82b42ec2be 100644
--- a/locales/ko-KR.yml
+++ b/locales/ko-KR.yml
@@ -2841,3 +2841,7 @@ _captcha:
_bootErrors:
title: "로딩이 실패함"
solution4: "(Tor Browser) dom.webaudio.enabled를 true로 설정하세요"
+_search:
+ searchScopeAll: "전체"
+ searchScopeLocal: "로컬"
+ searchScopeUser: "사용자 지정"
diff --git a/locales/lo-LA.yml b/locales/lo-LA.yml
index 2d55c289aa..06acda44be 100644
--- a/locales/lo-LA.yml
+++ b/locales/lo-LA.yml
@@ -477,3 +477,5 @@ _moderationLogTypes:
_remoteLookupErrors:
_noSuchObject:
title: "ບໍ່ພົບ"
+_search:
+ searchScopeAll: "ທັງໝົດ"
diff --git a/locales/nl-NL.yml b/locales/nl-NL.yml
index 685094b4a5..320b9d62ba 100644
--- a/locales/nl-NL.yml
+++ b/locales/nl-NL.yml
@@ -540,3 +540,5 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Niet gevonden"
+_search:
+ searchScopeAll: "Alle"
diff --git a/locales/no-NO.yml b/locales/no-NO.yml
index 474e05ba67..c1b145cab4 100644
--- a/locales/no-NO.yml
+++ b/locales/no-NO.yml
@@ -730,3 +730,5 @@ _moderationLogTypes:
_remoteLookupErrors:
_noSuchObject:
title: "Ikke funnet"
+_search:
+ searchScopeAll: "Alle"
diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml
index 9bd585de86..13f3b118fe 100644
--- a/locales/pl-PL.yml
+++ b/locales/pl-PL.yml
@@ -1583,3 +1583,6 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Nie znaleziono"
+_search:
+ searchScopeAll: "Wszystkie"
+ searchScopeLocal: "Lokalne"
diff --git a/locales/pt-PT.yml b/locales/pt-PT.yml
index cc05e33703..8892e6574f 100644
--- a/locales/pt-PT.yml
+++ b/locales/pt-PT.yml
@@ -2757,3 +2757,7 @@ _remoteLookupErrors:
_noSuchObject:
title: "Não encontrado"
description: "O recurso solicitado não foi encontrado, confira o endereço."
+_search:
+ searchScopeAll: "Todos"
+ searchScopeLocal: "Local"
+ searchScopeUser: "Usuário específico"
diff --git a/locales/ro-RO.yml b/locales/ro-RO.yml
index 07f4c98d96..0d43e174a7 100644
--- a/locales/ro-RO.yml
+++ b/locales/ro-RO.yml
@@ -736,3 +736,5 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Nu a fost găsit"
+_search:
+ searchScopeAll: "Tot"
diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml
index 7ed41a9c47..5ba3bc8e87 100644
--- a/locales/ru-RU.yml
+++ b/locales/ru-RU.yml
@@ -2147,3 +2147,7 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Не найдено"
+_search:
+ searchScopeAll: "Все"
+ searchScopeLocal: "Местная"
+ searchScopeUser: "Указанный пользователь"
diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml
index 521d172671..91de8a3352 100644
--- a/locales/sk-SK.yml
+++ b/locales/sk-SK.yml
@@ -1449,3 +1449,6 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Nenájdené"
+_search:
+ searchScopeAll: "Všetko"
+ searchScopeLocal: "Lokálne"
diff --git a/locales/sv-SE.yml b/locales/sv-SE.yml
index 5961605645..91413e3bc7 100644
--- a/locales/sv-SE.yml
+++ b/locales/sv-SE.yml
@@ -707,3 +707,5 @@ _reversi:
white: "Vit"
_selfXssPrevention:
warning: "VARNING"
+_search:
+ searchScopeAll: "Allt"
diff --git a/locales/th-TH.yml b/locales/th-TH.yml
index ec83ba888c..b76c088b3f 100644
--- a/locales/th-TH.yml
+++ b/locales/th-TH.yml
@@ -2709,3 +2709,7 @@ _embedCodeGen:
_remoteLookupErrors:
_noSuchObject:
title: "ไม่พบหน้าที่ต้องการ"
+_search:
+ searchScopeAll: "ทั้งหมด"
+ searchScopeLocal: "ท้องถิ่น"
+ searchScopeUser: "ผู้ใช้เฉพาะ"
diff --git a/locales/tr-TR.yml b/locales/tr-TR.yml
index 2c63f15aa2..e99aa64254 100644
--- a/locales/tr-TR.yml
+++ b/locales/tr-TR.yml
@@ -460,3 +460,5 @@ _deck:
_moderationLogTypes:
suspend: "askıya al"
resetPassword: "Şifre sıfırlama"
+_search:
+ searchScopeAll: "Tümü"
diff --git a/locales/uk-UA.yml b/locales/uk-UA.yml
index a83ad80683..4f7e6430e9 100644
--- a/locales/uk-UA.yml
+++ b/locales/uk-UA.yml
@@ -1624,3 +1624,6 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Не знайдено"
+_search:
+ searchScopeAll: "Всі"
+ searchScopeLocal: "Локальна"
diff --git a/locales/uz-UZ.yml b/locales/uz-UZ.yml
index 6015492b92..c70802e417 100644
--- a/locales/uz-UZ.yml
+++ b/locales/uz-UZ.yml
@@ -1094,3 +1094,6 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Topilmadi"
+_search:
+ searchScopeAll: "Barcha"
+ searchScopeLocal: "Mahalliy"
diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml
index e6a9418126..628bd513fe 100644
--- a/locales/vi-VN.yml
+++ b/locales/vi-VN.yml
@@ -1930,3 +1930,7 @@ _reversi:
_remoteLookupErrors:
_noSuchObject:
title: "Không tìm thấy"
+_search:
+ searchScopeAll: "Tất cả"
+ searchScopeLocal: "Máy chủ này"
+ searchScopeUser: "Người dùng chỉ định"
diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml
index 5fec7353dc..1599db5854 100644
--- a/locales/zh-CN.yml
+++ b/locales/zh-CN.yml
@@ -2854,3 +2854,7 @@ _bootErrors:
otherOption1: "清除客户端设定与缓存"
otherOption2: "使用简易客户端"
otherOption3: "启动修复工具"
+_search:
+ searchScopeAll: "全部"
+ searchScopeLocal: "本地"
+ searchScopeUser: "用户指定"
diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml
index 23b55d8da4..10079f2bee 100644
--- a/locales/zh-TW.yml
+++ b/locales/zh-TW.yml
@@ -2854,3 +2854,7 @@ _bootErrors:
otherOption1: "刪除用戶端設定和快取"
otherOption2: "啟動簡易用戶端"
otherOption3: "啟動修復工具"
+_search:
+ searchScopeAll: "全部"
+ searchScopeLocal: "本地"
+ searchScopeUser: "指定使用者"
From 94a3e37ba86374b2a0c7d174a5eb67c971002f1e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Thu, 27 Feb 2025 08:58:40 +0000
Subject: [PATCH 48/50] Release: 2025.2.1
---
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 43d4a01fb7..201b30ec36 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "misskey",
- "version": "2025.2.1-beta.2",
+ "version": "2025.2.1",
"codename": "nasubi",
"repository": {
"type": "git",
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index 06ea1c78ac..f9a61fd0b1 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2025.2.1-beta.2",
+ "version": "2025.2.1",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
From a3bba23b7d6e0d3fde4943b95cc42afa3dcb35d4 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Thu, 27 Feb 2025 08:58:46 +0000
Subject: [PATCH 49/50] [skip ci] Update CHANGELOG.md (prepend template)
---
CHANGELOG.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53cf1b0cca..f765ea48e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+## Unreleased
+
+### General
+-
+
+### Client
+-
+
+### Server
+-
+
+
## 2025.2.1
### General
From c63c3462dd00e7de3f40b15ad43993a26734263f Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Fri, 28 Feb 2025 09:34:21 +0900
Subject: [PATCH 50/50] refactor
---
packages/backend/src/core/CreateSystemUserService.ts | 2 +-
packages/backend/src/core/SignupService.ts | 4 ++--
packages/backend/src/misc/is-native-token.ts | 7 -------
.../src/misc/{generate-native-user-token.ts => token.ts} | 5 +++--
packages/backend/src/server/api/AuthenticateService.ts | 4 ++--
.../backend/src/server/api/endpoints/i/regenerate-token.ts | 4 ++--
6 files changed, 10 insertions(+), 16 deletions(-)
delete mode 100644 packages/backend/src/misc/is-native-token.ts
rename packages/backend/src/misc/{generate-native-user-token.ts => token.ts} (54%)
diff --git a/packages/backend/src/core/CreateSystemUserService.ts b/packages/backend/src/core/CreateSystemUserService.ts
index 6c5b0f6a36..7ef75edb3c 100644
--- a/packages/backend/src/core/CreateSystemUserService.ts
+++ b/packages/backend/src/core/CreateSystemUserService.ts
@@ -14,7 +14,7 @@ import { IdService } from '@/core/IdService.js';
import { MiUserKeypair } from '@/models/UserKeypair.js';
import { MiUsedUsername } from '@/models/UsedUsername.js';
import { DI } from '@/di-symbols.js';
-import generateNativeUserToken from '@/misc/generate-native-user-token.js';
+import { generateNativeUserToken } from '@/misc/token.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/SignupService.ts b/packages/backend/src/core/SignupService.ts
index 3865392b7f..d2f09ea15d 100644
--- a/packages/backend/src/core/SignupService.ts
+++ b/packages/backend/src/core/SignupService.ts
@@ -14,7 +14,7 @@ import { MiUserProfile } from '@/models/UserProfile.js';
import { IdService } from '@/core/IdService.js';
import { MiUserKeypair } from '@/models/UserKeypair.js';
import { MiUsedUsername } from '@/models/UsedUsername.js';
-import generateUserToken from '@/misc/generate-native-user-token.js';
+import { generateNativeUserToken } from '@/misc/token.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { InstanceActorService } from '@/core/InstanceActorService.js';
import { bindThis } from '@/decorators.js';
@@ -74,7 +74,7 @@ export class SignupService {
}
// Generate secret
- const secret = generateUserToken();
+ const secret = generateNativeUserToken();
// Check username duplication
if (await this.usersRepository.exists({ where: { usernameLower: username.toLowerCase(), host: IsNull() } })) {
diff --git a/packages/backend/src/misc/is-native-token.ts b/packages/backend/src/misc/is-native-token.ts
deleted file mode 100644
index 300c4c05b3..0000000000
--- a/packages/backend/src/misc/is-native-token.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * SPDX-FileCopyrightText: syuilo and misskey-project
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-// eslint-disable-next-line import/no-default-export
-export default (token: string) => token.length === 16;
diff --git a/packages/backend/src/misc/generate-native-user-token.ts b/packages/backend/src/misc/token.ts
similarity index 54%
rename from packages/backend/src/misc/generate-native-user-token.ts
rename to packages/backend/src/misc/token.ts
index 85fb383ba2..5d37cba26d 100644
--- a/packages/backend/src/misc/generate-native-user-token.ts
+++ b/packages/backend/src/misc/token.ts
@@ -5,5 +5,6 @@
import { secureRndstr } from '@/misc/secure-rndstr.js';
-// eslint-disable-next-line import/no-default-export
-export default () => secureRndstr(16);
+export const generateNativeUserToken = () => secureRndstr(16);
+
+export const isNativeUserToken = (token: string) => token.length === 16;
diff --git a/packages/backend/src/server/api/AuthenticateService.ts b/packages/backend/src/server/api/AuthenticateService.ts
index 690ff2e022..601618553e 100644
--- a/packages/backend/src/server/api/AuthenticateService.ts
+++ b/packages/backend/src/server/api/AuthenticateService.ts
@@ -11,7 +11,7 @@ import type { MiAccessToken } from '@/models/AccessToken.js';
import { MemoryKVCache } from '@/misc/cache.js';
import type { MiApp } from '@/models/App.js';
import { CacheService } from '@/core/CacheService.js';
-import isNativeToken from '@/misc/is-native-token.js';
+import { isNativeUserToken } from '@/misc/token.js';
import { bindThis } from '@/decorators.js';
export class AuthenticationError extends Error {
@@ -46,7 +46,7 @@ export class AuthenticateService implements OnApplicationShutdown {
return [null, null];
}
- if (isNativeToken(token)) {
+ if (isNativeUserToken(token)) {
const user = await this.cacheService.localUserByNativeTokenCache.fetch(token,
() => this.usersRepository.findOneBy({ token }) as Promise);
diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
index 78f3cce9ad..d25d5d5e0e 100644
--- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
+++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
@@ -7,7 +7,7 @@ import bcrypt from 'bcryptjs';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository, UserProfilesRepository } from '@/models/_.js';
-import generateUserToken from '@/misc/generate-native-user-token.js';
+import { generateNativeUserToken } from '@/misc/token.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
@@ -49,7 +49,7 @@ export default class extends Endpoint { // eslint-
throw new Error('incorrect password');
}
- const newToken = generateUserToken();
+ const newToken = generateNativeUserToken();
await this.usersRepository.update(me.id, {
token: newToken,