Initial migration

This commit is contained in:
Emanuele Filardo
2019-09-15 12:21:32 +02:00
parent 9b0404082a
commit d1faa0ee5f
42 changed files with 177 additions and 174 deletions

View File

@ -1,17 +1,18 @@
@using Oqtane.Themes
@using Microsoft.AspNetCore.Components.Authorization
@namespace Oqtane.Themes.Controls
@inherits ThemeObjectBase
@inject IUriHelper UriHelper
@inject NavigationManager NavigationManager
<AuthorizeView>
<Authorizing>
<text>...</text>
</Authorizing>
<Authorized>
<button type="button" class="btn btn-primary" @onclick="@UpdateProfile">@context.User.Identity.Name</button>
<button type="button" class="btn btn-primary" @onclick="UpdateProfile">@context.User.Identity.Name</button>
</Authorized>
<NotAuthorized>
<button type="button" class="btn btn-primary" @onclick="@RegisterUser">Register</button>
<button type="button" class="btn btn-primary" @onclick="RegisterUser">Register</button>
</NotAuthorized>
</AuthorizeView>
@ -20,12 +21,12 @@
private void RegisterUser()
{
UriHelper.NavigateTo(NavigateUrl("register"));
NavigationManager.NavigateTo(NavigateUrl("register"));
}
private void UpdateProfile()
{
UriHelper.NavigateTo(NavigateUrl("profile"));
NavigationManager.NavigateTo(NavigateUrl("profile"));
}
}