* Changed views to have them in the same layout
* Added Authorization
This commit is contained in:
35
OrdersManagement/Components/Pages/Unauthorized.razor
Normal file
35
OrdersManagement/Components/Pages/Unauthorized.razor
Normal file
@@ -0,0 +1,35 @@
|
||||
@page "/Unauthorized"
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [AllowAnonymous]
|
||||
|
||||
@using Syncfusion.Blazor.Cards
|
||||
@using Syncfusion.Blazor.Buttons
|
||||
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<div class="h-100 d-flex justify-content-center align-items-start pt-5">
|
||||
<SfCard CssClass="text-center shadow" style="max-width: 500px;">
|
||||
<CardHeader>
|
||||
<h3 class="text-warning">Brak autoryzacji</h3>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p class="text-muted mb-4">
|
||||
Ups! Wygląda na to, że nie masz dostępu do tej strony. Aby kontynuować, zaloguj się do swojego konta.
|
||||
</p>
|
||||
<SfButton CssClass="e-primary" IsPrimary="true" @onclick="NavigateToLogin">
|
||||
Przejdź do logowania
|
||||
</SfButton>
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
<small class="text-muted">Orders Management System © @(DateTime.Now.Year)</small>
|
||||
</CardFooter>
|
||||
</SfCard>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private void NavigateToLogin()
|
||||
{
|
||||
NavigationManager.NavigateTo("/login");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user