mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 01:20:09 +00:00
feat: show active jobs label in top menu (#8169)
Replace the top-menu queue history icon with a localized “N active” label so active jobs are visible at a glance. Requested as part of the new [designs](https://www.figma.com/design/LVilZgHGk5RwWOkVN6yCEK/Queue-Progress-Modal?node-id=3381-6181&m=dev). I checked all failing snapshots and they are all expected (1 flaky). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8169-feat-show-active-jobs-label-in-top-menu-2ee6d73d3650812cbf0cda389395c563) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -493,6 +493,9 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
)
|
||||
|
||||
const hasPendingTasks = computed<boolean>(() => pendingTasks.value.length > 0)
|
||||
const activeJobsCount = computed(
|
||||
() => pendingTasks.value.length + runningTasks.value.length
|
||||
)
|
||||
|
||||
const update = async () => {
|
||||
isLoading.value = true
|
||||
@@ -572,6 +575,7 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
flatTasks,
|
||||
lastHistoryQueueIndex,
|
||||
hasPendingTasks,
|
||||
activeJobsCount,
|
||||
|
||||
update,
|
||||
clear,
|
||||
|
||||
Reference in New Issue
Block a user