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