chore: trim nonessential admin routes
This commit is contained in:
@@ -59,8 +59,8 @@ function normalizeBackendRoute<
|
||||
if (route.name !== 'ControlCenter') return route;
|
||||
|
||||
const normalized = { ...route };
|
||||
normalized.path = '/page-render/main_home';
|
||||
normalized.component = '_core/page-render/index';
|
||||
normalized.path = '/ai-platform/agent';
|
||||
normalized.component = 'ai-platform/agent/index';
|
||||
normalized.query = undefined;
|
||||
return normalized;
|
||||
}
|
||||
@@ -129,21 +129,11 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
'../views/_core/account-settings/index.vue',
|
||||
'../views/_core/authentication/login.vue',
|
||||
'../views/_core/authentication/oauth-callback.vue',
|
||||
'../views/_core/dept/index.vue',
|
||||
'../views/_core/dict/index.vue',
|
||||
'../views/_core/fallback/**/*.vue',
|
||||
'../views/_core/file-manager/index.vue',
|
||||
'../views/_core/file-preview/index.vue',
|
||||
'../views/_core/login-log/index.vue',
|
||||
'../views/_core/menu/index.vue',
|
||||
'../views/_core/message/index.vue',
|
||||
'../views/_core/page-render/index.vue',
|
||||
'../views/_core/permission/index.vue',
|
||||
'../views/_core/post/index.vue',
|
||||
'../views/_core/role/index.vue',
|
||||
'../views/_core/server-monitor/index.vue',
|
||||
'../views/_core/system-config/index.vue',
|
||||
'../views/_core/ui-config/index.vue',
|
||||
'../views/_core/user/index.vue',
|
||||
'../views/ai-platform/agent/editor/index.vue',
|
||||
'../views/ai-platform/agent/index.vue',
|
||||
|
||||
@@ -204,7 +204,7 @@ function setupAccessGuard(router: Router) {
|
||||
|
||||
if (to.path === subAppRootPath) {
|
||||
const defaultHome =
|
||||
preferences.app.defaultHomePath || '/page-render/main_home';
|
||||
preferences.app.defaultHomePath || '/ai-platform/agent';
|
||||
// 确保路径包含子应用前缀
|
||||
const subAppTargetPath = defaultHome.startsWith(subAppRootPath)
|
||||
? defaultHome
|
||||
|
||||
@@ -8,25 +8,12 @@ export const LIGHT_MENU_NAMES = new Set([
|
||||
'AccountSettings',
|
||||
'AnnouncementList',
|
||||
'AnnouncementManage',
|
||||
'Codex',
|
||||
'ControlCenter',
|
||||
'FileManager',
|
||||
'KnowledgeBase',
|
||||
'LoginLog',
|
||||
'Message',
|
||||
'MessageList',
|
||||
'ServerMonitor',
|
||||
'SystemConfigManager',
|
||||
'SystemDept',
|
||||
'SystemDict',
|
||||
'SystemFileManager',
|
||||
'SystemLoginLog',
|
||||
'SystemManagement',
|
||||
'SystemMenu',
|
||||
'SystemPost',
|
||||
'SystemPermission',
|
||||
'SystemRole',
|
||||
'UIConfigManager',
|
||||
'UserManagement',
|
||||
'userSettings',
|
||||
]);
|
||||
@@ -35,25 +22,15 @@ const LIGHT_ROUTE_PATH_PREFIXES = [
|
||||
'/account-settings',
|
||||
'/ai-platform/agent',
|
||||
'/ai-platform/knowledge',
|
||||
'/ai-platform/knowledge-base',
|
||||
'/ai-platform/model',
|
||||
'/ai-platform/workflow',
|
||||
'/ai-platform/workflow-runs',
|
||||
'/announcement',
|
||||
'/codex',
|
||||
'/dept',
|
||||
'/dict',
|
||||
'/file-manager',
|
||||
'/login-log',
|
||||
'/menu',
|
||||
'/message',
|
||||
'/page-render/main_home',
|
||||
'/permission',
|
||||
'/post',
|
||||
'/role',
|
||||
'/server-monitor',
|
||||
'/system-config',
|
||||
'/ui-config',
|
||||
'/user',
|
||||
'/message/announcement',
|
||||
'/system/menu',
|
||||
'/system/new-permission',
|
||||
'/system/role',
|
||||
'/system/user',
|
||||
];
|
||||
|
||||
export function isLightMenuName(name?: string) {
|
||||
|
||||
@@ -5,7 +5,7 @@ const routes: RouteRecordRaw[] = [
|
||||
meta: { hideInMenu: true },
|
||||
name: 'ControlCenterLegacyRedirect',
|
||||
path: '/control-center',
|
||||
redirect: '/page-render/main_home',
|
||||
redirect: '/ai-platform/agent',
|
||||
},
|
||||
{
|
||||
meta: { hideInMenu: true },
|
||||
|
||||
Reference in New Issue
Block a user