[frontend/components] Add copy contents button to note footer menu
This commit is contained in:
parent
039d7b2931
commit
ba784683d4
1 changed files with 9 additions and 1 deletions
|
@ -109,6 +109,12 @@
|
|||
<Text>@Loc["Copy link (remote)"]</Text>
|
||||
</MenuElement>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(Note.Text))
|
||||
{
|
||||
<MenuElement Icon="Icons.Copy" OnSelect="CopyContents">
|
||||
<Text>@Loc["Copy contents"]</Text>
|
||||
</MenuElement>
|
||||
}
|
||||
@if (Note.User.Id == Session.Current?.Id)
|
||||
{
|
||||
<hr class="rule"/>
|
||||
|
@ -154,6 +160,8 @@
|
|||
|
||||
private void CopyLinkRemote() => Js.InvokeVoidAsync("navigator.clipboard.writeText", Note.Url);
|
||||
|
||||
private void CopyContents() => Js.InvokeVoidAsync("navigator.clipboard.writeText", Note.Text);
|
||||
|
||||
private void Like()
|
||||
{
|
||||
_ = NoteActions.ToggleLikeAsync(Note);
|
||||
|
|
Loading…
Add table
Reference in a new issue