Cleaned up using in project. Improved prohect structure and refactored page names. Upgraded dependencies
This commit is contained in:
@@ -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)]
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user