Skip to content

Commit ea31ea6

Browse files
committed
Update dependencies, refactor, and enhance UI
- Updated package versions, including Roslynator, MediatR, and MudBlazor. - Removed deprecated properties and improved code consistency. - Enhanced UI components, including `MudAvatar` and `MudToggleIconButton`. - Updated outdated links to point to the new documentation site. - Adjusted target frameworks, dropping support for `net6.0` and `net7.0`. - Refactored typography and theme definitions for maintainability. - Simplified interfaces and improved navigation consistency. - Updated localized resource files with new version numbers and links. - Re-added `stylecop.json` to the solution file. - Fixed minor issues, including property name corrections and redundant attributes.
1 parent a7282bf commit ea31ea6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+182
-181
lines changed

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.9">
12+
<PackageReference Include="Roslynator.Analyzers" Version="4.14.1">
1313
<PrivateAssets>all</PrivateAssets>
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1515
</PackageReference>

src/template/Genocs.BlazorWasm.Template.sln

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Solution Items", "_Solutio
2121
Dockerfile = Dockerfile
2222
dotnet.ruleset = dotnet.ruleset
2323
global.json = global.json
24-
stylecop.json = stylecop.json
25-
EndProjectSection
26-
EndProject
27-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F529F1FF-B2FD-46D5-80A1-D4C726230E40}"
28-
ProjectSection(SolutionItems) = preProject
2924
scripts\nswag-regen.ps1 = scripts\nswag-regen.ps1
3025
scripts\pull-shared-from-webapi.ps1 = scripts\pull-shared-from-webapi.ps1
26+
stylecop.json = stylecop.json
3127
EndProjectSection
3228
EndProject
3329
Global

src/template/src/Client/Client.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="Mapster" Version="7.4.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
14-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
15-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.0" />
16-
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="9.0.0" />
17-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
18-
<PackageReference Include="MudBlazor" Version="7.15.0" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.10" />
14+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.10" PrivateAssets="all" />
15+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.10" />
16+
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="9.0.10" />
17+
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.10" />
18+
<PackageReference Include="MudBlazor" Version="8.13.0" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

src/template/src/Client/Components/Common/ErrorHandler.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public partial class ErrorHandler
99
[Inject]
1010
public IAuthenticationService AuthService { get; set; } = default!;
1111

12-
public List<Exception> _receivedExceptions = new();
12+
public List<Exception> _receivedExceptions = [];
1313

1414
protected override async Task OnErrorAsync(Exception exception)
1515
{

src/template/src/Client/Components/Common/PersonCard.razor

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
<CardHeaderAvatar>
44
@if (string.IsNullOrEmpty(this.ImageUri))
55
{
6-
<MudAvatar Size="Size.Medium" Color="Color.Primary" Class="ma-2">@FullName?.ToUpper().FirstOrDefault()
6+
<MudAvatar Size="Size.Medium" Color="Color.Primary" Class="ma-2">
7+
@FullName?.ToUpper().FirstOrDefault()
78
</MudAvatar>
89
}
910
else
1011
{
11-
<MudAvatar MudImage="@ImageUri" />
12+
<MudAvatar>
13+
<MudImage Src="@ImageUri"></MudImage>
14+
</MudAvatar>
1215
}
1316
</CardHeaderAvatar>
1417
<CardHeaderContent>

src/template/src/Client/Components/Dialogs/DeleteConfirmation.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
@code {
2020
[CascadingParameter]
21-
MudDialogInstance MudDialog { get; set; } = default!;
21+
IMudDialogInstance MudDialog { get; set; } = default!;
2222

2323
[Parameter]
2424
public string? ContentText { get; set; }

src/template/src/Client/Components/Dialogs/Logout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
[Parameter] public Color Color { get; set; }
2828

29-
[CascadingParameter] MudDialogInstance MudDialog { get; set; } = default!;
29+
[CascadingParameter] IMudDialogInstance MudDialog { get; set; } = default!;
3030

3131
async Task Submit()
3232
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public partial class AddEditModal<TRequest> : IAddEditModal<TRequest>
3333
public string? SuccessMessage { get; set; }
3434

3535
[CascadingParameter]
36-
private MudDialogInstance MudDialog { get; set; } = default!;
36+
private IMudDialogInstance MudDialog { get; set; } = default!;
3737

3838
private CustomValidation? _customValidation;
3939

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@
118118
else if (HasActions)
119119
{
120120
<MudMenu Label="@L["Actions"]" Variant="Variant.Filled"
121-
EndIcon="@Icons.Material.Filled.KeyboardArrowDown" IconColor="Color.Secondary" Direction="Direction.Left"
122-
OffsetX="true">
121+
EndIcon="@Icons.Material.Filled.KeyboardArrowDown" IconColor="Color.Secondary" Direction="Direction.Left">
123122
@if (CanUpdateEntity(context))
124123
{
125124
<MudMenuItem @onclick="@(() => InvokeModal(context))">@L["Edit"]</MudMenuItem>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<MudText Class="mt-1">Dark Mode</MudText>
1111
}
1212
<MudToggleIconButton @bind-Toggled="_isDarkMode" Icon="@Icons.Material.Filled.WbSunny"
13-
Color="@Color.Warning" Title="Off" Class="d-flex ml-auto" ToggledIcon="@Icons.Material.Filled.DarkMode"
14-
ToggledColor="@Color.Surface" ToggledTitle="On" style="left:8px!important" @onclick="@ToggleDarkModeAsync" />
13+
Color="@Color.Warning" title="@(_isDarkMode ? "Off": "On")" Class="d-flex ml-auto" ToggledIcon="@Icons.Material.Filled.DarkMode"
14+
ToggledColor="@Color.Surface" style="left:8px!important" @onclick="@ToggleDarkModeAsync" />
1515
</div>
1616
</TitleContent>
1717
</MudExpansionPanel>

0 commit comments

Comments
 (0)