mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-14 06:03:58 +01:00
feat(frontend): ノートのリンクをリモートのサーバーのURLとしてコピーできるように
This commit is contained in:
parent
dac3b1f405
commit
d6a867a7fd
1 changed files with 10 additions and 0 deletions
|
@ -237,6 +237,12 @@ export function getNoteMenu(props: {
|
|||
os.success();
|
||||
}
|
||||
|
||||
async function copyNoteLinkOnRemoteServer(): Promise<void> {
|
||||
// TODO: 何が違う?
|
||||
copyToClipboard(appearNote.url ?? appearNote.uri);
|
||||
return os.success();
|
||||
}
|
||||
|
||||
function copyLink(): void {
|
||||
copyToClipboard(`${url}/notes/${appearNote.id}`);
|
||||
os.success();
|
||||
|
@ -327,6 +333,10 @@ export function getNoteMenu(props: {
|
|||
action: () => {
|
||||
window.open(appearNote.url ?? appearNote.uri, '_blank', 'noopener');
|
||||
},
|
||||
}, { // リモートのリンクをコピー
|
||||
icon: 'ti ti-external-link',
|
||||
text: i18n.ts.showOnRemote,
|
||||
action: () => copyNoteLinkOnRemoteServer,
|
||||
});
|
||||
} else {
|
||||
menuItems.push(getNoteEmbedCodeMenu(appearNote, i18n.ts.genEmbedCode));
|
||||
|
|
Loading…
Reference in a new issue