You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
<CascadingAuthenticationState>
|
|
<Router AppAssembly="@typeof(App).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
|
|
<NotAuthorized>
|
|
<!-- Content to display when the user is not authorized
|
|
<MudText Typo="Typo.body1">You are not authorized to access this page. <MudLink Typo="Typo.body1" Href="/userlogin">Go to Login</MudLink></MudText>
|
|
-->
|
|
<RedirectToLogin />
|
|
</NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
</Found>
|
|
<NotFound>
|
|
<PageTitle>Not found</PageTitle>
|
|
<LayoutView Layout="@typeof(MainLayout)">
|
|
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>
|
|
</CascadingAuthenticationState>
|
|
|
|
@*<CascadingAuthenticationState>
|
|
<Router AppAssembly="@typeof(App).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
|
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
</Found>
|
|
<NotFound>
|
|
<PageTitle>Not found</PageTitle>
|
|
<LayoutView Layout="@typeof(MainLayout)">
|
|
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>
|
|
</CascadingAuthenticationState>*@
|
|
|
|
|
|
@*<Router AppAssembly="@typeof(App).Assembly">
|
|
<Found Context="routeData">
|
|
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
|
</Found>
|
|
<NotFound>
|
|
<PageTitle>Not found</PageTitle>
|
|
<LayoutView Layout="@typeof(MainLayout)">
|
|
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>*@ |