Skip to content

Commit

Permalink
Merge pull request #10 from michielpost/feature/mudblazor7
Browse files Browse the repository at this point in the history
Feature/mudblazor7
  • Loading branch information
michielpost authored Jul 1, 2024
2 parents 1bd7ea6 + 62b30f4 commit 813fca8
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 29 deletions.
1 change: 1 addition & 0 deletions src/aoWebWallet/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}

<MudThemeProvider IsDarkMode="true" />
<MudPopoverProvider />
<MudDialogProvider CloseButton="true" CloseOnEscapeKey="true"/>
<MudSnackbarProvider />

Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/AddressBook.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<WalletAvatar Address="@wallet.Address" />
@if(BindingContext.ProcessesDataList?.Data?.Where(x => x.Data?.Address == wallet.Address && (x.Data?.Processes?.Any() ?? false)).Any() ?? false)
{
<MudChip Class="aos-chip" Variant="Variant.Outlined" Color="Color.Dark">AOS</MudChip>
<MudChip T="string" Class="aos-chip" Variant="Variant.Outlined" Color="Color.Dark">AOS</MudChip>
}
</div>
<MudStack Class="d-overflow-hidden" Justify="Justify.Center" Spacing="0">
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/MemeFrames.razor
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<CardHeaderAvatar>
@if (!string.IsNullOrEmpty(memeProcess.TokenProcess.Logo))
{
<MudAvatar Class="mr-3" Image="@UrlHelper.GetArweaveUrl(memeProcess.TokenProcess.Logo)" Size="Size.Large" />
<MudAvatar Class="mr-3" Size="Size.Large"><MudImage Src="@UrlHelper.GetArweaveUrl(memeProcess.TokenProcess.Logo)" /></MudAvatar>
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/ReceivePage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@if (BindingContext.Token?.TokenData != null)
{
<MudStack Row=true>
<MudAvatar Image="@UrlHelper.GetArweaveUrl(BindingContext.Token.TokenData?.Logo)" Size="Size.Large" title="@BindingContext.Token.TokenId" />
<MudAvatar Size="Size.Large" title="@BindingContext.Token.TokenId"><MudImage Src="@UrlHelper.GetArweaveUrl(BindingContext.Token.TokenData?.Logo)" /></MudAvatar>
<MudStack Justify="Justify.Center" Spacing="0">
<MudText Typo="Typo.body1">@BindingContext.Token.TokenData?.Name</MudText>
<MudText Typo="Typo.body2">@BindingContext.Token.TokenData?.Ticker</MudText>
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/TokenDetail.razor
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<MudPaper Class="pa-4 mb-14 mt-4 d-overflow-hidden">
<MudStack Row="true">
<MudAvatar Image="@UrlHelper.GetArweaveUrl(token.TokenData?.Logo)" Size="Size.Large" />
<MudAvatar Size="Size.Large"><MudImage Src="@UrlHelper.GetArweaveUrl(token.TokenData?.Logo)" /></MudAvatar>
<MudStack Justify="Justify.Center" Spacing="0">
<MudText Typo="Typo.body1">@token.TokenData?.Name</MudText>
<MudText Typo="Typo.body2">@token.TokenData?.Ticker</MudText>
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/TransactionDetail.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<MudTimeline TimelinePosition="TimelinePosition.Left">
<MudTimelineItem>
<ItemDot>
<MudAvatar Image="@UrlHelper.GetArweaveUrl(tokenData?.Logo)" Size="Size.Medium" title="@tokenData?.TokenId" />
<MudAvatar Size="Size.Medium" title="@tokenData?.TokenId"><MudImage Src="@UrlHelper.GetArweaveUrl(tokenData?.Logo)" /></MudAvatar>
</ItemDot>
<ItemContent>
@if (transfer.BlockHeight.HasValue)
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/WalletDetail.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
string ownerUrl = $"/wallet/{BindingContext.SelectedWallet.Wallet.OwnerAddress}";

<MudLink Href="@ownerUrl">
<MudChip>owner: @BindingContext.SelectedWallet?.Wallet.OwnerAddress</MudChip>
<MudChip T="string">owner: @BindingContext.SelectedWallet?.Wallet.OwnerAddress</MudChip>
</MudLink>
}
</MudStack>
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Pages/Wallets.razor
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<WalletAvatar Address="@wallet.Address" />
@if(BindingContext.ProcessesDataList?.Data?.Where(x => x.Data?.Address == wallet.Address && (x.Data?.Processes?.Any() ?? false)).Any() ?? false)
{
<MudChip Class="aos-chip" Variant="Variant.Outlined" Color="Color.Dark">AOS</MudChip>
<MudChip T="string" Class="aos-chip" Variant="Variant.Outlined" Color="Color.Dark">AOS</MudChip>
}
</div>

Expand Down
1 change: 1 addition & 0 deletions src/aoWebWallet/Services/StorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public async ValueTask<List<MemeFrameProcess>> GetMemeFrames()
AddSystemMemeFrames(result,"2gM9n9QO6JG1_bZhCWr3fuEKJtzRgx1xvYUB92nVFAs", Constants.CredTokenId); //AORTA
AddSystemMemeFrames(result,"-a4T7XLMDGTcu8_preKXdUT6__4sJkMhYLEJZkXUYd0", Constants.CredTokenId); //MEME
AddSystemMemeFrames(result,"rik3eCayInKVNzSMdoxeSEfpxNd5U7tx1H8NAveg4o8", Constants.CredTokenId); //FINCH-MEME
//AddSystemMemeFrames(result, "kqvDWqWWJIaEWqarff3-Ux15sRG8sToh7X3b4SYh5Sc", "c2fBkprpp46V-PVn5ZdoevuKGz-Pt28EsqEkWMfnfrM"); //Test Meme

return result;

Expand Down
6 changes: 3 additions & 3 deletions src/aoWebWallet/Shared/ActionEditor.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@

<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">
<MudItem>
<MudChip>Token ID</MudChip> <MudChip Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@AoAction.Target?.Value?.ToShortAddress()</MudChip>
<MudChip T="string">Token ID</MudChip> <MudChip T="string" Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@AoAction.Target?.Value?.ToShortAddress()</MudChip>
</MudItem>
</MudHidden>
<MudHidden Breakpoint="Breakpoint.MdAndUp" Invert="true">
<MudItem>
<MudChip>Token ID</MudChip> <MudChip Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@AoAction.Target?.Value</MudChip>
<MudChip T="string">Token ID</MudChip> <MudChip T="string" Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@AoAction.Target?.Value</MudChip>
</MudItem>
</MudHidden>

<MudStack>
@foreach (var ActionParam in AoAction.Filled)
{
<MudItem>
<MudChip>@ActionParam.Key</MudChip> <MudChip Style="border-radius:0; margin-top:0;" Variant="Variant.Text" Color="Color.Success" SelectedColor="Color.Error">@ActionParam.Value</MudChip>
<MudChip T="string">@ActionParam.Key</MudChip> <MudChip T="string" Style="border-radius:0; margin-top:0;" Variant="Variant.Text" Color="Color.Success" SelectedColor="Color.Error">@ActionParam.Value</MudChip>
</MudItem>
}

Expand Down
9 changes: 4 additions & 5 deletions src/aoWebWallet/Shared/AddUploadWalletComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@ondragenter="@SetDragClass"
@ondragleave="@ClearDragClass"
@ondragend="@ClearDragClass">
<ButtonTemplate>
<ActivatorContent>
<MudPaper Height="100%"
Outlined="true"
Class="@_dragClass">
Expand All @@ -31,15 +31,14 @@
</MudText>
@foreach (var file in _fileNames)
{
<MudChip Color="Color.Dark" Text="@file.Name" />
<MudChip T="string" Color="Color.Dark" Text="@file.Name" />
}
</MudPaper>
<MudToolBar DisableGutters="true"
<MudToolBar Gutters="false"
Class="relative d-flex justify-center gap-4 z-30">
<MudButton HtmlTag="label"
Class="text-transform-none"
Color="Color.Primary"
for="@context.Id"
Variant="Variant.Filled">
Load .json wallet
</MudButton>
Expand All @@ -56,7 +55,7 @@
Clear
</MudButton> *@
</MudToolBar>
</ButtonTemplate>
</ActivatorContent>
</MudFileUpload>
</MudStack>
</MudStack>
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Shared/BalanceDataComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<MudPaper Class="py-2 pl-2">
<MudStack Row="true">
<div Class="d-custom-1">
<MudAvatar Image="@UrlHelper.GetArweaveUrl(BalanceDataVM.Token.TokenData?.Logo)" Size="Size.Medium" title="@BalanceDataVM.Token.TokenId" />
<MudAvatar Size="Size.Medium" title="@BalanceDataVM.Token.TokenId"><MudImage Src="@UrlHelper.GetArweaveUrl(BalanceDataVM.Token.TokenData?.Logo)" /></MudAvatar>
<MudStack Class="ml-4" Justify="Justify.Center" Spacing="0">
<MudText Class="d-font-weight-500" Typo="Typo.body1"><span Class="d-none d-sm-flex">@BalanceDataVM.Token.TokenData?.Name</span></MudText>
<MudText Typo="Typo.body2">@BalanceDataVM.Token.TokenData?.Ticker</MudText>
Expand Down
8 changes: 4 additions & 4 deletions src/aoWebWallet/Shared/Components/ActionInputComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<MudItem>
@if(ReadOnly)
{
<MudChip>@ActionParam.Key</MudChip> <MudChip Style="border-radius:0; margin-top:0;" Variant="Variant.Text" Color="Color.Primary">@ActionParam.Value</MudChip>
<MudChip T="string">@ActionParam.Key</MudChip> <MudChip T="string" Style="border-radius:0; margin-top:0;" Variant="Variant.Text" Color="Color.Primary">@ActionParam.Value</MudChip>
}
else
{
Expand Down Expand Up @@ -40,10 +40,10 @@ else


<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">
<MudChip Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@(ActionParam.Value?.ToShortAddress() ?? "Not selected")</MudChip>
<MudChip T="string" Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@(ActionParam.Value?.ToShortAddress() ?? "Not selected")</MudChip>
</MudHidden>
<MudHidden Breakpoint="Breakpoint.MdAndUp" Invert="true">
<MudChip Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@(ActionParam.Value ?? "Not selected")</MudChip>
<MudChip T="string" Style="border-radius:0; margin-top:0;" Class="KodeMono tx-wrap" Variant="Variant.Text" Color="Color.Primary">@(ActionParam.Value ?? "Not selected")</MudChip>
</MudHidden>
@* <MudTextField @ref="mudProcessField" T="string" MaxLength=43 Label="@ActionParam.Key" Validation="@(new Func<string, IEnumerable<string>>(ValidateProcess))" Variant="Variant.Text" ValueChanged="UpdateStringValue" /> *@
}
Expand Down Expand Up @@ -165,7 +165,7 @@ else
StateHasChanged();
}

