mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-05-06 15:34:03 +02:00
28 lines
995 B
Plaintext
28 lines
995 B
Plaintext
@using Phantom.Web.Services
|
|
@inject Navigation Navigation
|
|
|
|
<CascadingAuthenticationState>
|
|
<Router AppAssembly="@typeof(App).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
|
|
<NotAuthorized>
|
|
@if (context.User.Identity is { IsAuthenticated: true }) {
|
|
<h1>Forbidden</h1>
|
|
<p role="alert">You do not have permission to visit this page.</p>
|
|
}
|
|
else {
|
|
_ = Navigation.NavigateTo("login" + QueryString.Create("return", Navigation.CreateReturnUrl()), forceLoad: true);
|
|
}
|
|
</NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
</Found>
|
|
<NotFound>
|
|
<LayoutView Layout="@typeof(MainLayout)">
|
|
<h1>Not Found</h1>
|
|
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>
|
|
</CascadingAuthenticationState>
|