diff --git a/src/app/electron-main/main.ts b/src/app/electron-main/main.ts index 39603dbb9..613711934 100644 --- a/src/app/electron-main/main.ts +++ b/src/app/electron-main/main.ts @@ -214,7 +214,8 @@ try { } else if (arg.action === 'hook') { returnValue = 'hook返回'; } else if (arg.action === 'openApp') { - if (arg.data.moduleID) { + if(subView.appView) subView.appView.remove(); + if (arg.data.moduleID&&!arg.data.moduleID.includes('@eo-core')) { // 如果要打开是同一app,忽略 if (subView.appView?.mainModuleID === arg.data.moduleID) { return; diff --git a/src/workbench/browser/src/app/shared/components/sidebar/sidebar.component.ts b/src/workbench/browser/src/app/shared/components/sidebar/sidebar.component.ts index 8d85f94f3..5c74ea040 100644 --- a/src/workbench/browser/src/app/shared/components/sidebar/sidebar.component.ts +++ b/src/workbench/browser/src/app/shared/components/sidebar/sidebar.component.ts @@ -12,7 +12,7 @@ export class SidebarComponent implements OnInit, OnDestroy { isCollapsed: boolean; destroy = false; isElectron: boolean = false; - moduleID: string = 'api'; + moduleID: string = '@eo-core-apimanger'; modules: Array; constructor(private electron: ElectronService, private sidebar: SidebarService) { this.isElectron = this.electron.isElectron; @@ -41,7 +41,8 @@ export class SidebarComponent implements OnInit, OnDestroy { ngOnInit(): void { if (this.isElectron) { - this.modules =[{ moduleName: 'API', moduleID: 'api', logo: 'icon-api' },...Array.from(window.eo.getSideModuleList())] + // TODO change app to blank page + this.modules =[{ moduleName: 'API', moduleID: '@eo-core-apimanger', logo: 'icon-api',route:'home/api/test' },...Array.from(window.eo.getSideModuleList())] this.electron.ipcRenderer.on('moduleUpdate', (event, args) => { console.log('get moduleUpdate'); this.modules = window.eo.getSideModuleList();