File tree Expand file tree Collapse file tree 4 files changed +52
-2
lines changed
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp
Areas/Identity/Pages/Shared Expand file tree Collapse file tree 4 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 26
26
"sources" : [
27
27
{
28
28
"modifiers" : [
29
+ {
30
+ "condition" : " (!OrganizationalAuth && !IndividualAuth)" ,
31
+ "exclude" : [
32
+ " Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml" ,
33
+ " Areas/Identity/Pages/Shared/_LoginPartial.OrgAuth.cshtml"
34
+ ]
35
+ },
36
+ {
37
+ "condition" : " (OrganizationalAuth || IndividualB2CAuth)" ,
38
+ "rename" : {
39
+ "Areas/Identity/Pages/Shared/_LoginPartial.OrgAuth.cshtml" : " Areas/Identity/Pages/Shared/_LoginPartial.cshtml"
40
+ },
41
+ "exclude" : [
42
+ " Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml"
43
+ ]
44
+ },
45
+ {
46
+ "condition" : " (IndividualLocalAuth)" ,
47
+ "rename" : {
48
+ "Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml" : " Areas/Identity/Pages/Shared/_LoginPartial.cshtml"
49
+ },
50
+ "exclude" : [
51
+ " Areas/Identity/Pages/Shared/_LoginPartial.OrgAuth.cshtml"
52
+ ]
53
+ },
29
54
{
30
55
"condition" : " (!IndividualLocalAuth || UseLocalDB)" ,
31
56
"exclude" : [
131
156
{
132
157
"condition" : " (!GenerateApi)" ,
133
158
"exclude" : [
134
- " Services/DownstreamWebApi.cs" ,
135
159
" Pages/CallWebApi.razor"
136
160
]
137
161
},
Original file line number Diff line number Diff line change
1
+ @using Microsoft .AspNetCore .Identity
2
+ @inject SignInManager <IdentityUser > SignInManager
3
+ @inject UserManager <IdentityUser > UserManager
4
+ @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
5
+
6
+ <ul class =" navbar-nav" >
7
+ @if (SignInManager .IsSignedIn (User ))
8
+ {
9
+ <li class =" nav-item" >
10
+ <a class =" nav-link text-dark" asp-area =" Identity" asp-page =" /Account/Manage/Index" title =" Manage" >Hello @User.Identity.Name ! </a >
11
+ </li >
12
+ <li class =" nav-item" >
13
+ <form class =" form-inline" asp-area =" Identity" asp-page =" /Account/Logout" asp-route-returnUrl =" /" method =" post" >
14
+ <button 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" asp-area =" Identity" asp-page =" /Account/Register" >Register </a >
22
+ </li >
23
+ <li class =" nav-item" >
24
+ <a class =" nav-link text-dark" asp-area =" Identity" asp-page =" /Account/Login" >Login </a >
25
+ </li >
26
+ }
27
+ </ul >
File renamed without changes.
Original file line number Diff line number Diff line change 4
4
@using Microsoft .AspNetCore .Components .Forms
5
5
@using Microsoft .AspNetCore .Components .Routing
6
6
@using Microsoft .AspNetCore .Components .Web
7
- @using Microsoft .AspNetCore .Components .Web .Virtualization
8
7
@using Microsoft .JSInterop
9
8
@using BlazorServerWeb_CSharp
10
9
@using BlazorServerWeb_CSharp .Shared
You can’t perform that action at this time.
0 commit comments