Skip to content

[main] Fix templates #36283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@
<DuendeIdentityServerStorageVersion>5.2.0</DuendeIdentityServerStorageVersion>
<DuendeIdentityServerEntityFrameworkStorageVersion>5.2.0</DuendeIdentityServerEntityFrameworkStorageVersion>
<MessagePackVersion>2.1.90</MessagePackVersion>
<MicrosoftIdentityWebVersion>1.14.1</MicrosoftIdentityWebVersion>
<MicrosoftIdentityWebMicrosoftGraphVersion>1.1.0</MicrosoftIdentityWebMicrosoftGraphVersion>
<MicrosoftIdentityWebUIVersion>1.1.0</MicrosoftIdentityWebUIVersion>
<MicrosoftIdentityWebVersion>1.16.0</MicrosoftIdentityWebVersion>
<MicrosoftIdentityWebMicrosoftGraphVersion>1.16.0</MicrosoftIdentityWebMicrosoftGraphVersion>
<MicrosoftIdentityWebUIVersion>1.16.0</MicrosoftIdentityWebUIVersion>
<MessagePackAnalyzerVersion>$(MessagePackVersion)</MessagePackAnalyzerVersion>
<MoqVersion>4.10.0</MoqVersion>
<MonoCecilVersion>0.11.2</MonoCecilVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,61 @@
"Server/Models/ApplicationUser.cs",
"Server/Readme.txt"
]
},
{
"condition": "(!GenerateApi)",
"exclude": [
"Client/Pages/CallWebApi.razor",
"Server/Controllers/CallWebApiController.cs"
]
},
{
"condition": "(!GenerateGraph)",
"exclude": [
"Client/Shared/NavMenu.CallsMicrosoftGraph.razor",
"Client/Pages/ShowProfile.razor",
"Server/Controllers/ShowProfileController.cs"
]
},
{
"condition": "(!GenerateApiOrGraph && Hosted)",
"rename": {
"Client/Shared/NavMenu.NoGraphOrApi.razor": "Client/Shared/NavMenu.razor"
},
"exclude": [
"Client/Shared/NavMenu.CallsMicrosoftGraph.razor",
"Client/Shared/NavMenu.CallsWebApi.razor"
]
},
{
"condition": "(!GenerateApiOrGraph && !Hosted)",
"rename": {
"Client/Shared/NavMenu.NoGraphOrApi.razor": "Shared/NavMenu.razor"
},
"exclude": [
"Client/Shared/NavMenu.CallsMicrosoftGraph.razor",
"Client/Shared/NavMenu.CallsWebApi.razor"
]
},
{
"condition": "(GenerateGraph)",
"rename": {
"Client/Shared/NavMenu.CallsMicrosoftGraph.razor": "Client/Shared/NavMenu.razor"
},
"exclude": [
"Client/Shared/NavMenu.NoGraphOrApi.razor",
"Client/Shared/NavMenu.CallsWebApi.razor"
]
},
{
"condition": "(GenerateApi)",
"rename": {
"Client/Shared/NavMenu.CallsWebApi.razor": "Client/Shared/NavMenu.razor"
},
"exclude": [
"Client/Shared/NavMenu.NoGraphOrApi.razor",
"Client/Shared/NavMenu.CallsMicrosoftGraph.razor"
]
}
]
}
Expand Down Expand Up @@ -527,11 +582,11 @@
},
"GenerateApi": {
"type": "computed",
"value": "(( (IndividualB2CAuth && !Hosted) || OrganizationalAuth) && (CalledApiUrl != \"https://graph.microsoft.com/v1.0\" || CalledApiScopes != \"user.read\"))"
"value": "(( (IndividualB2CAuth && !Hosted) || (OrganizationalAuth && Hosted)) && (CalledApiUrl != \"https://graph.microsoft.com/v1.0\" || CalledApiScopes != \"user.read\"))"
},
"GenerateGraph": {
"type": "computed",
"value": "(OrganizationalAuth && CallsMicrosoftGraph)"
"value": "(OrganizationalAuth && CallsMicrosoftGraph && Hosted)"
},
"GenerateApiOrGraph": {
"type": "computed",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">ComponentsWebAssembly-CSharp</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="showProfile">
<span class="oi oi-list-rich" aria-hidden="true"></span> Show Profile
</NavLink>
</div>
</nav>
</div>

@code {
private bool collapseNavMenu = true;

private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;

private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">ComponentsWebAssembly-CSharp</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="callwebapi">
<span class="oi oi-list-rich" aria-hidden="true"></span> Call Web API
</NavLink>
</div>
</nav>
</div>

@code {
private bool collapseNavMenu = true;

private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;

private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@
////#endif
// },
////#elseif (IndividualB2CAuth)
///*
The following identity settings need to be configured
before the project can be successfully executed.
For more info see https:////aka.ms/dotnet-template-ms-identity-platform
//*/
// "AzureAdB2C": {
// "Instance": "https:////aadB2CInstance.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "Scopes": "api-scope",
// "ClientCertificates" : [
// ],
//#endif
// "Scopes": "api-scope",
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId"
// },
////#elseif (OrganizationalAuth)
Expand All @@ -40,11 +45,12 @@ For more info see https:////aka.ms/dotnet-template-ms-identity-platform
// "ClientCertificates" : [
// ],
//#endif
// "Scopes": "api-scope",
// "CallbackPath": "/signin-oidc"
// },
////#endif
////#if (GenerateApiOrGraph)
// "DownstreamAPI": {
// "DownstreamApi": {
// /*
// 'Scopes' contains space separated scopes of the Web API you want to call. This can be:
// - a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@
"AAdB2CInstance": {
"type": "parameter",
"datatype": "string",
"defaultValue": "https://login.microsoftonline.com/tfp/",
"replaces": "https:////login.microsoftonline.com/tfp/",
"defaultValue": "https://qualified.domain.name.b2clogin.com/",
"replaces": "https:////qualified.domain.name.b2clogin.com/",
"description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
},
"SignUpSignInPolicyId": {
"type": "parameter",
"datatype": "string",
"defaultValue": "",
"defaultValue": "b2c_1_susi",
"replaces": "MySignUpSignInPolicyId",
"description": "The sign-in and sign-up policy ID for this project (use with IndividualB2C auth)."
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
////#if (IndividualB2CAuth)
///*
The following identity settings need to be configured
before the project can be successfully executed.
For more info see https:////aka.ms/dotnet-template-ms-identity-platform
//*/
// "AzureAdB2C": {
// "Instance": "https:////login.microsoftonline.com/tfp/",
// "Instance": "https:////qualified.domain.name.b2clogin.com/",
// "ClientId": "11111111-1111-1111-11111111111111111",
// "Domain": "qualified.domain.name",
//#if (GenerateApi)
// "ClientSecret": "secret-from-app-registration",
// "Scopes": "api-scope",
// "ClientCertificates" : [
// ],
//#endif
// "Scopes": "api-scope",
// "SignUpSignInPolicyId": "MySignUpSignInPolicyId"
// },
////#elseif (OrganizationalAuth)
Expand All @@ -33,11 +38,12 @@ For more info see https:////aka.ms/dotnet-template-ms-identity-platform
// "ClientCertificates" : [
// ],
//#endif
// "Scopes": "api-scope",
// "CallbackPath": "/signin-oidc"
// },
////#endif
////#if (GenerateApiOrGraph)
// "DownstreamAPI": {
// "DownstreamApi": {
// /*
// 'Scopes' contains space separated scopes of the Web API you want to call. This can be:
// - a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)
Expand Down