From acafc98593fad56c026e87a944a1865aaad4b3bd Mon Sep 17 00:00:00 2001 From: NoriDev Date: Tue, 19 Sep 2023 16:12:28 +0900 Subject: [PATCH] tweak 907d519d --- .../src/components/MkNoteDetailed.vue | 21 ++++++++++++------- .../frontend/src/scripts/get-note-menu.ts | 20 ++++++++++++++++++ 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index ae32064fea..a021ec4486 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -11,6 +11,9 @@ SPDX-License-Identifier: AGPL-3.0-only v-hotkey="keymap" :class="$style.root" > +
+ {{ i18n.ts.loadConversation }} +
@@ -44,12 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
- {{ i18n.ts.loadConversation }} -
- -
+
@@ -175,10 +173,10 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts.loadReplies }}
- +
@@ -581,6 +579,13 @@ function blur() { el.value.blur(); } +os.api('notes/children', { + noteId: appearNote.id, + limit: 4, +}).then(res => { + replies.value = res; +}); + const repliesLoaded = ref(false); function loadReplies() { repliesLoaded.value = true; diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index f1c5dd150f..2739ac5b43 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -251,6 +251,18 @@ export function getNoteMenu(props: { os.pageWindow(`/notes/${appearNote.id}`); } + function showReactions(): void { + os.popup(defineAsyncComponent(() => import('@/components/MkReactedUsersDialog.vue')), { + noteId: appearNote.id, + }, {}, 'closed'); + } + + function showRenotes(): void { + os.popup(defineAsyncComponent(() => import('@/components/MkRenotedUsersDialog.vue')), { + noteId: appearNote.id, + }, {}, 'closed'); + } + async function translate(): Promise { if (props.translation.value != null) return; props.translating.value = true; @@ -277,6 +289,14 @@ export function getNoteMenu(props: { action: unclip, }, null] : [] ), { + icon: 'ti ti-repeat', + text: i18n.ts.renotesList, + action: showRenotes, + }, { + icon: 'ti ti-icons', + text: i18n.ts.reactionsList, + action: showReactions, + }, { icon: 'ti ti-info-circle', text: i18n.ts.details, action: openDetail,