From 37627bb0e6234196cb2a9fade5c1c11536844044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B4=87=E5=B3=B0=20=E6=9C=94=E8=8F=AF?= Date: Mon, 18 Nov 2024 15:36:23 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20=E3=83=AA=E3=82=A2=E3=82=AF=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E7=94=BB=E9=9D=A2=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 4 ++ locales/ja-JP.yml | 1 + .../src/pages/settings/mute-block.vue | 48 +++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/locales/index.d.ts b/locales/index.d.ts index 24613419ce..1d2f28d4bc 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -994,6 +994,10 @@ export interface Locale extends ILocale { * ブロックしたユーザー */ "blockedUsers": string; + /** + * リアクションをブロックしたユーザー + */ + "reactionBlockedUsers": string; /** * ユーザーはいません */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 9f32969a79..1f1e1b571e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -244,6 +244,7 @@ federationAllowedHostsDescription: "連合を許可するサーバーのホス muteAndBlock: "ミュートとブロック" mutedUsers: "ミュートしたユーザー" blockedUsers: "ブロックしたユーザー" +reactionBlockedUsers: "リアクションをブロックしたユーザー" noUsers: "ユーザーはいません" editProfile: "プロフィールを編集" noteDeleteConfirm: "このノートを削除しますか?" diff --git a/packages/frontend/src/pages/settings/mute-block.vue b/packages/frontend/src/pages/settings/mute-block.vue index 4d413d53ab..74e69e1d92 100644 --- a/packages/frontend/src/pages/settings/mute-block.vue +++ b/packages/frontend/src/pages/settings/mute-block.vue @@ -122,6 +122,39 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + @@ -157,6 +190,11 @@ const blockingPagination = { limit: 10, }; +const blockingReactionUserPagination = { + endpoint: 'blocking-reaction-user/list' as const, + limit: 10, +}; + const expandedRenoteMuteItems = ref([]); const expandedMuteItems = ref([]); const expandedBlockItems = ref([]); @@ -194,6 +232,16 @@ async function unblock(user, ev) { }], ev.currentTarget ?? ev.target); } +async function unblockReactionUser(user, ev) { + os.popupMenu([{ + text: i18n.ts.unblock, + icon: 'ti ti-x', + action: async () => { + await os.apiWithDialog('blocking-reaction-user/delete', { userId: user.id }); + }, + }], ev.currentTarget ?? ev.target); +} + async function toggleRenoteMuteItem(item) { if (expandedRenoteMuteItems.value.includes(item.id)) { expandedRenoteMuteItems.value = expandedRenoteMuteItems.value.filter(x => x !== item.id);