mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add .NET 8 templated projects.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
@inherits LayoutComponentBase
|
||||
@layout Aaru.Server.New.Components.Layout.MainLayout
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
@if(HttpContext is null)
|
||||
{
|
||||
<p>Loading...</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Body
|
||||
}
|
||||
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
private HttpContext? HttpContext { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if(HttpContext is null)
|
||||
{
|
||||
// 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
|
||||
// must transition back from interactive mode to a server-rendered page.
|
||||
NavigationManager.Refresh(forceReload: true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user