From 9cc774c5d45f1b3688ed4ae0c67936541547bac6 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 4 Apr 2024 20:17:13 +0800 Subject: [PATCH 1/2] Update MyProjectNameMenuContributor.cs --- .../Menus/MyProjectNameMenuContributor.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/Menus/MyProjectNameMenuContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/Menus/MyProjectNameMenuContributor.cs index 8504b6573c9..6a2100cf1b8 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/Menus/MyProjectNameMenuContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/Menus/MyProjectNameMenuContributor.cs @@ -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 @@ private Task ConfigureUserMenuAsync(MenuConfigurationContext context) { var accountStringLocalizer = context.GetLocalizer(); + 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; } From 0bc6c65d35669a860aa1ba0c6abf034ab9d758be Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 4 Apr 2024 20:18:16 +0800 Subject: [PATCH 2/2] Update appsettings.json --- .../wwwroot/appsettings.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/wwwroot/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/wwwroot/appsettings.json index 6a47c33ac91..0e38e067662 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/wwwroot/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/wwwroot/appsettings.json @@ -4,6 +4,9 @@ "BaseUrl": "https://localhost:44300" } }, + "AuthServer": { + "Authority": "https://localhost:44301" + }, "AbpCli": { "Bundle": { "Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */