23 lines
545 B
C#
23 lines
545 B
C#
using Microsoft.JSInterop;
|
|
|
|
namespace Moonlight.Frontend.Shared.Frontend;
|
|
|
|
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");
|
|
}
|
|
} |