Update registration

This commit is contained in:
2025-10-08 20:33:59 +09:00
parent 96172029d4
commit 257cd3e35e
16 changed files with 113 additions and 218 deletions

View File

@ -3,8 +3,7 @@
@implements IDisposable
@inject NavigationManager NavigationManager
<RadzenComponents @rendermode="InteractiveServer" />
@inject NotificationService NotificationService
<RadzenLayout Style="grid-template-areas: 'rz-sidebar rz-header' 'rz-sidebar rz-body'">
<RadzenHeader>
@ -25,11 +24,7 @@
<AuthorizeView>
<Authorized>
<RadzenPanelMenuItem Text="@context.User.Identity?.Name" />
<RadzenPanelMenuItem Path="javascript:document.forms['logout'].submit();" Text="Выйти" Icon="logout" />
<form action="account/logout" method="post" name="logout">
<AntiforgeryToken />
<input type="hidden" name="ReturnUrl" value="@currentUrl" />
</form>
<RadzenPanelMenuItem Path="/identity/logout" Text="Выйти" Icon="logout" />
</Authorized>
<NotAuthorized>
<RadzenPanelMenuItem Path="/account/register" Text="Регистрация" Icon="person_add" />
@ -40,6 +35,7 @@
</RadzenStack>
</RadzenSidebar>
<RadzenBody>
<RadzenNotification Style="position: absolute;top: 0; right: 0;" />
@Body
<div id="blazor-error-ui">
Произошла непредвиденная ошибка
@ -69,6 +65,8 @@
{
currentUrl = NavigationManager.ToBaseRelativePath(e.Location);
NotificationService.Messages.Clear();
StateHasChanged();
}
}