@page "/admin/system/advanced" @using Microsoft.AspNetCore.Authorization @using MoonCore.Blazor.FlyonUi.Helpers @using MoonCore.Helpers @attribute [Authorize(Policy = "permissions:admin.system.advanced")] @inject HttpApiClient ApiClient @inject DownloadService DownloadService
Frontend hosting files

If you want to host your moonlight frontend on a static web server instead of it being hosted by the api server (useful for hosting on a cdn for high availability) you can use this helper. By pressing the button below moonlight will generate a zip file containing everything you need to host the frontend. Next to the WASM app itself it automatically includes your installed theme and plugins. For more information, have a look at our docs

Generate frontend.zip
@code { private async Task GenerateFrontend(WButton _) { var stream = await ApiClient.GetStream("api/admin/system/advanced/frontend"); await DownloadService.Download("frontend.zip", stream); } }