finalizare 1.0

This commit is contained in:
andrei-mihnea-cerbu
2024-05-21 12:10:53 +03:00
parent f7795f7519
commit 1cc1d34003
11268 changed files with 2102399 additions and 10909 deletions
+35 -12
View File
@@ -1,12 +1,35 @@
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(AuthLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(AuthLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
<CascadingAuthenticationState>
<RoleBasedRedirect/>
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
<Authorizing>
<p>Loading...</p>
</Authorizing>
<NotAuthorized>
<NotAuthorizedHandler/>
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound >
<LayoutView Layout="@typeof(MainLayout)">
<PageNotFoundHandler/>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>
@code {
private class RedirectToLogin : ComponentBase
{
[Inject] private NavigationManager Navigation { get; set; }
protected override void OnInitialized()
{
Navigation.NavigateTo("/login");
}
}
}