From 336d8fe785d5b26f85088659db022a45b74c5d9f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Jan 2023 10:29:30 +0900 Subject: [PATCH] =?UTF-8?q?feat(client):=20=E3=83=AA=E3=82=A2=E3=82=AF?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E4=B8=80=E8=A6=A7=E8=A9=B3=E7=B4=B0?= =?UTF-8?q?=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD=E3=82=B0=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #9634 --- CHANGELOG.md | 1 + locales/ja-JP.yml | 1 + .../src/components/MkReactedUsersDialog.vue | 92 +++++++++++++++++++ .../src/components/MkUserCardMini.vue | 20 ++-- .../frontend/src/scripts/get-note-menu.ts | 12 +++ 5 files changed, 120 insertions(+), 6 deletions(-) create mode 100644 packages/frontend/src/components/MkReactedUsersDialog.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 05ad4f8a80..21fecb6817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ You should also include the user name that made the change. - Playのプリセットを追加 - Playのscriptの文字数制限を緩和 - AiScript GUIの強化 +- リアクション一覧詳細ダイアログを表示できるように - 存在しないカスタム絵文字をテキストで表示するように - Alt text in image viewer diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f0e53cb814..5721fcc887 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -110,6 +110,7 @@ clickToShow: "クリックして表示" sensitive: "閲覧注意" add: "追加" reaction: "リアクション" +reactions: "リアクション" reactionSetting: "ピッカーに表示するリアクション" reactionSettingDescription2: "ドラッグして並び替え、クリックして削除、+を押して追加します。" rememberNoteVisibility: "公開範囲を記憶する" diff --git a/packages/frontend/src/components/MkReactedUsersDialog.vue b/packages/frontend/src/components/MkReactedUsersDialog.vue new file mode 100644 index 0000000000..2a8dffc014 --- /dev/null +++ b/packages/frontend/src/components/MkReactedUsersDialog.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/packages/frontend/src/components/MkUserCardMini.vue b/packages/frontend/src/components/MkUserCardMini.vue index ec199ad277..457504e6ca 100644 --- a/packages/frontend/src/components/MkUserCardMini.vue +++ b/packages/frontend/src/components/MkUserCardMini.vue @@ -11,20 +11,28 @@ diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index 54de3d95df..7a426ec722 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -174,9 +174,17 @@ export function getNoteMenu(props: { url: `${url}/notes/${appearNote.id}`, }); } + function notedetails(): void { os.pageWindow(`/notes/${appearNote.id}`); } + + function showReactions(): void { + os.popup(defineAsyncComponent(() => import('@/components/MkReactedUsersDialog.vue')), { + noteId: appearNote.id, + }, {}, 'closed'); + } + async function translate(): Promise { if (props.translation.value != null) return; props.translating.value = true; @@ -206,6 +214,10 @@ export function getNoteMenu(props: { icon: 'ti ti-info-circle', text: i18n.ts.details, action: notedetails, + }, { + icon: 'ti ti-users', + text: i18n.ts.reactions, + action: showReactions, }, { icon: 'ti ti-copy', text: i18n.ts.copyContent,