Align frontend branding defaults
This commit is contained in:
@@ -17,7 +17,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
|
||||
"contentPaddingRight": 0,
|
||||
"contentPaddingTop": 0,
|
||||
"defaultAvatar": "https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp",
|
||||
"defaultHomePath": "/analytics",
|
||||
"defaultHomePath": "/control-center",
|
||||
"dynamicTitle": true,
|
||||
"enableCheckUpdates": true,
|
||||
"enablePreferences": true,
|
||||
@@ -27,7 +27,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
|
||||
"layout": "sidebar-nav",
|
||||
"locale": "zh-CN",
|
||||
"loginExpiredMode": "page",
|
||||
"name": "Vben Admin",
|
||||
"name": "AI Agent Admin",
|
||||
"preferencesButtonPosition": "auto",
|
||||
"watermark": false,
|
||||
"watermarkContent": "",
|
||||
@@ -41,12 +41,15 @@ exports[`defaultPreferences immutability test > should not modify the config obj
|
||||
"styleType": "normal",
|
||||
},
|
||||
"copyright": {
|
||||
"companyName": "Vben",
|
||||
"companySiteLink": "https://www.vben.pro",
|
||||
"date": "2024",
|
||||
"companyName": "ZQ-Platform",
|
||||
"companySiteLink": "https://django-ninja.zq-platform.cn/analytics",
|
||||
"date": "2025",
|
||||
"enable": true,
|
||||
"icp": "",
|
||||
"icpLink": "",
|
||||
"loginOnly": true,
|
||||
"policeIcp": "",
|
||||
"policeIcpLink": "",
|
||||
"settingShow": true,
|
||||
},
|
||||
"footer": {
|
||||
@@ -131,10 +134,10 @@ exports[`defaultPreferences immutability test > should not modify the config obj
|
||||
"lockScreen": true,
|
||||
"notification": true,
|
||||
"refresh": true,
|
||||
"sidebarBranding": true,
|
||||
"sidebarToggle": true,
|
||||
"themeToggle": true,
|
||||
"timezone": true,
|
||||
"sidebarBranding": true,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -27,7 +27,7 @@ const defaultPreferences: Preferences = {
|
||||
layout: 'sidebar-nav',
|
||||
locale: 'zh-CN',
|
||||
loginExpiredMode: 'page',
|
||||
name: 'Vben Admin',
|
||||
name: 'AI Agent Admin',
|
||||
preferencesButtonPosition: 'auto',
|
||||
watermark: false,
|
||||
watermarkContent: '',
|
||||
|
||||
@@ -100,6 +100,13 @@ class PreferenceManager {
|
||||
if (overrides?.logo?.enable !== undefined) {
|
||||
mergedPreference.logo.enable = overrides.logo.enable;
|
||||
}
|
||||
if (overrides?.copyright) {
|
||||
mergedPreference.copyright = merge(
|
||||
{},
|
||||
overrides.copyright,
|
||||
mergedPreference.copyright,
|
||||
);
|
||||
}
|
||||
|
||||
// 更新偏好设置
|
||||
this.updatePreferences(mergedPreference);
|
||||
|
||||
Reference in New Issue
Block a user