Improved AccountLayout
This commit is contained in:
parent
db1a4bba60
commit
888691ed9f
|
@ -2,27 +2,23 @@
|
||||||
@layout Wave.Components.Layout.MainLayout
|
@layout Wave.Components.Layout.MainLayout
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
||||||
@if (HttpContext is null)
|
@if (HttpContext is null) {
|
||||||
{
|
<span class="loading loading-spinner loading-lg"></span>
|
||||||
<p>Loading...</p>
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Body
|
@Body
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[CascadingParameter]
|
[CascadingParameter]
|
||||||
private HttpContext? HttpContext { get; set; }
|
private HttpContext? HttpContext { get; set; }
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet() {
|
||||||
{
|
if (HttpContext is null) {
|
||||||
if (HttpContext is null)
|
|
||||||
{
|
|
||||||
// If this code runs, we're currently rendering in interactive mode, so there is no HttpContext.
|
// If this code runs, we're currently rendering in interactive mode, so there is no HttpContext.
|
||||||
// The identity pages need to set cookies, so they require an HttpContext. To achieve this we
|
// The identity pages need to set cookies, so they require an HttpContext. To achieve this we
|
||||||
// must transition back from interactive mode to a server-rendered page.
|
// must transition back from interactive mode to a server-rendered page.
|
||||||
NavigationManager.Refresh(forceReload: true);
|
NavigationManager.Refresh(forceReload: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
2
Wave/wwwroot/css/main.min.css
vendored
2
Wave/wwwroot/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue