ノートのリンクをリモートのサーバーの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>
This commit is contained in:
Sayamame-beans
2025-01-14 21:12:12 +09:00
committed by GitHub
parent 40f8b5e7f5
commit ed43cd87c9
3 changed files with 16 additions and 5 deletions

View File

@@ -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: () => {