private async Task<IEnumerable<Wallet>> WalletSearch(string value)
private async Task<IEnumerable<Wallet>> WalletSearch(string value, CancellationToken cancellationToken)

Check warning on line 168 in src/aoWebWallet/Shared/Components/ActionInputComponent.razor

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
// if text is null or empty, don't return values (drop-down will not open)
if (string.IsNullOrEmpty(value))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@if (ReadOnly)
{
<MudChip>@ActionParam.Key</MudChip> <MudChip Color="Color.Secondary"> @BalanceHelper.FormatBalance(long.Parse(ActionParam.Value ?? "0"), Token?.TokenData?.Denomination ?? 0) @Token?.TokenData?.Ticker</MudChip>
<MudChip T="string">@ActionParam.Key</MudChip> <MudChip T="string" Color="Color.Secondary"> @BalanceHelper.FormatBalance(long.Parse(ActionParam.Value ?? "0"), Token?.TokenData?.Denomination ?? 0) @Token?.TokenData?.Ticker</MudChip>
}
else
{
Expand All @@ -41,7 +41,7 @@

if (ActionParam.ParamType == ActionParamType.Balance)
{
<MudChip style="border-radius:0;" Variant="Variant.Text" Color="Color.Success" OnClick="SetBalance">Balance available: <br /> @BalanceHelper.FormatBalance(BalanceData?.Balance, Token?.TokenData?.Denomination ?? 1) @Token?.TokenData?.Ticker</MudChip>
<MudChip T="string" style="border-radius:0;" Variant="Variant.Text" Color="Color.Success" OnClick="SetBalance">Balance available: <br /> @BalanceHelper.FormatBalance(BalanceData?.Balance, Token?.TokenData?.Denomination ?? 1) @Token?.TokenData?.Ticker</MudChip>
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
{
<MudSelectItem Value="@wallet.Address" Class="wallet-item-background">
<MudStack Row="true">
@* <MudAvatar Image="@logoUrl" Size="Size.Large" Class="rounded-full" /> *@
<MudStack style="overflow: hidden;" Justify="Justify.Center" Spacing="0">
<div style="display:flex; white-space: nowrap;">
<MudText Class="KodeMono" style="text-overflow: ellipsis; white-space: nowrap;overflow: hidden;" Typo="Typo.h6">
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/Shared/Components/TokenListComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MudPaper Class="pa-4 pt-5 pb-4 mb-0">
<MudStack Row="true">
<div style="display:flex; flex-direction: row; align-items:center; max-height: 70px;" Class=" d-overflow-hidden">
<MudAvatar Class="mr-3" Image="@UrlHelper.GetArweaveUrl(token.TokenData?.Logo)" Size="Size.Large" />
<MudAvatar Class="mr-3" Size="Size.Large"><MudImage Src="@UrlHelper.GetArweaveUrl(token.TokenData?.Logo)" /></MudAvatar>
<MudStack Justify="Justify.Center" Spacing="0">
<MudText style="font-weight: 500;" Typo="Typo.body1">@token.TokenData?.Name</MudText>
<MudText Typo="Typo.body2">@token.TokenData?.Ticker</MudText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
string txUrl = $"transaction/{transfer.Id}";
<MudTimelineItem>
<ItemDot>
<MudAvatar Image="@UrlHelper.GetArweaveUrl(tokenData?.Logo)" Size="Size.Medium" title="@tokenData?.TokenId" />
<MudAvatar Size="Size.Medium" title="@tokenData?.TokenId"><MudImage Src="@UrlHelper.GetArweaveUrl(tokenData?.Logo)" /></MudAvatar>
</ItemDot>
<ItemContent>
@if (transfer.BlockHeight.HasValue)
Expand Down
4 changes: 2 additions & 2 deletions src/aoWebWallet/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center; margin-left:4px; padding:5px;">
<MudLink Href="https://twitter.com/aoWebWallet" Target="_blank">
<MudChip Class="cursor-pointer">
<MudChip T="string" Class="cursor-pointer">
<AvatarContent >
<MudAvatar Class="custom-avatar-size">
<MudImage Class="twitter-image" Src="images/twitter.svg"></MudImage>
Expand All @@ -46,7 +46,7 @@
</MudLink>

<MudLink Href="https://discord.gg/bahdqzpNYW" Target="_blank">
<MudChip Class="cursor-pointer">
<MudChip T="string" Class="cursor-pointer">
<AvatarContent >
<MudAvatar Class="custom-avatar-size">
<MudImage Class="discord-image" Src="images/discord.svg"></MudImage>
Expand Down
2 changes: 1 addition & 1 deletion src/aoWebWallet/aoWebWallet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="ArweaveBlazor" Version="0.0.9" />
<PackageReference Include="ClipLazor" Version="2.1.1" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.9.2" />
<PackageReference Include="MudBlazor" Version="6.20.0" />
<PackageReference Include="MudBlazor" Version="7.0.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="BlazorWasmPreRendering.Build" Version="4.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
Expand Down
6 changes: 5 additions & 1 deletion src/aoWebWallet/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ body {
height: 24px !important;
}

.mud-paper, .mud-tabs-toolbar {
.mud-paper, .mud-tabs-tabbar {
background-color: rgba(16,16,67,0.33) !important;
}

Expand All @@ -427,6 +427,10 @@ body {
background-color: rgba(16,16,67,1) !important;
}

.mud-list {
background-color: rgba(16,16,67,1) !important;
}

.float-right {
float:right;
}
Expand Down

0 comments on commit 813fca8

Please sign in to comment.