fix: restore dashboard runtime home

This commit is contained in:
2026-06-11 09:11:46 +08:00
parent 87a01d70fb
commit e2b1901741
12 changed files with 153 additions and 394 deletions
+3 -3
View File
@@ -79,8 +79,8 @@ function normalizeBackendRoute<
if (route.name !== 'ControlCenter') return route;
const normalized = { ...route };
normalized.path = '/control-center';
normalized.component = '_core/control-center/index';
normalized.path = '/page-render/main_home';
normalized.component = 'online-dev/page-render/index';
normalized.query = undefined;
return normalized;
}
@@ -138,7 +138,6 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
'../views/_core/announcement/index.vue',
'../views/_core/announcement/list.vue',
'../views/_core/authentication/login.vue',
'../views/_core/control-center/index.vue',
'../views/_core/authentication/oauth-callback.vue',
'../views/_core/fallback/**/*.vue',
'../views/_core/file-preview/index.vue',
@@ -156,6 +155,7 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
'../views/ai-platform/workflow/editor/index.vue',
'../views/ai-platform/workflow/index.vue',
'../views/ai-platform/workflow-runs/index.vue',
'../views/online-dev/page-render/index.vue',
]);
const layoutMap: ComponentRecordType = {
+1 -1
View File
@@ -191,7 +191,7 @@ function setupAccessGuard(router: Router) {
if (to.path === subAppRootPath) {
const defaultHome =
preferences.app.defaultHomePath || '/control-center';
preferences.app.defaultHomePath || '/page-render/main_home';
// 确保路径包含子应用前缀
const subAppTargetPath = defaultHome.startsWith(subAppRootPath)
? defaultHome
@@ -1,20 +1,11 @@
import type { RouteRecordRaw } from 'vue-router';
const routes: RouteRecordRaw[] = [
{
meta: {
hideInMenu: true,
title: '控制中心',
},
name: 'ControlCenterStatic',
path: '/control-center',
component: () => import('#/views/_core/control-center/index.vue'),
},
{
meta: { hideInMenu: true },
name: 'LegacyMainHomeRedirect',
path: '/page-render/main_home',
redirect: '/control-center',
name: 'ControlCenterLegacyRedirect',
path: '/control-center',
redirect: '/page-render/main_home',
},
{
meta: { hideInMenu: true },