mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
[Refactor] Deprecate ComfyApp.progress (#2065)
This commit is contained in:
@@ -127,8 +127,6 @@ export class ComfyApp {
|
||||
lastNodeErrors: any[] | null
|
||||
/** @type {ExecutionErrorWsMessage} */
|
||||
lastExecutionError: { node_id?: NodeId } | null
|
||||
/** @type {ProgressWsMessage} */
|
||||
progress: { value?: number; max?: number } | null
|
||||
configuringGraph: boolean
|
||||
ctx: CanvasRenderingContext2D
|
||||
bodyTop: HTMLElement
|
||||
@@ -187,6 +185,14 @@ export class ComfyApp {
|
||||
return useExtensionStore().extensions
|
||||
}
|
||||
|
||||
/**
|
||||
* The progress on the current executing node, if the node reports any.
|
||||
* @deprecated Use useExecutionStore().executingNodeProgress instead
|
||||
*/
|
||||
get progress() {
|
||||
return useExecutionStore()._executingNodeProgress
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.vueAppReady = false
|
||||
this.ui = new ComfyUI(this)
|
||||
@@ -1484,12 +1490,10 @@ export class ComfyApp {
|
||||
})
|
||||
|
||||
api.addEventListener('progress', ({ detail }) => {
|
||||
this.progress = detail
|
||||
this.graph.setDirtyCanvas(true, false)
|
||||
})
|
||||
|
||||
api.addEventListener('executing', ({ detail }) => {
|
||||
this.progress = null
|
||||
this.graph.setDirtyCanvas(true, false)
|
||||
this.revokePreviews(this.runningNodeId)
|
||||
delete this.nodePreviewImages[this.runningNodeId]
|
||||
|
||||
@@ -192,6 +192,8 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
executingNodeProgress,
|
||||
bindExecutionEvents,
|
||||
unbindExecutionEvents,
|
||||
storePrompt
|
||||
storePrompt,
|
||||
// Raw executing progress data for backward compatibility in ComfyApp.
|
||||
_executingNodeProgress
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user