feat: align lightweight admin with zq platform shell

This commit is contained in:
2026-06-22 05:29:32 +08:00
parent 4ec846a702
commit 1b835a4aad
14 changed files with 280 additions and 41 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# 端口号
VITE_PORT=5777
VITE_APP_TITLE=AI Agent Admin
VITE_APP_TITLE=Zhi Qing Platform
VITE_BASE=/
+1 -1
View File
@@ -1,4 +1,4 @@
VITE_APP_TITLE=AI Agent Admin
VITE_APP_TITLE=Zhi Qing Platform
VITE_APP_NAMESPACE=ai-agent-admin
VITE_BASE=/ai-agent-admin/
VITE_GLOB_API_URL=/ai-agent-admin/basic-api
@@ -53,6 +53,7 @@
"workflowRunHistory": "Run History",
"aiAgent": "AI Agent",
"knowledgeBase": "Knowledge Base",
"codex": "Codex",
"controlCenter": "Control Center",
"applicationManagement": "App Management",
"startChat": "Start Chat",
@@ -53,6 +53,7 @@
"workflowRunHistory": "执行历史",
"aiAgent": "智能体",
"knowledgeBase": "知识库",
"codex": "Codex",
"controlCenter": "控制中心",
"applicationManagement": "应用管理",
"startChat": "开始聊天",
@@ -53,6 +53,7 @@
"workflowRunHistory": "執行歷史",
"aiAgent": "智能體",
"knowledgeBase": "知識庫",
"codex": "Codex",
"controlCenter": "控制中心",
"applicationManagement": "應用管理",
"startChat": "開始聊天",
+2 -2
View File
@@ -66,7 +66,7 @@ const LIGHT_AI_PLATFORM_MENU_ROUTES = [
meta: {
fullPathKey: true,
icon: 'lucide:code',
order: 25,
order: 60,
title: 'menu-title.codex',
},
name: 'CodexAgentChat',
@@ -77,7 +77,7 @@ const LIGHT_AI_PLATFORM_MENU_ROUTES = [
meta: {
fullPathKey: true,
icon: 'lucide:settings',
order: 30,
order: 50,
title: 'menu-title.modelConfig',
},
name: 'AIModelConfig',
@@ -11,6 +11,7 @@ export const LIGHT_MENU_NAMES = new Set([
'AnnouncementList',
'AnnouncementManage',
'CodexAgentChat',
'FileManager',
'Message',
'MessageCenter',
'MessageList',
@@ -27,6 +28,7 @@ export const LIGHT_MENU_NAMES = new Set([
'SystemLoginLog',
'SystemManagement',
'SystemOrgChart',
'SystemTools',
'SystemConfig',
'SystemConfigManager',
'SystemMonitoring',
@@ -37,6 +39,8 @@ export const LIGHT_MENU_NAMES = new Set([
'UIConfig',
'UIConfigManager',
'UserManagement',
'userCenter',
'userSettings',
]);
const LIGHT_ROUTE_PATH_PREFIXES = [
@@ -70,6 +74,8 @@ const LIGHT_ROUTE_PATH_PREFIXES = [
'/system/ui-config',
'/system/user',
'/tool/dict',
'/tool/file',
'/log/login-log',
'/user-center',
];
@@ -31,20 +31,6 @@ const aiHomeMenus = [
path: '/ai-platform/workflow',
title: '流程编排',
},
{
color: 'rgba(124, 58, 237, 0.85)',
icon: 'lucide:history',
id: 'ai-workflow-runs',
path: '/ai-platform/workflow-runs',
title: '执行历史',
},
{
color: 'rgba(249, 115, 22, 0.85)',
icon: 'lucide:message-square-code',
id: 'codex-chat',
path: '/agent-chat/codex',
title: 'Codex',
},
{
color: 'rgba(15, 118, 110, 0.85)',
icon: 'lucide:database',
@@ -52,6 +38,13 @@ const aiHomeMenus = [
path: '/ai-platform/knowledge-base',
title: '知识库',
},
{
color: 'rgba(124, 58, 237, 0.85)',
icon: 'lucide:history',
id: 'ai-workflow-runs',
path: '/ai-platform/workflow-runs',
title: '执行历史',
},
{
color: 'rgba(71, 85, 105, 0.85)',
icon: 'lucide:settings',
@@ -59,6 +52,13 @@ const aiHomeMenus = [
path: '/ai-platform/model',
title: '模型配置',
},
{
color: 'rgba(249, 115, 22, 0.85)',
icon: 'lucide:message-square-code',
id: 'codex-chat',
path: '/agent-chat/codex',
title: 'Codex',
},
];
const adminHomeMenus = [
@@ -181,27 +181,34 @@ function getLightMainHomeConfig(config: Record<string, any>) {
const next = JSON.parse(JSON.stringify(config));
if (!Array.isArray(next.widgets)) return next;
const hasApprovalCenter = next.widgets.some(
(widget: any) => widget.type === 'approval-center',
);
next.widgets = next.widgets.map((widget: any) => {
if (widget.type === 'welcome-card') {
return {
...widget,
props: {
...widget.props,
subtitle: '聚焦智能体协作、流程编排和基础权限治理',
title: '欢迎回来',
subtitle: '今天是个好日子',
title: widget.props?.title || '欢迎回来',
},
};
}
if (widget.type === 'approval-center') {
return toApprovalCenterWidget(widget, 'AI 协作中心', aiHomeMenus);
return toApprovalCenterWidget(widget, '审批中心', aiHomeMenus);
}
if (widget.type === 'my-apps') {
return toStaticAppsWidget(widget, '基础管理', adminHomeMenus);
return toStaticAppsWidget(widget, '我的应用', adminHomeMenus);
}
if (widget.type === 'quick-links') {
if (!hasApprovalCenter && widget.props?.title === 'AI 协作') {
return toApprovalCenterWidget(widget, '审批中心', aiHomeMenus);
}
return toQuickLinksWidget(widget, '快捷入口', opsHomeMenus);
}
+1 -1
View File
@@ -93,7 +93,7 @@ async function loadAndConvertEnv(
.filter((item) => item === 'brotli' || item === 'gzip');
return {
appTitle: getString(VITE_APP_TITLE, 'AI Agent Admin'),
appTitle: getString(VITE_APP_TITLE, 'Zhi Qing Platform'),
archiver: getBoolean(VITE_ARCHIVER),
base: getString(VITE_BASE, '/'),
compress: compressTypes.length > 0,
+1 -1
View File
@@ -27,7 +27,7 @@ const defaultPreferences: Preferences = {
layout: 'sidebar-nav',
locale: 'zh-CN',
loginExpiredMode: 'page',
name: 'AI Agent Admin',
name: 'Zhi Qing Platform',
preferencesButtonPosition: 'auto',
watermark: false,
watermarkContent: '',