diff --git a/locales/index.d.ts b/locales/index.d.ts
index d34dde40c8..505fe05d06 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -48,6 +48,7 @@ export interface Locale {
"unpin": string;
"copyContent": string;
"copyLink": string;
+ "copyLinkRenote": string;
"delete": string;
"deleteAndEdit": string;
"deleteAndEditConfirm": string;
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 06ca5ac618..8660f566d1 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -45,6 +45,7 @@ pin: "ピン留め"
unpin: "ピン留め解除"
copyContent: "内容をコピー"
copyLink: "リンクをコピー"
+copyLinkRenote: "Renoteのリンクをコピー"
delete: "削除"
deleteAndEdit: "削除して編集"
deleteAndEditConfirm: "このノートを削除してもう一度編集しますか?このノートへのリアクション、Renote、返信も全て削除されます。"
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 15028f73cc..fe0c676c45 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -161,7 +161,7 @@ import { reactionPicker } from '@/scripts/reaction-picker';
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm';
import { $i } from '@/account';
import { i18n } from '@/i18n';
-import { getAbuseNoteMenu, getNoteClipMenu, getNoteMenu } from '@/scripts/get-note-menu';
+import { getAbuseNoteMenu, getCopyNoteLinkMenu, getNoteClipMenu, getNoteMenu } from '@/scripts/get-note-menu';
import { useNoteCapture } from '@/scripts/use-note-capture';
import { deepClone } from '@/scripts/clone';
import { useTooltip } from '@/scripts/use-tooltip';
@@ -427,21 +427,29 @@ async function clip() {
function showRenoteMenu(viaKeyboard = false): void {
if (isMyRenote) {
pleaseLogin();
- os.popupMenu([{
- text: i18n.ts.unrenote,
- icon: 'ti ti-trash',
- danger: true,
- action: () => {
- os.api('notes/delete', {
- noteId: note.id,
- });
- isDeleted.value = true;
+ os.popupMenu([
+ getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote),
+ null,
+ {
+ text: i18n.ts.unrenote,
+ icon: 'ti ti-trash',
+ danger: true,
+ action: () => {
+ os.api('notes/delete', {
+ noteId: note.id,
+ });
+ isDeleted.value = true;
+ },
},
- }], renoteTime.value, {
+ ], renoteTime.value, {
viaKeyboard: viaKeyboard,
});
} else {
- os.popupMenu([getAbuseNoteMenu(note, i18n.ts.reportAbuseRenote)], renoteTime.value, {
+ os.popupMenu([
+ getCopyNoteLinkMenu(note, i18n.ts.copyLinkRenote),
+ null,
+ getAbuseNoteMenu(note, i18n.ts.reportAbuseRenote),
+ ], renoteTime.value, {
viaKeyboard: viaKeyboard,
});
}
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts
index 77ac7f194a..62119c6466 100644
--- a/packages/frontend/src/scripts/get-note-menu.ts
+++ b/packages/frontend/src/scripts/get-note-menu.ts
@@ -106,6 +106,17 @@ export function getAbuseNoteMenu(note: misskey.entities.Note, text: string): Men
};
}
+export function getCopyNoteLinkMenu(note: misskey.entities.Note, text: string): MenuItem {
+ return {
+ icon: 'ti ti-link',
+ text,
+ action: (): void => {
+ copyToClipboard(`${url}/notes/${note.id}`);
+ os.success();
+ },
+ };
+}
+
export function getNoteMenu(props: {
note: misskey.entities.Note;
menuButton: Ref;
@@ -280,11 +291,9 @@ export function getNoteMenu(props: {
icon: 'ti ti-copy',
text: i18n.ts.copyContent,
action: copyContent,
- }, {
- icon: 'ti ti-link',
- text: i18n.ts.copyLink,
- action: copyLink,
- }, (appearNote.url || appearNote.uri) ? {
+ }, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
+ , (isRenote ? getCopyNoteLinkMenu(props.note, i18n.ts.copyLinkRenote) : undefined)
+ , (appearNote.url || appearNote.uri) ? {
icon: 'ti ti-external-link',
text: i18n.ts.showOnRemote,
action: () => {
@@ -388,11 +397,9 @@ export function getNoteMenu(props: {
icon: 'ti ti-copy',
text: i18n.ts.copyContent,
action: copyContent,
- }, {
- icon: 'ti ti-link',
- text: i18n.ts.copyLink,
- action: copyLink,
- }, (appearNote.url || appearNote.uri) ? {
+ }, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
+ , (isRenote ? getCopyNoteLinkMenu(props.note, i18n.ts.copyLinkRenote) : undefined)
+ , (appearNote.url || appearNote.uri) ? {
icon: 'ti ti-external-link',
text: i18n.ts.showOnRemote,
action: () => {