Browse Source
Merge pull request #19499 from abpframework/maliming-patch-3
Update `WebAppTiered`'s `MenuContributor`.
pull/19506/head
liangshiwei
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
8 additions and
3 deletions
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/Menus/MyProjectNameMenuContributor.cs
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/wwwroot/appsettings.json
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using MyCompanyName.MyProjectName.Localization; |
|
|
|
using MyCompanyName.MyProjectName.MultiTenancy; |
|
|
|
@ -67,13 +68,14 @@ public class MyProjectNameMenuContributor : IMenuContributor |
|
|
|
{ |
|
|
|
var accountStringLocalizer = context.GetLocalizer<AccountResource>(); |
|
|
|
|
|
|
|
var authServerUrl = _configuration["AuthServer:Authority"] ?? ""; |
|
|
|
context.Menu.AddItem(new ApplicationMenuItem( |
|
|
|
"Account.Manage", |
|
|
|
accountStringLocalizer["MyAccount"], |
|
|
|
$"Account/Manage", |
|
|
|
$"{authServerUrl.EnsureEndsWith('/')}Account/Manage", |
|
|
|
icon: "fa fa-cog", |
|
|
|
order: 1000, |
|
|
|
null).RequireAuthenticated()); |
|
|
|
target: "_blank").RequireAuthenticated()); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|
|
|
|
@ -4,6 +4,9 @@ |
|
|
|
"BaseUrl": "https://localhost:44300" |
|
|
|
} |
|
|
|
}, |
|
|
|
"AuthServer": { |
|
|
|
"Authority": "https://localhost:44301" |
|
|
|
}, |
|
|
|
"AbpCli": { |
|
|
|
"Bundle": { |
|
|
|
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */ |
|
|
|
|