36 lines
822 B
Plaintext
36 lines
822 B
Plaintext
@namespace Oqtane.Themes.Controls
|
|
@inherits ThemeControlBase
|
|
@attribute [OqtaneIgnore]
|
|
@inject NavigationManager NavigationManager
|
|
|
|
<AuthorizeView>
|
|
<Authorizing>
|
|
<text>...</text>
|
|
</Authorizing>
|
|
<Authorized>
|
|
<button type="button" class="btn btn-primary" @onclick="UpdateProfile">@context.User.Identity.Name</button>
|
|
</Authorized>
|
|
<NotAuthorized>
|
|
@if (PageState.Site.AllowRegistration)
|
|
{
|
|
<button type="button" class="btn btn-primary" @onclick="RegisterUser">Register</button>
|
|
}
|
|
</NotAuthorized>
|
|
</AuthorizeView>
|
|
|
|
|
|
@code {
|
|
|
|
private void RegisterUser()
|
|
{
|
|
NavigationManager.NavigateTo(NavigateUrl("register"));
|
|
}
|
|
|
|
private void UpdateProfile()
|
|
{
|
|
NavigationManager.NavigateTo(NavigateUrl("profile"));
|
|
}
|
|
}
|
|
|
|
|