111
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { reactive } from 'vue'
|
||||
import type { WindowService } from './WindowService'
|
||||
import type { ResourceService } from './ResourceService'
|
||||
import type { ApplicationSandboxEngine } from './ApplicationSandboxEngine'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { externalAppDiscovery } from './ExternalAppDiscovery'
|
||||
import type { WindowFormService } from '@/services/WindowFormService.ts'
|
||||
|
||||
/**
|
||||
* 应用状态枚举
|
||||
@@ -118,16 +118,16 @@ export class ApplicationLifecycleManager {
|
||||
private runningProcesses = reactive(new Map<string, AppInstance>())
|
||||
private appFiles = new Map<string, Map<string, Blob | string>>() // 应用文件存储
|
||||
|
||||
private windowService: WindowService
|
||||
private windowFormService: WindowFormService
|
||||
private resourceService: ResourceService
|
||||
private sandboxEngine: ApplicationSandboxEngine
|
||||
|
||||
constructor(
|
||||
windowService: WindowService,
|
||||
windowFormService: WindowFormService,
|
||||
resourceService: ResourceService,
|
||||
sandboxEngine: ApplicationSandboxEngine
|
||||
) {
|
||||
this.windowService = windowService
|
||||
this.windowFormService = windowFormService
|
||||
this.resourceService = resourceService
|
||||
this.sandboxEngine = sandboxEngine
|
||||
}
|
||||
@@ -200,7 +200,7 @@ export class ApplicationLifecycleManager {
|
||||
maxHeight: app.manifest.window?.maxHeight
|
||||
}
|
||||
|
||||
const windowInstance = await this.windowService.createWindow(appId, windowConfig)
|
||||
const windowInstance = await this.windowFormService.createWindow(appId, windowConfig)
|
||||
windowId = windowInstance.id
|
||||
app.windowId = windowId
|
||||
}
|
||||
@@ -292,9 +292,9 @@ export class ApplicationLifecycleManager {
|
||||
|
||||
// 关闭窗体(如果还存在)
|
||||
if (app.windowId) {
|
||||
const window = this.windowService.getWindow(app.windowId)
|
||||
const window = this.windowFormService.getWindow(app.windowId)
|
||||
if (window) {
|
||||
await this.windowService.destroyWindow(app.windowId)
|
||||
await this.windowFormService.destroyWindow(app.windowId)
|
||||
}
|
||||
app.windowId = undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user