24 lines
687 B
Plaintext
24 lines
687 B
Plaintext
|
@inject NavigationManager Navigation
|
||
|
@inject SignOutSessionStateManager SignOutManager
|
||
|
|
||
|
<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 async Task BeginSignOut(MouseEventArgs args)
|
||
|
{
|
||
|
await SignOutManager.SetSignOutState();
|
||
|
Navigation.NavigateTo("authentication/logout");
|
||
|
}
|
||
|
}
|