Added theme saving. Added interfaces for overview pages. Renamed sidebar interface function
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
@using Moonlight.Client.Interfaces
|
||||
@using Moonlight.Client.Models
|
||||
@using Moonlight.Client.Services
|
||||
@using Moonlight.Client.UI.Layouts
|
||||
|
||||
@inject NavigationManager Navigation
|
||||
@@ -129,8 +128,12 @@
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Items = SidebarItemProviders
|
||||
.SelectMany(x => x.Get())
|
||||
var sidebarItems = new List<SidebarItem>();
|
||||
|
||||
foreach (var provider in SidebarItemProviders)
|
||||
provider.ModifySidebar(sidebarItems);
|
||||
|
||||
Items = sidebarItems
|
||||
//.Where(x => x.Permission == null || (x.Permission != null && IdentityService.HasPermission(x.Permission)))
|
||||
.GroupBy(x => x.Group ?? "")
|
||||
.OrderByDescending(x => string.IsNullOrEmpty(x.Key))
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
@using MoonCore.Helpers
|
||||
@using Moonlight.Client.Services
|
||||
@using Moonlight.Client.UI.Components
|
||||
@using Moonlight.Shared.Http.Requests.Admin.Sys
|
||||
@using Moonlight.Shared.Misc
|
||||
|
||||
@inject HttpApiClient ApiClient
|
||||
@@ -199,9 +200,13 @@
|
||||
return;
|
||||
}
|
||||
|
||||
await ToastService.Success("Successfully saved theme settings");
|
||||
// Send new variables
|
||||
await ApiClient.Patch("api/admin/system/theme", new UpdateThemeRequest()
|
||||
{
|
||||
Variables = ThemeService.Variables
|
||||
});
|
||||
|
||||
//TODO: Implement saving on the api server
|
||||
await ToastService.Success("Successfully saved theme settings");
|
||||
}
|
||||
|
||||
private async Task Export()
|
||||
|
||||
Reference in New Issue
Block a user