Last change
on this file since f5f7c24 was f5f7c24, checked in by 192011 <mk.snicker@…>, 17 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | @using Microsoft.AspNetCore.Identity
|
---|
2 |
|
---|
3 | @inject SignInManager<IdentityUser> SignInManager
|
---|
4 | @inject UserManager<IdentityUser> UserManager
|
---|
5 |
|
---|
6 | <ul class="navbar-nav">
|
---|
7 | @if (SignInManager.IsSignedIn(User))
|
---|
8 | {
|
---|
9 | <li class="nav-item">
|
---|
10 | <a id="manage" class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @UserManager.GetUserName(User)!</a>
|
---|
11 | </li>
|
---|
12 | <li class="nav-item">
|
---|
13 | <form id="logoutForm" class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })">
|
---|
14 | <button id="logout" type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
---|
15 | </form>
|
---|
16 | </li>
|
---|
17 | }
|
---|
18 | else
|
---|
19 | {
|
---|
20 | <li class="nav-item">
|
---|
21 | <a class="nav-link text-dark" id="register" asp-area="Identity" asp-page="/Account/Register">Register</a>
|
---|
22 | </li>
|
---|
23 | <li class="nav-item">
|
---|
24 | <a class="nav-link text-dark" id="login" asp-area="Identity" asp-page="/Account/Login">Login</a>
|
---|
25 | </li>
|
---|
26 | }
|
---|
27 | </ul>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.