diff --git a/src/components/TopMenuSection.test.ts b/src/components/TopMenuSection.test.ts index b4d11efea..21229fe67 100644 --- a/src/components/TopMenuSection.test.ts +++ b/src/components/TopMenuSection.test.ts @@ -36,7 +36,8 @@ function createWrapper() { sideToolbar: { queueProgressOverlay: { viewJobHistory: 'View job history', - expandCollapsedQueue: 'Expand collapsed queue' + expandCollapsedQueue: 'Expand collapsed queue', + activeJobsShort: '{count} active' } } } diff --git a/src/components/TopMenuSection.vue b/src/components/TopMenuSection.vue index 28f2411ea..67889deb7 100644 --- a/src/components/TopMenuSection.vue +++ b/src/components/TopMenuSection.vue @@ -44,19 +44,16 @@ queueStore.pendingTasks.length) +const activeJobsCount = computed( + () => queueStore.pendingTasks.length + queueStore.runningTasks.length +) +const activeJobsLabel = computed(() => { + const count = activeJobsCount.value + return t( + 'sideToolbar.queueProgressOverlay.activeJobsShort', + { count: n(count) }, + count + ) +}) const isIntegratedTabBar = computed( () => settingStore.get('Comfy.UI.TabBarLayout') === 'Integrated' ) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index fa557ee96..ec72f277b 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -751,6 +751,7 @@ "sortJobs": "Sort jobs", "sortBy": "Sort by", "activeJobs": "{count} active job | {count} active jobs", + "activeJobsShort": "{count} active", "activeJobsSuffix": "active jobs", "jobQueue": "Job Queue", "expandCollapsedQueue": "Expand job queue", @@ -2619,4 +2620,4 @@ "tokenExchangeFailed": "Failed to authenticate with workspace: {error}" } } -} \ No newline at end of file +}