diff options
| author | Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> | 2025-01-14 21:12:12 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-14 12:12:12 +0000 |
| commit | ed43cd87c9367987aed6ca2a7d3ea12ae526ccdd (patch) | |
| tree | 671ebf9ae3fc0585ac0c8c06e2bec0f665331362 /packages/frontend/src | |
| parent | enhance(frontend): ユーザーページに「ファイル」タブを新設 ... (diff) | |
| download | sharkey-ed43cd87c9367987aed6ca2a7d3ea12ae526ccdd.tar.gz sharkey-ed43cd87c9367987aed6ca2a7d3ea12ae526ccdd.tar.bz2 sharkey-ed43cd87c9367987aed6ca2a7d3ea12ae526ccdd.zip | |
ノートのリンクをリモートのサーバーのURLとしてもコピーできるように (#15091)
* feat(frontend): ノートのリンクをリモートのサーバーのURLとしてコピーできるように
* 出し分けのロジックを1箇所に統一
* docs: CHANGELOGの内容をコミット内容に合わせる
* docs: reverts 11d1b95
per https://github.com/misskey-dev/misskey/pull/13566#discussion_r1589103356
* chore: 調整
* chore: 調整2
---------
Co-authored-by: Kisaragi Marine <kisaragi.effective@gmail.com>
Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: Kisaragi <48310258+KisaragiEffective@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/scripts/get-note-menu.ts | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index e131cf5156..bc504077b0 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -237,11 +237,6 @@ export function getNoteMenu(props: { os.success(); } - function copyLink(): void { - copyToClipboard(`${url}/notes/${appearNote.id}`); - os.success(); - } - function togglePin(pin: boolean): void { os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', { noteId: appearNote.id, @@ -322,6 +317,13 @@ export function getNoteMenu(props: { if (appearNote.url || appearNote.uri) { menuItems.push({ + icon: 'ti ti-link', + text: i18n.ts.copyRemoteLink, + action: () => { + copyToClipboard(appearNote.url ?? appearNote.uri); + os.success(); + }, + }, { icon: 'ti ti-external-link', text: i18n.ts.showOnRemote, action: () => { @@ -474,6 +476,13 @@ export function getNoteMenu(props: { if (appearNote.url || appearNote.uri) { menuItems.push({ + icon: 'ti ti-link', + text: i18n.ts.copyRemoteLink, + action: () => { + copyToClipboard(appearNote.url ?? appearNote.uri); + os.success(); + }, + }, { icon: 'ti ti-external-link', text: i18n.ts.showOnRemote, action: () => { |