[frontend/components] Ask for confirmation before cloning emojis
This commit is contained in:
parent
7c0ed5fed4
commit
6875a1e9e2
1 changed files with 5 additions and 2 deletions
|
@ -89,9 +89,12 @@
|
|||
|
||||
private void SelectEmoji() => EmojiMenu.Toggle(EmojiButton);
|
||||
|
||||
private async Task Clone()
|
||||
private async Task Clone() =>
|
||||
await Global.ConfirmDialog?.Confirm(new EventCallback<bool>(this, CloneCallback), @Loc["Clone {0} from {1}?", Emoji.Name, Emoji.Category ?? ""], Icons.Copy, @Loc["Clone"])!;
|
||||
|
||||
private async Task CloneCallback(bool confirm)
|
||||
{
|
||||
if (!Remote || Emoji.Category == null) return;
|
||||
if (!confirm || !Remote || Emoji.Category == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue