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 2626 "sources" : [
2727 {
2828 "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+ },
2954 {
3055 "condition" : " (!IndividualLocalAuth || UseLocalDB)" ,
3156 "exclude" : [
131156 {
132157 "condition" : " (!GenerateApi)" ,
133158 "exclude" : [
134- " Services/DownstreamWebApi.cs" ,
135159 " Pages/CallWebApi.razor"
136160 ]
137161 },
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 44@using Microsoft .AspNetCore .Components .Forms
55@using Microsoft .AspNetCore .Components .Routing
66@using Microsoft .AspNetCore .Components .Web
7- @using Microsoft .AspNetCore .Components .Web .Virtualization
87@using Microsoft .JSInterop
98@using BlazorServerWeb_CSharp
109@using BlazorServerWeb_CSharp .Shared
You can’t perform that action at this time.
0 commit comments