@page "/admin/system/customisation/themes/{id:int}" @using Moonlight.Client.Services @using Moonlight.Shared.Http.Requests.Admin.Sys.Theme @using Moonlight.Shared.Http.Responses.Admin @using Moonlight.Client.UI.Components @inject ThemeService ThemeService @inject ToastService ToastService @inject NavigationManager Navigation Back Update
Toggle on in order to enable the theme globally (a reload is required to apply)
This field will be used for update checks
Optional: Specify a url here which people should get redirected for donating to the author
Optional: Specify a url here which returns the latest version of this theme as the raw exported file
@code { [Parameter] public int Id { get; set; } private ThemeResponse Response; private UpdateThemeRequest Request; private HandleForm Form; private async Task LoadAsync(LazyLoader _) { Response = await ThemeService.GetAsync(Id); Request = new() { Content = Response.Content, Author = Response.Author, Name = Response.Name, Version = Response.Version, DonateUrl = Response.DonateUrl, IsEnabled = Response.IsEnabled, UpdateUrl = Response.UpdateUrl }; } private async Task OnValidSubmit() { await ThemeService.UpdateAsync(Id, Request); await ToastService.SuccessAsync("Successfully updated theme"); Navigation.NavigateTo("/admin/system/customisation"); } }