summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authoranatawa12 <anatawa12@icloud.com>2024-02-17 12:43:39 +0900
committerGitHub <noreply@github.com>2024-02-17 12:43:39 +0900
commitfa243276c5d9acd2c3e49f06170c0187ad3e6dc0 (patch)
tree3d93b958b6d8947d2e081a0453bd34a2d4208ac1 /packages/frontend/src/scripts
parentMerge pull request from GHSA-qqrm-9grj-6v32 (diff)
downloadsharkey-fa243276c5d9acd2c3e49f06170c0187ad3e6dc0.tar.gz
sharkey-fa243276c5d9acd2c3e49f06170c0187ad3e6dc0.tar.bz2
sharkey-fa243276c5d9acd2c3e49f06170c0187ad3e6dc0.zip
feat: add link to local note in initial comment of abuse note (#13347)
* feat: add link to local note in initial comment of abuse note * docs(changelog): ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/get-note-menu.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts
index ad46e5dfe7..b273bd36f3 100644
--- a/packages/frontend/src/scripts/get-note-menu.ts
+++ b/packages/frontend/src/scripts/get-note-menu.ts
@@ -102,10 +102,13 @@ export function getAbuseNoteMenu(note: Misskey.entities.Note, text: string): Men
icon: 'ti ti-exclamation-circle',
text,
action: (): void => {
- const u = note.url ?? note.uri ?? `${url}/notes/${note.id}`;
+ const localUrl = `${url}/notes/${note.id}`;
+ let noteInfo = '';
+ if (note.url ?? note.uri != null) noteInfo = `Note: ${note.url ?? note.uri}\n`;
+ noteInfo += `Local Note: ${localUrl}\n`;
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
user: note.user,
- initialComment: `Note: ${u}\n-----\n`,
+ initialComment: `${noteInfo}-----\n`,
}, {}, 'closed');
},
};