decePubClient/Shared/LoginDisplay.razor
2022-12-02 10:19:57 +01:00

22 lines
595 B
Plaintext

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