From f1b344c5e70abdf789ea8efe4bd9e91d5e4a4958 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 6 Feb 2025 19:47:07 +0100 Subject: [PATCH] client: more actions for renotes Also allows to perform most note actions on renotes. Changelog: Added --- packages/client/src/components/note.vue | 29 +++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue index c7594250e..2ab388e82 100644 --- a/packages/client/src/components/note.vue +++ b/packages/client/src/components/note.vue @@ -24,7 +24,7 @@
@@ -154,7 +154,6 @@ const renoteButton = ref>(); const renoteTime = ref(); const reactButton = ref(); let appearNote = $computed(() => isRenote ? note.renote as foundkey.entities.Note : note); -const isMyRenote = $i && ($i.id === note.userId); const showContent = ref(false); const isLong = (appearNote.cw == null && appearNote.text != null && ( (appearNote.text.split('\n').length > 9) || @@ -244,20 +243,18 @@ function menu(viaKeyboard = false): void { } function showRenoteMenu(viaKeyboard = false): void { - if (!isMyRenote) return; - os.popupMenu([{ - text: i18n.ts.unrenote, - icon: 'fas fa-trash-alt', - danger: true, - action: () => { - os.api('notes/delete', { - noteId: note.id, - }); - isDeleted.value = true; - }, - }], renoteTime.value, { - viaKeyboard, - }); + os.popupMenu( + getNoteMenu({ + note, + translating, + translation, + renoteTime, + isDeleted, + currentClipPage + }), + renoteTime.value, + { viaKeyboard }, + ); } function focus() {