diff options
| author | anatawa12 <anatawa12@icloud.com> | 2024-02-17 12:43:39 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-17 12:43:39 +0900 |
| commit | fa243276c5d9acd2c3e49f06170c0187ad3e6dc0 (patch) | |
| tree | 3d93b958b6d8947d2e081a0453bd34a2d4208ac1 /packages/frontend/src | |
| parent | Merge pull request from GHSA-qqrm-9grj-6v32 (diff) | |
| download | sharkey-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')
| -rw-r--r-- | packages/frontend/src/scripts/get-note-menu.ts | 7 |
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'); }, }; |