Cleaned up using in project. Improved prohect structure and refactored page names. Upgraded dependencies

This commit is contained in:
2026-03-13 08:53:04 +01:00
parent 1257e8b950
commit 6d1e6e1690
37 changed files with 265 additions and 254 deletions

View File

@@ -1,4 +1,5 @@
@page "/admin/system/themes/create"
@using LucideBlazor
@using Microsoft.AspNetCore.Authorization
@using Moonlight.Frontend.Infrastructure.Helpers
@@ -13,7 +14,6 @@
@using ShadcnBlazor.Fields
@using ShadcnBlazor.Inputs
@using ShadcnBlazor.Switches
@using SerializationContext = Moonlight.Shared.SerializationContext
@attribute [Authorize(Policy = Permissions.Themes.Create)]

View File

@@ -10,7 +10,6 @@
@using ShadcnBlazor.Extras.AlertDialogs
@using ShadcnBlazor.Extras.Toasts
@using ShadcnBlazor.Tabels
@using SerializationContext = Moonlight.Shared.SerializationContext
@inject ToastService ToastService
@inject NavigationManager Navigation
@@ -142,20 +141,11 @@
return new DataGridResponse<ThemeDto>(response!.Data, response.TotalLength);
}
private void Create()
{
Navigation.NavigateTo("/admin/system/themes/create");
}
private void Create() => Navigation.NavigateTo("/admin/system/themes/create");
private void Edit(ThemeDto theme)
{
Navigation.NavigateTo($"/admin/system/themes/{theme.Id}");
}
private void Edit(ThemeDto theme) => Navigation.NavigateTo($"/admin/system/themes/{theme.Id}");
private void Download(ThemeDto theme)
{
Navigation.NavigateTo($"api/admin/themes/{theme.Id}/export", true);
}
private void Download(ThemeDto theme) => Navigation.NavigateTo($"api/admin/themes/{theme.Id}/export", true);
private async Task DeleteAsync(ThemeDto theme)
{

View File

@@ -7,7 +7,7 @@ namespace Moonlight.Frontend.Admin.Sys.Themes;
[Mapper]
[SuppressMessage("Mapper", "RMG020:No members are mapped in an object mapping")]
[SuppressMessage("Mapper", "RMG012:No members are mapped in an object mapping")]
public partial class ThemeMapper
public static partial class ThemeMapper
{
public static partial UpdateThemeDto ToUpdate(ThemeDto theme);
}

View File

@@ -1,4 +1,5 @@
@page "/admin/system/themes/{Id:int}"
@using LucideBlazor
@using Microsoft.AspNetCore.Authorization
@using Moonlight.Frontend.Infrastructure.Helpers
@@ -14,7 +15,6 @@
@using ShadcnBlazor.Fields
@using ShadcnBlazor.Inputs
@using ShadcnBlazor.Switches
@using SerializationContext = Moonlight.Shared.SerializationContext
@attribute [Authorize(Policy = Permissions.Themes.Edit)]