client: add copy remote link button
Changelog: Added
This commit is contained in:
parent
54dcde2500
commit
6669dfeed7
2 changed files with 11 additions and 0 deletions
|
|
@ -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\
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue