diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index 5e4fe316fd..2e7fd98f30 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -239,6 +239,8 @@ import XStarButtonNoEmoji from "@/components/MkStarButtonNoEmoji.vue"; import XQuoteButton from "@/components/MkQuoteButton.vue"; import MkUrlPreview from "@/components/MkUrlPreview.vue"; import MkVisibility from "@/components/MkVisibility.vue"; +import copyToClipboard from "@/scripts/copy-to-clipboard"; +import { url } from "@/config"; import { pleaseLogin } from "@/scripts/please-login"; import { focusPrev, focusNext } from "@/scripts/focus"; import { getWordSoftMute } from "@/scripts/check-word-mute"; @@ -254,6 +256,7 @@ import { useNoteCapture } from "@/scripts/use-note-capture"; import { notePage } from "@/filters/note"; import { deepClone } from "@/scripts/clone"; + const router = useRouter(); const props = defineProps<{ @@ -386,16 +389,43 @@ function onContextmenu(ev: MouseEvent): void { react(); } else { os.contextMenu( - getNoteMenu({ - note: note, - translating, - translation, - menuButton, - isDeleted, - currentClipPage, - }), + [ + { + type: "label", + text: notePage(appearNote), + }, + { + icon: "ph-browser ph-bold ph-lg", + text: i18n.ts.openInWindow, + action: () => { + os.pageWindow(notePage(appearNote)); + }, + }, + { + icon: "ph-arrows-out-simple ph-bold ph-lg", + text: i18n.ts.showInPage, + action: () => { + router.push(notePage(appearNote), "forcePage"); + }, + }, + null, + { + icon: "ph-arrow-square-out ph-bold ph-lg", + text: i18n.ts.openInNewTab, + action: () => { + window.open(notePage(appearNote), "_blank"); + }, + }, + { + icon: "ph-link-simple ph-bold ph-lg", + text: i18n.ts.copyLink, + action: () => { + copyToClipboard(`${url}${notePage(appearNote)}`); + }, + }, + ], ev - ).then(focus); + ); } } @@ -596,6 +626,7 @@ defineExpose({ margin-right: 14px; margin-top: 0; flex-grow: 0; + pointer-events: none; } > div > i { diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index af2dba4902..77046dcbad 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -11,6 +11,7 @@ singleStart: replies.length == 1, firstColumn: depth == 1 && conversation, }" + @contextmenu.stop="onContextmenu" >