mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
Add inline queue progress bar and summary per the new designs. This adds an inline 3px progress bar in the actionbar container (docked or floating) and a compact summary line below the top menu that follows when floating, both gated by the QPO V2 flag and hidden while the overlay is expanded. https://github.com/user-attachments/assets/da8ec7b7-35f4-4d52-a83b-15c21b484eba ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8271-Add-inline-queue-progress-bar-and-summary-for-QPO-V2-2f16d73d36508132a6dff247f71e11e4) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
71 lines
1.9 KiB
Vue
71 lines
1.9 KiB
Vue
<template>
|
|
<div v-if="shouldShow" class="flex justify-end">
|
|
<div
|
|
class="flex items-center whitespace-nowrap text-[0.75rem] leading-[normal] drop-shadow-[1px_1px_8px_rgba(0,0,0,0.4)]"
|
|
role="status"
|
|
aria-live="polite"
|
|
aria-atomic="true"
|
|
>
|
|
<div class="flex items-center text-base-foreground">
|
|
<span class="font-normal">
|
|
{{ t('sideToolbar.queueProgressOverlay.inlineTotalLabel') }}:
|
|
</span>
|
|
<span class="w-[5ch] shrink-0 text-right font-bold tabular-nums">
|
|
{{ totalPercentFormatted }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="flex items-center text-muted-foreground">
|
|
<span
|
|
class="w-[16ch] shrink-0 truncate text-right"
|
|
:title="currentNodeName"
|
|
>
|
|
{{ currentNodeName }}:
|
|
</span>
|
|
<span class="w-[5ch] shrink-0 text-right tabular-nums">
|
|
{{ currentNodePercentFormatted }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import { st } from '@/i18n'
|
|
import { useQueueProgress } from '@/composables/queue/useQueueProgress'
|
|
import { useExecutionStore } from '@/stores/executionStore'
|
|
import { resolveNodeDisplayName } from '@/utils/nodeTitleUtil'
|
|
|
|
const props = defineProps<{
|
|
hidden?: boolean
|
|
}>()
|
|
|
|
const { t } = useI18n()
|
|
const executionStore = useExecutionStore()
|
|
const {
|
|
totalPercent,
|
|
totalPercentFormatted,
|
|
currentNodePercent,
|
|
currentNodePercentFormatted
|
|
} = useQueueProgress()
|
|
|
|
const currentNodeName = computed(() => {
|
|
return resolveNodeDisplayName(executionStore.executingNode, {
|
|
emptyLabel: t('g.emDash'),
|
|
untitledLabel: t('g.untitled'),
|
|
st
|
|
})
|
|
})
|
|
|
|
const shouldShow = computed(
|
|
() =>
|
|
!props.hidden &&
|
|
(!executionStore.isIdle ||
|
|
totalPercent.value > 0 ||
|
|
currentNodePercent.value > 0)
|
|
)
|
|
</script>
|