[frontend/components] Add button to copy post link to clipboard (ISH-414)
This commit is contained in:
parent
46243e48bb
commit
54a8a66861
1 changed files with 5 additions and 0 deletions
|
@ -85,6 +85,9 @@
|
|||
<MenuElement Icon="Icons.ArrowSquareOut" OnSelect="OpenOriginal">
|
||||
<Text>@Loc["Open original page"]</Text>
|
||||
</MenuElement>
|
||||
<MenuElement Icon="Icons.Share" OnSelect="CopyLink">
|
||||
<Text>@Loc["Copy link"]</Text>
|
||||
</MenuElement>
|
||||
<MenuElement Icon="Icons.SpeakerX" OnSelect="Note.Mute">
|
||||
<Text>@Loc["Mute Note"]</Text>
|
||||
</MenuElement>
|
||||
|
@ -111,6 +114,8 @@
|
|||
|
||||
private void OpenOriginal() => Js.InvokeVoidAsync("open", Note.NoteResponse.Url, "_blank");
|
||||
|
||||
private void CopyLink() => Js.InvokeVoidAsync("navigator.clipboard.writeText", Note.NoteResponse.Url);
|
||||
|
||||
private void Like()
|
||||
{
|
||||
_ = Note.ToggleLike();
|
||||
|
|
Loading…
Add table
Reference in a new issue