@@ -129,6 +131,8 @@
$"Successfully created theme {Request.Name}"
);
+ await FrontendService.ReloadAsync();
+
Navigation.NavigateTo("/admin/system?tab=themes");
}
}
\ No newline at end of file
diff --git a/Moonlight.Frontend/UI/Admin/Views/Sys/Themes/Update.razor b/Moonlight.Frontend/UI/Admin/Views/Sys/Themes/Update.razor
index adb6111f..2de60d7e 100644
--- a/Moonlight.Frontend/UI/Admin/Views/Sys/Themes/Update.razor
+++ b/Moonlight.Frontend/UI/Admin/Views/Sys/Themes/Update.razor
@@ -4,6 +4,7 @@
@using Moonlight.Shared
@using LucideBlazor
@using Moonlight.Frontend.Mappers
+@using Moonlight.Frontend.Services
@using Moonlight.Shared.Http.Requests.Themes
@using Moonlight.Shared.Http.Responses.Themes
@using ShadcnBlazor.Buttons
@@ -21,6 +22,7 @@
@inject HttpClient HttpClient
@inject NavigationManager Navigation
@inject ToastService ToastService
+@inject FrontendService FrontendService
@@ -142,6 +144,8 @@
$"Successfully updated theme {Request.Name}"
);
+ await FrontendService.ReloadAsync();
+
Navigation.NavigateTo("/admin/system?tab=themes");
}
}
\ No newline at end of file
diff --git a/Moonlight.Frontend/UI/Shared/Partials/AppSidebar.razor b/Moonlight.Frontend/UI/Shared/Partials/AppSidebar.razor
index 2112841d..6aca26b3 100644
--- a/Moonlight.Frontend/UI/Shared/Partials/AppSidebar.razor
+++ b/Moonlight.Frontend/UI/Shared/Partials/AppSidebar.razor
@@ -1,11 +1,14 @@
-@using Microsoft.AspNetCore.Authorization
+@using System.Text.Json
+@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Moonlight.Frontend.Interfaces
@using Moonlight.Frontend.Models
+@using Moonlight.Frontend.Services
@using ShadcnBlazor.Sidebars
@inject NavigationManager Navigation
@inject IAuthorizationService AuthorizationService
+@inject FrontendService FrontendService
@inject IEnumerable
Providers
@implements IDisposable
@@ -21,7 +24,7 @@
- Moonlight
+ @FrontendConfiguration?.Name
@@ -74,6 +77,7 @@
[CascadingParameter] public Task AuthState { get; set; }
private readonly List Items = new();
+ private FrontendConfiguration? FrontendConfiguration;
protected override async Task OnInitializedAsync()
{
@@ -98,6 +102,10 @@
}
Navigation.LocationChanged += OnLocationChanged;
+
+ FrontendConfiguration = await FrontendService.GetConfigurationAsync();
+
+ Console.WriteLine(JsonSerializer.Serialize(FrontendConfiguration));
}
private async void OnLocationChanged(object? sender, LocationChangedEventArgs e)