decePubClient/Shared/LoginDisplay.razor

23 lines
600 B
Plaintext
Raw Normal View History

2022-12-15 20:03:40 +01:00
@inherits LocalizableComponentBase
@inject NavigationManager Navigation
2022-02-14 01:51:52 +01:00
<AuthorizeView>
<Authorized>
<button class="button" @onclick="BeginSignOut">
2022-12-15 20:03:40 +01:00
@Localizer["Logout"]
2022-02-14 01:51:52 +01:00
</button>
</Authorized>
<NotAuthorized>
<NavLink ActiveClass="neoBtnSmallInsetPlain" class="button is-rounded neoBtnSmallPlain" href="authentication/login">
2022-12-15 20:03:40 +01:00
@Localizer["Login"]
2022-02-14 01:51:52 +01:00
</NavLink>
</NotAuthorized>
</AuthorizeView>
@code {
[CascadingParameter] CascadingState CascadingState { get; set; }
2022-12-02 10:19:57 +01:00
private void BeginSignOut(MouseEventArgs args)
2022-02-14 01:51:52 +01:00
{
2022-12-02 10:19:57 +01:00
Navigation.NavigateToLogout("authentication/logout");
2022-02-14 01:51:52 +01:00
}
}