Restore rendered control center home
This commit is contained in:
@@ -71,14 +71,19 @@ function normalizePageMap(pageMap: ComponentRecordType) {
|
||||
) as ComponentRecordType;
|
||||
}
|
||||
|
||||
function normalizeBackendRoute<T extends { component?: string; name?: string; path?: string; query?: unknown }>(
|
||||
route: T,
|
||||
) {
|
||||
function normalizeBackendRoute<
|
||||
T extends {
|
||||
component?: string;
|
||||
name?: string;
|
||||
path?: string;
|
||||
query?: unknown;
|
||||
},
|
||||
>(route: T) {
|
||||
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;
|
||||
}
|
||||
@@ -154,6 +159,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 = {
|
||||
@@ -168,9 +174,8 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
return await generateAccessible(preferences.app.accessMode, {
|
||||
...options,
|
||||
fetchMenuListAsync: async () => {
|
||||
const { ElMessage } = await import(
|
||||
'element-plus/es/components/message/index'
|
||||
);
|
||||
const { ElMessage } =
|
||||
await import('element-plus/es/components/message/index');
|
||||
ElMessage({
|
||||
duration: 1500,
|
||||
message: `${$t('common.loadingMenu')}...`,
|
||||
|
||||
Reference in New Issue
Block a user