2021-07-21 00:08:57 +00:00
|
|
|
@using Microsoft.AspNetCore.Identity
|
|
|
|
@using Props.Models
|
2021-07-10 02:47:40 +00:00
|
|
|
@inject SignInManager<ApplicationUser> SignInManager
|
|
|
|
@inject UserManager<ApplicationUser> UserManager
|
|
|
|
|
|
|
|
<ul class="navbar-nav">
|
|
|
|
@if (SignInManager.IsSignedIn(User))
|
|
|
|
{
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2021-07-21 00:08:57 +00:00
|
|
|
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Page("/", new { area = "" })" method="post">
|
2021-07-10 02:47:40 +00:00
|
|
|
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<li class="nav-item">
|
2021-07-21 00:08:57 +00:00
|
|
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a>
|
2021-07-10 02:47:40 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2021-07-21 00:08:57 +00:00
|
|
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a>
|
2021-07-10 02:47:40 +00:00
|
|
|
</li>
|
|
|
|
}
|
|
|
|
</ul>
|