Remove pending task count on queue button (#377)

This commit is contained in:
Chenlei Hu
2024-08-11 19:33:43 -04:00
committed by GitHub
parent 281ed0c5d1
commit c86abd3dc6

View File

@@ -21,22 +21,17 @@ export class ComfyQueueButton {
}
queueOptions: ComfyQueueOptions
app: ComfyApp
queueSizeElement: HTMLElement
autoQueueMode: string
graphHasChanged: boolean
constructor(app: ComfyApp) {
this.app = app
this.queueSizeElement = $el('span.comfyui-queue-count', {
textContent: '?'
})
const queue = new ComfyButton({
content: $el('div', [
$el('span', {
textContent: 'Queue'
}),
this.queueSizeElement
})
]),
icon: 'play',
classList: 'comfyui-button',
@@ -92,9 +87,6 @@ export class ComfyQueueButton {
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
this.#internalQueueSize = detail.exec_info.queue_remaining
if (this.#internalQueueSize != null) {
this.queueSizeElement.textContent =
this.#internalQueueSize > 99 ? '99+' : this.#internalQueueSize + ''
this.queueSizeElement.title = `${this.#internalQueueSize} prompts in queue`
if (!this.#internalQueueSize && !app.lastExecutionError) {
if (
this.autoQueueMode === 'instant' ||