From d6a867a7fd17885c2b480baaf4de250359904feb Mon Sep 17 00:00:00 2001 From: Kisaragi Marine <kisaragi.effective@gmail.com> Date: Tue, 12 Mar 2024 20:34:31 +0900 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E3=83=8E=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AE=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E3=83=AA=E3=83=A2?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=AE=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=AEURL=E3=81=A8=E3=81=97=E3=81=A6=E3=82=B3=E3=83=94?= =?UTF-8?q?=E3=83=BC=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 --- packages/frontend/src/scripts/get-note-menu.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index c1846b0589..a439403281 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -237,6 +237,12 @@ export function getNoteMenu(props: { os.success(); } + async function copyNoteLinkOnRemoteServer(): Promise<void> { + // TODO: 何が違う? + copyToClipboard(appearNote.url ?? appearNote.uri); + return os.success(); + } + function copyLink(): void { copyToClipboard(`${url}/notes/${appearNote.id}`); os.success(); @@ -327,6 +333,10 @@ export function getNoteMenu(props: { action: () => { window.open(appearNote.url ?? appearNote.uri, '_blank', 'noopener'); }, + }, { // リモートのリンクをコピー + icon: 'ti ti-external-link', + text: i18n.ts.showOnRemote, + action: () => copyNoteLinkOnRemoteServer, }); } else { menuItems.push(getNoteEmbedCodeMenu(appearNote, i18n.ts.genEmbedCode));