Skip to content

Commit 1eaf82a

Browse files
Merge pull request #24 from Genocs/ver_120
Ver 220
2 parents 0022f35 + ae928ff commit 1eaf82a

29 files changed

+96
-89
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
### [v2.2.0](https://github.com/Genocs/blazor-wasm-template/compare/v1.2.0...v2.2.0)
8+
9+
> 1 October 2024
10+
11+
- **List of code changes:** [`dea8aa0`](https://github.com/Genocs/blazor-wasm-template/commit/dea8aa0043ee8d34e7088a22baada5c332b8c452)
12+
- Rename methods to Async and update event handlers [`b493368`](https://github.com/Genocs/blazor-wasm-template/commit/b4933685921b809ccca5930b88a6b0605948176d)
13+
- updated changelog [`2f8de86`](https://github.com/Genocs/blazor-wasm-template/commit/2f8de867b549a9cb29ab3d148f662149de6f0d04)
14+
715
#### [v1.2.0](https://github.com/Genocs/blazor-wasm-template/compare/v1.1.0...v1.2.0)
816

917
> 17 August 2024

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
[license-url]: https://github.com/Genocs/blazor-wasm-template/blob/main/LICENSE
1818
[build-shield]: https://github.com/Genocs/blazor-wasm-template/actions/workflows/build_and_test.yml/badge.svg?branch=main
1919
[build-url]: https://github.com/Genocs/blazor-wasm-template/actions/workflows/build_and_test.yml
20-
[package-shield]: https://img.shields.io/badge/nuget-v.1.2.0-blue?&label=latests&logo=nuget
20+
[package-shield]: https://img.shields.io/badge/nuget-v.2.2.0-blue?&label=latests&logo=nuget
2121
[package-url]: https://github.com/Genocs/blazor-wasm-template/actions/workflows/build_and_test.yml
2222
[downloads-shield]: https://img.shields.io/nuget/dt/Genocs.Microservice.Template.svg?color=2da44e&label=downloads&logo=nuget
2323
[downloads-url]: https://www.nuget.org/packages/Genocs.Microservice.Template
@@ -89,7 +89,7 @@ dotnet new --install Genocs.BlazorWasm.Template
8989
or, if you want to use a specific version of the template, use
9090

9191
```bash
92-
dotnet new --install Genocs.BlazorWasm.Template::1.2.0
92+
dotnet new --install Genocs.BlazorWasm.Template::2.2.0
9393
```
9494

9595
This would install the `Genocs Blazor WebAssembly Template` globally on your machine. Do note that, at the time of writing this documentation, the latest available version is **1.2.0** which is also one of the first stable release version of the package. It is highly likely that there is already a newer version available when you are reading this.

src/template/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Nullable>enable</Nullable>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="Roslynator.Analyzers" Version="4.12.4">
12+
<PackageReference Include="Roslynator.Analyzers" Version="4.12.6">
1313
<PrivateAssets>all</PrivateAssets>
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1515
</PackageReference>

src/template/scripts/pull-shared-from-webapi.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Write-Host "and then copy over the whole project from the webapi repository ($($
3636
Write-Host
3737
Read-Host -Prompt "Press ENTER to continue"
3838

39-
Remove-Item -Path "$destinationPath" -Recurse -Force
39+
Remove-Item -Path "$destinationPath" -Recurse -Force
4040
Copy-Item -Path (Get-Item -Path "$sourcePath" -Exclude $excludes).FullName -Destination "$destinationPath" -Recurse -Force
4141

4242
Write-Host "Changes have been pulled."

src/template/src/Client/Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
1414
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
1515
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.8" />
16-
<PackageReference Include="MudBlazor" Version="7.6.0" />
16+
<PackageReference Include="MudBlazor" Version="7.8.0" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/template/src/Client/Components/EntityTable/AddEditModal.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@
3030
</DialogContent>
3131

3232
<DialogActions>
33-
<MudButton DisableElevation=true Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" OnClick="MudDialog.Cancel">
33+
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" OnClick="MudDialog.Cancel">
3434
@L["Cancel"]
3535
</MudButton>
3636
@if (IsCreate)
3737
{
38-
<MudButton DisableElevation=true Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" ButtonType="ButtonType.Submit" Color="Color.Success">
38+
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" ButtonType="ButtonType.Submit" Color="Color.Success">
3939
@L["Save"]
4040
</MudButton>
4141
}
4242
else
4343
{
44-
<MudButton DisableElevation=true Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Update" ButtonType="ButtonType.Submit" Color="Color.Secondary">
44+
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Update" ButtonType="ButtonType.Submit" Color="Color.Secondary">
4545
@L["Update"]
4646
</MudButton>
4747
}

src/template/src/Client/Components/EntityTable/EntityTable.razor

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
@if (_canSearch && (Context.AdvancedSearchEnabled || AdvancedSearchContent is not null))
1818
{
1919
<MudExpansionPanel @bind-IsExpanded="_advancedSearchExpanded"
20-
Style="padding:10px!important; margin-bottom:10px!important;border-radius: var(--mud-default-borderradius) !important;"
21-
Class="mud-elevation-25" Text="@L["Advanced Search"]">
20+
Style="padding:10px!important; margin-bottom:10px!important;border-radius: var(--mud-default-borderradius) !important;"
21+
Class="mud-elevation-25" Text="@L["Advanced Search"]">
2222
<MudTextField @bind-Value="SearchString" Immediate="true"
23-
Placeholder="@($"{L["Search for"]} {Context.EntityNamePlural}")" Adornment="Adornment.Start"
24-
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium"
25-
Style="flex:none!important;margin:0px!important" TextChanged="OnSearchStringChanged">
23+
Placeholder="@($"{L["Search for"]} {Context.EntityNamePlural}")" Adornment="Adornment.Start"
24+
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium"
25+
Style="flex:none!important;margin:0px!important" TextChanged="OnSearchStringChanged">
2626
</MudTextField>
2727
@if (Context.AdvancedSearchEnabled)
2828
{
2929
<div style="margin-top:10px!important">
3030
<MudCheckBox Label="All Columns" T="bool" Value="Context.AllColumnsChecked"
31-
ValueChanged="Context.AllColumnsCheckChanged"></MudCheckBox>
31+
ValueChanged="Context.AllColumnsCheckChanged"></MudCheckBox>
3232
@foreach (var field in Context.Fields)
3333
{
3434
<MudCheckBox @bind-Value="@field.CheckedForSearch" Label="@(field.DisplayName)"></MudCheckBox>
@@ -41,33 +41,33 @@
4141
}
4242

4343
<GnxTable @ref="_table" Elevation="25" ServerData="@ServerReloadFunc" Items="@_entityList" Filter="LocalSearch"
44-
Loading="@Loading" LoadingProgressColor="@Color.Secondary" ChildRowContent="@ChildRowContent">
44+
Loading="@Loading" LoadingProgressColor="@Color.Secondary" ChildRowContent="@ChildRowContent">
4545

4646
<ToolBarContent>
4747
<div class="justify-center mud-text-align-center">
4848
@if (_canCreate)
4949
{
50-
<MudButton DisableElevation Variant="Variant.Filled" Color="Color.Primary"
51-
OnClick="(() => InvokeModal())" StartIcon="@Icons.Material.Filled.Add"
52-
IconColor="Color.Surface">@L["Create"]</MudButton>
50+
<MudButton Variant="Variant.Filled" Color="Color.Primary"
51+
OnClick="(() => InvokeModal())" StartIcon="@Icons.Material.Filled.Add"
52+
IconColor="Color.Surface">@L["Create"]</MudButton>
5353
}
5454
@if (_canExport)
5555
{
56-
<MudButton DisableElevation Variant="Variant.Filled" Color="Color.Tertiary"
57-
OnClick="(() => ExportAsync())" StartIcon="@Icons.Material.Filled.ImportExport"
58-
Style="margin-left: 5px;" IconColor="Color.Surface">@L["Export"]</MudButton>
56+
<MudButton Variant="Variant.Filled" Color="Color.Tertiary"
57+
OnClick="(() => ExportAsync())" StartIcon="@Icons.Material.Filled.ImportExport"
58+
Style="margin-left: 5px;" IconColor="Color.Surface">@L["Export"]</MudButton>
5959
}
60-
<MudButton DisableElevation Variant="Variant.Filled" OnClick="ReloadDataAsync"
61-
StartIcon="@Icons.Material.Filled.Refresh" IconColor="Color.Surface" Color="Color.Secondary"
62-
Style="margin-left: 5px;">@L["Reload"]</MudButton>
60+
<MudButton Variant="Variant.Filled" OnClick="ReloadDataAsync"
61+
StartIcon="@Icons.Material.Filled.Refresh" IconColor="Color.Surface" Color="Color.Secondary"
62+
Style="margin-left: 5px;">@L["Reload"]</MudButton>
6363
</div>
6464
<MudSpacer />
6565
@if (_canSearch && !_advancedSearchExpanded)
6666
{
6767
<MudTextField @bind-Value="SearchString" Immediate="true" FullWidth="false"
68-
Placeholder="@($"{L["Search for"]} {Context.EntityNamePlural}")" Adornment="Adornment.End"
69-
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0 mb-3"
70-
TextChanged="OnSearchStringChanged">
68+
Placeholder="@($"{L["Search for"]} {Context.EntityNamePlural}")" Adornment="Adornment.End"
69+
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0 mb-3"
70+
TextChanged="OnSearchStringChanged">
7171
</MudTextField>
7272
}
7373
</ToolBarContent>
@@ -117,9 +117,9 @@
117117
}
118118
else if (HasActions)
119119
{
120-
<MudMenu Label="@L["Actions"]" Variant="Variant.Filled" DisableElevation="true"
121-
EndIcon="@Icons.Material.Filled.KeyboardArrowDown" IconColor="Color.Secondary" Direction="Direction.Left"
122-
OffsetX="true">
120+
<MudMenu Label="@L["Actions"]" Variant="Variant.Filled"
121+
EndIcon="@Icons.Material.Filled.KeyboardArrowDown" IconColor="Color.Secondary" Direction="Direction.Left"
122+
OffsetX="true">
123123
@if (CanUpdateEntity(context))
124124
{
125125
<MudMenuItem @onclick="@(() => InvokeModal(context))">@L["Edit"]</MudMenuItem>
@@ -136,9 +136,8 @@
136136
}
137137
else
138138
{
139-
<MudButton Variant="Variant.Filled" DisableElevation="true"
140-
StartIcon="@Icons.Material.Filled.DoNotTouch" IconColor="Color.Secondary" Size="Size.Small"
141-
Color="Color.Surface">
139+
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.DoNotTouch" IconColor="Color.Secondary" Size="Size.Small"
140+
Color="Color.Surface">
142141
@L["No Allowed Actions"]
143142
</MudButton>
144143
}

src/template/src/Client/Components/Localization/LanguageSelector.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@inject IStringLocalizer<LanguageSelector> L
22

33
<MudTooltip Text="@CurrentLanguage">
4-
<MudMenu Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" AnchorOrigin="Origin.BottomLeft" OffsetY="true"
5-
Dense="true">
4+
<MudMenu Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" AnchorOrigin="Origin.BottomLeft"
5+
Dense="true">
66
@foreach (var language in LocalizationConstants.SupportedLanguages)
77
{
88
if (language.Code == CurrentLanguage)

src/template/src/Client/Components/ThemeManager/ColorPanel.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<MudGrid Spacing="0">
1313
@foreach (var color in Colors)
1414
{
15-
<MudButton OnClick="@(() => ColorClicked(color))"
15+
<MudButton OnClick="@(() => Async(color))"
1616
style="padding:0px!important;border-radius:0px!important">
1717
<ChildContent>
1818
<div style="@($"background: {color};"); width: 65px; height: 65px">

src/template/src/Client/Components/ThemeManager/ColorPanel.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class ColorPanel
1717
[Parameter]
1818
public EventCallback<string> OnColorClicked { get; set; }
1919

20-
protected async Task ColorClicked(string color)
20+
protected async Task Async(string color)
2121
{
2222
await OnColorClicked.InvokeAsync(color);
2323
}

0 commit comments

Comments
 (0)