feat(frontend): ノートのリンクをリモートのサーバーのURLとしてコピーできるように
This commit is contained in:
parent
2ff90a80d4
commit
6aeb58cacd
|
@ -227,6 +227,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();
|
||||
|
@ -316,6 +322,12 @@ export function getNoteMenu(props: {
|
|||
window.open(appearNote.url ?? appearNote.uri, '_blank', 'noopener');
|
||||
},
|
||||
} : undefined,
|
||||
// リモートのリンクをコピー
|
||||
(appearNote.url || appearNote.uri) ? {
|
||||
icon: 'ti ti-external-link',
|
||||
text: i18n.ts.showOnRemote,
|
||||
action: () => copyNoteLinkOnRemoteServer,
|
||||
} : undefined,
|
||||
...(isSupportShare() ? [{
|
||||
icon: 'ti ti-share',
|
||||
text: i18n.ts.share,
|
||||
|
|
Loading…
Reference in New Issue