LANCommander/LANCommander.Server/UI/Pages/Settings/Appearance.razor

34 lines
1.1 KiB
Text
Raw Permalink Normal View History

@page "/Settings/Appearance"
@inject ModalService ModalService
@attribute [Authorize(Roles = RoleService.AdministratorRoleName)]
<PageHeader Title="Appearance" />
2025-02-04 19:32:33 -06:00
<PageContent>
<h3>Custom Stylesheet</h3>
<p>Modify the appearance of the web UI using a custom stylesheet.</p>
<Button Type="@ButtonType.Primary" OnClick="@(() => EditStylesheet("custom.css", "Custom Stylesheet"))">Edit</Button>
<Divider />
<h3>Pages Stylesheet</h3>
<p>Define a custom stylesheet to be used in <a href="/Pages/Edit">Pages</a>.</p>
<Button Type="@ButtonType.Primary" OnClick="@(() => EditStylesheet("pages.css", "Pages Stylesheet"))">Edit</Button>
2025-02-04 19:32:33 -06:00
</PageContent>
@code {
async void EditStylesheet(string fileName, string title)
{
var modalOptions = new ModalOptions()
{
Title = title,
Maximizable = false,
DefaultMaximized = true,
Closable = true,
OkText = "Save"
};
var modalRef = await ModalService.CreateModalAsync<StylesheetEditorDialog, string>(modalOptions, fileName);
}
}