decePubClient/Shared/LoginDisplay.razor
2022-12-15 20:03:40 +01:00

23 lines
600 B
Plaintext

@inherits LocalizableComponentBase
@inject NavigationManager Navigation
<AuthorizeView>
<Authorized>
<button class="button" @onclick="BeginSignOut">
@Localizer["Logout"]
</button>
</Authorized>
<NotAuthorized>
<NavLink ActiveClass="neoBtnSmallInsetPlain" class="button is-rounded neoBtnSmallPlain" href="authentication/login">
@Localizer["Login"]
</NavLink>
</NotAuthorized>
</AuthorizeView>
@code {
[CascadingParameter] CascadingState CascadingState { get; set; }
private void BeginSignOut(MouseEventArgs args)
{
Navigation.NavigateToLogout("authentication/logout");
}
}