Fix BlazorServer Identity templates (#25456)
Remove @using Microsoft.AspNetCore.Components.Web.Virtualization in blazorserver template.
This commit is contained in:
parent
29042be4cc
commit
6bdb4b95f9
|
|
@ -26,6 +26,31 @@
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"modifiers": [
|
"modifiers": [
|
||||||
|
{
|
||||||
|
"condition": "(!OrganizationalAuth && !IndividualAuth)",
|
||||||
|
"exclude": [
|
||||||
|
"Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml",
|
||||||
|
"Areas/Identity/Pages/Shared/_LoginPartial.OrgAuth.cshtml"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "(OrganizationalAuth || IndividualB2CAuth)",
|
||||||
|
"rename": {
|
||||||
|
"Areas/Identity/Pages/Shared/_LoginPartial.OrgAuth.cshtml": "Areas/Identity/Pages/Shared/_LoginPartial.cshtml"
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "(IndividualLocalAuth)",
|
||||||
|
"rename": {
|
||||||
|
"Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml": "Areas/Identity/Pages/Shared/_LoginPartial.cshtml"
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"Areas/Identity/Pages/Shared/_LoginPartial.OrgAuth.cshtml"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"condition": "(!IndividualLocalAuth || UseLocalDB)",
|
"condition": "(!IndividualLocalAuth || UseLocalDB)",
|
||||||
"exclude": [
|
"exclude": [
|
||||||
|
|
@ -131,7 +156,6 @@
|
||||||
{
|
{
|
||||||
"condition": "(!GenerateApi)",
|
"condition": "(!GenerateApi)",
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"Services/DownstreamWebApi.cs",
|
|
||||||
"Pages/CallWebApi.razor"
|
"Pages/CallWebApi.razor"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
@using Microsoft.AspNetCore.Identity
|
||||||
|
@inject SignInManager<IdentityUser> SignInManager
|
||||||
|
@inject UserManager<IdentityUser> UserManager
|
||||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post">
|
||||||
|
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
@using Microsoft.AspNetCore.Components.Forms
|
@using Microsoft.AspNetCore.Components.Forms
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
|
||||||
@using Microsoft.JSInterop
|
@using Microsoft.JSInterop
|
||||||
@using BlazorServerWeb_CSharp
|
@using BlazorServerWeb_CSharp
|
||||||
@using BlazorServerWeb_CSharp.Shared
|
@using BlazorServerWeb_CSharp.Shared
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue