Updated the web UI to use the API. Reworked the looks of web UI
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user