Implemented frontend configuration service and dynamic theme reloading integration. Updated sidebar to display dynamic application name.
All checks were successful
Dev Publish: Nuget / Publish Dev Packages (push) Successful in 48s
All checks were successful
Dev Publish: Nuget / Publish Dev Packages (push) Successful in 48s
This commit was merged in pull request #6.
This commit is contained in:
24
Moonlight.Frontend/Services/FrontendService.cs
Normal file
24
Moonlight.Frontend/Services/FrontendService.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Microsoft.JSInterop;
|
||||
using Moonlight.Frontend.Models;
|
||||
|
||||
namespace Moonlight.Frontend.Services;
|
||||
|
||||
public class FrontendService
|
||||
{
|
||||
private readonly IJSRuntime JsRuntime;
|
||||
|
||||
public FrontendService(IJSRuntime jsRuntime)
|
||||
{
|
||||
JsRuntime = jsRuntime;
|
||||
}
|
||||
|
||||
public async Task<FrontendConfiguration> GetConfigurationAsync()
|
||||
{
|
||||
return await JsRuntime.InvokeAsync<FrontendConfiguration>("frontendConfig.getConfiguration");
|
||||
}
|
||||
|
||||
public async Task ReloadAsync()
|
||||
{
|
||||
await JsRuntime.InvokeVoidAsync("frontendConfig.reload");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user