mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
Remove pending task count on queue button (#377)
This commit is contained in:
@@ -21,22 +21,17 @@ export class ComfyQueueButton {
|
|||||||
}
|
}
|
||||||
queueOptions: ComfyQueueOptions
|
queueOptions: ComfyQueueOptions
|
||||||
app: ComfyApp
|
app: ComfyApp
|
||||||
queueSizeElement: HTMLElement
|
|
||||||
autoQueueMode: string
|
autoQueueMode: string
|
||||||
graphHasChanged: boolean
|
graphHasChanged: boolean
|
||||||
|
|
||||||
constructor(app: ComfyApp) {
|
constructor(app: ComfyApp) {
|
||||||
this.app = app
|
this.app = app
|
||||||
this.queueSizeElement = $el('span.comfyui-queue-count', {
|
|
||||||
textContent: '?'
|
|
||||||
})
|
|
||||||
|
|
||||||
const queue = new ComfyButton({
|
const queue = new ComfyButton({
|
||||||
content: $el('div', [
|
content: $el('div', [
|
||||||
$el('span', {
|
$el('span', {
|
||||||
textContent: 'Queue'
|
textContent: 'Queue'
|
||||||
}),
|
})
|
||||||
this.queueSizeElement
|
|
||||||
]),
|
]),
|
||||||
icon: 'play',
|
icon: 'play',
|
||||||
classList: 'comfyui-button',
|
classList: 'comfyui-button',
|
||||||
@@ -92,9 +87,6 @@ export class ComfyQueueButton {
|
|||||||
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
|
({ detail }: CustomEvent<StatusWsMessageStatus>) => {
|
||||||
this.#internalQueueSize = detail.exec_info.queue_remaining
|
this.#internalQueueSize = detail.exec_info.queue_remaining
|
||||||
if (this.#internalQueueSize != null) {
|
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.#internalQueueSize && !app.lastExecutionError) {
|
||||||
if (
|
if (
|
||||||
this.autoQueueMode === 'instant' ||
|
this.autoQueueMode === 'instant' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user