mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 15:59:47 +00:00
Show pending task count on side bar queue icon (#376)
* remove listener * Store pending task count * Add iconBadge to queue icon
This commit is contained in:
@@ -6,7 +6,8 @@ import {
|
||||
TaskType,
|
||||
TaskPrompt,
|
||||
TaskStatus,
|
||||
TaskOutput
|
||||
TaskOutput,
|
||||
StatusWsMessageStatus
|
||||
} from '@/types/apiTypes'
|
||||
import { plainToClass } from 'class-transformer'
|
||||
import _ from 'lodash'
|
||||
@@ -204,3 +205,17 @@ export const useQueueStore = defineStore('queue', {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export const useQueuePendingTaskCountStore = defineStore(
|
||||
'queuePendingTaskCount',
|
||||
{
|
||||
state: () => ({
|
||||
count: 0
|
||||
}),
|
||||
actions: {
|
||||
update(e: CustomEvent<StatusWsMessageStatus>) {
|
||||
this.count = e.detail.exec_info.queue_remaining
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user