From 8f5ea007853c86818749daf970d8485b6d611914 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Mon, 2 Dec 2024 18:24:55 +0200 Subject: [PATCH] fix: Improves setting's title (#2864) --- .../wwwroot/js/app/settings/blades/settingGroup-list.js | 2 +- .../blades/settings-detail-theme-login-screen-logo.js | 8 ++++++++ .../settings-detail-theme-login-screen-logo.tpl.html | 2 +- .../js/app/settings/blades/settings-detail-theme-logo.js | 8 ++++++++ .../settings/blades/settings-detail-theme-logo.tpl.html | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settingGroup-list.js b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settingGroup-list.js index 89b2dec635e..8c06cec5bff 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settingGroup-list.js +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settingGroup-list.js @@ -92,7 +92,7 @@ angular.module('platformWebApp') id: 'settingsSection', data: selectedSettings, headIcon: node.icon || '', - title: node.name || 'platform.blades.settings-detail.title', + title: node.groupName || 'platform.blades.settings-detail.title', disableOpenAnimation: disableOpenAnimation, controller: node.controller || 'platformWebApp.settingsDetailController', template: node.template || '$(Platform)/Scripts/app/settings/blades/settings-detail.tpl.html', diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.js b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.js index 95787d4e9ff..40ba725c21b 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.js +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.js @@ -50,6 +50,14 @@ angular.module('platformWebApp') function initializeBlade() { blade.isLoading = true; + // Resolve setting group name + var setting = Array.isArray(blade.data) && blade.data.length > 0 ? blade.data[0] : null; + + if (setting && setting.groupName) { + var paths = setting.groupName.split('|'); + blade.groupName = paths.pop(); + } + settingsApi.getUiCustomizationSetting(function (uiCustomizationSetting) { blade.isLoading = false; blade.uiCustomizationSetting = uiCustomizationSetting; diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.tpl.html b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.tpl.html index 2a37e0fb224..000f818533c 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.tpl.html +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-login-screen-logo.tpl.html @@ -1,7 +1,7 @@
- {{ blade.title }} + {{ blade.groupName }}
diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.js b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.js index 2616b014dac..1fdf0b78fbd 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.js +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.js @@ -87,6 +87,14 @@ angular.module('platformWebApp') function initializeBlade() { blade.isLoading = true; + // Resolve setting group name + var setting = Array.isArray(blade.data) && blade.data.length > 0 ? blade.data[0] : null; + + if (setting && setting.groupName) { + var paths = setting.groupName.split('|'); + blade.groupName = paths.pop(); + } + settingsApi.getUiCustomizationSetting(function (uiCustomizationSetting) { blade.isLoading = false; blade.uiCustomizationSetting = uiCustomizationSetting; diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.tpl.html b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.tpl.html index 9eb21bca818..31e7b6392d8 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.tpl.html +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/settings/blades/settings-detail-theme-logo.tpl.html @@ -1,7 +1,7 @@
- {{ blade.title }} + {{ blade.groupName }}