From 2fd74b53c767d6435e3a8322e44563b0883e1e57 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 27 Mar 2024 10:27:56 +0000 Subject: [PATCH] position copy button and style snackbar --- src/aoWebWallet/ViewModels/MainViewModel.cs | 10 +++++----- src/aoWebWallet/wwwroot/css/app.css | 15 +++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/aoWebWallet/ViewModels/MainViewModel.cs b/src/aoWebWallet/ViewModels/MainViewModel.cs index f4e8f87..ffddfe1 100644 --- a/src/aoWebWallet/ViewModels/MainViewModel.cs +++ b/src/aoWebWallet/ViewModels/MainViewModel.cs @@ -81,7 +81,7 @@ public partial class MainViewModel : ObservableRecipient /// /// Gets the responsible for loading the source markdown docs. /// - public MainViewModel(DataService dataService, + public MainViewModel(DataService dataService, TokenClient tokenClient, StorageService storageService, ArweaveService arweaveService, @@ -123,7 +123,7 @@ public Task LoadTokenTransferList(string address) => TokenTransferList.DataLoade return TokenTransferList.Data; }); - + public Task LoadTokenTransferListForToken(string? tokenId) => TokenTransferList.DataLoader.LoadAsync(async () => { TokenTransferList.Data = new(); @@ -205,7 +205,7 @@ public Task LoadBalanceDataList(string address) => BalanceDataList.DataLoader.Lo }); - + public async Task LoadWalletList() { @@ -333,7 +333,7 @@ private async Task SelectWallet(string? address) SelectedWallet = current; var indexOf = all.IndexOf(current); SelectedWalletIndex = (indexOf % 5) + 1; - + } else { @@ -554,7 +554,7 @@ public async Task CopyToClipboard(string? text) var isCopied = await clipboard.WriteTextAsync(text.AsMemory()); if (isCopied) { - snackbar.Add($"Text copied: {text}", Severity.Info); + snackbar.Add("Address copied to clipboard", Severity.Success); } } } diff --git a/src/aoWebWallet/wwwroot/css/app.css b/src/aoWebWallet/wwwroot/css/app.css index c6967ba..fb886e3 100644 --- a/src/aoWebWallet/wwwroot/css/app.css +++ b/src/aoWebWallet/wwwroot/css/app.css @@ -152,12 +152,15 @@ a, .btn-link { .margin-rewards-button { margin-top:5px; } -.copy-clipboard { - position:relative; - margin-left:7px; - top: 5px; - cursor: pointer; - transition: transform .2s; +button.mud-button-root.mud-icon-button.mud-ripple.mud-ripple-icon.copy-clipboard:hover{ + background-color: rgba(1,1,1,0); + opacity: 1; +} + +button.mud-button-root.mud-icon-button.mud-ripple.mud-ripple-icon.copy-clipboard{ + padding:0; + margin-left: 7px; + margin-top: 6px; opacity: 0.5; }