Updated the web UI to use the API. Reworked the looks of web UI

This commit is contained in:
2024-12-14 17:31:36 +02:00
parent 9102cfaa47
commit 54be74b1cb
27 changed files with 227 additions and 738 deletions

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
@@ -9,14 +9,38 @@
<link rel="stylesheet" href="app.css"/>
<link rel="stylesheet" href="DiscordBotWebUI.styles.css"/>
<link rel="icon" type="image/png" href="favicon.png"/>
<RadzenTheme Theme="material" @rendermode="InteractiveServer" />
<link rel="stylesheet" id="theme" href="_content/Radzen.Blazor/css/standard-dark.css"/>
<HeadOutlet/>
</head>
<body>
<Routes @rendermode="InteractiveServer"/>
<script src="_framework/blazor.web.js"></script>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
</body>
</html>
</html>
@code {
[CascadingParameter]
private HttpContext HttpContext { get; set; }
[Inject]
private ThemeService ThemeService { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
if (HttpContext != null)
{
var theme = "dark";
if (!string.IsNullOrEmpty(theme))
{
ThemeService.SetTheme(theme, false);
}
}
}
}