client: add copy remote link button

Changelog: Added
This commit is contained in:
Johann150 2025-11-08 15:38:29 +01:00
commit 6669dfeed7
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 11 additions and 0 deletions

View file

@ -35,6 +35,7 @@ pin: "Pin to profile"
unpin: "Unpin from profile"
copyContent: "Copy contents"
copyLink: "Copy link"
copyRemoteLink: "Copy remote link"
delete: "Delete"
deleteAndEdit: "Delete and edit"
deleteAndEditConfirm: "Are you sure you want to delete this note and edit it? You\

View file

@ -97,6 +97,11 @@ export function getNoteMenu(props: {
os.success();
}
function copyRemoteLink(): void {
copyToClipboard(props.note.url ?? props.note.uri);
os.success();
}
function togglePin(pin: boolean): void {
os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', {
noteId: props.note.id,
@ -225,6 +230,11 @@ export function getNoteMenu(props: {
text: i18n.ts.copyLink,
action: copyLink,
},
(props.note.url || props.note.uri) ? {
icon: 'fas fa-link',
text: i18n.ts.copyRemoteLink,
action: copyRemoteLink,
} : undefined,
(props.note.url || props.note.uri) ? {
icon: 'fas fa-external-link-square-alt',
text: i18n.ts.showOnRemote,