mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 10:12:11 +00:00
Perfectly align inline progress
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
<Teleport v-if="inlineProgressTarget" :to="inlineProgressTarget">
|
<Teleport v-if="inlineProgressTarget" :to="inlineProgressTarget">
|
||||||
<QueueInlineProgress
|
<QueueInlineProgress
|
||||||
:hidden="queueOverlayExpanded"
|
:hidden="queueOverlayExpanded"
|
||||||
|
:radius-class="cn(isDocked ? 'rounded-[7px]' : 'rounded-[5px]')"
|
||||||
data-testid="queue-inline-progress"
|
data-testid="queue-inline-progress"
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<div
|
<div
|
||||||
v-if="shouldShow"
|
v-if="shouldShow"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
class="pointer-events-none absolute inset-0 overflow-hidden rounded-[7px]"
|
:class="
|
||||||
|
cn('pointer-events-none absolute inset-0 overflow-hidden', radiusClass)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="pointer-events-none absolute bottom-0 left-0 h-[3px] bg-interface-panel-job-progress-primary transition-[width]"
|
class="pointer-events-none absolute bottom-0 left-0 h-[3px] bg-interface-panel-job-progress-primary transition-[width]"
|
||||||
@@ -19,15 +21,16 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
import { useQueueProgress } from '@/composables/queue/useQueueProgress'
|
import { useQueueProgress } from '@/composables/queue/useQueueProgress'
|
||||||
|
import { cn } from '@/utils/tailwindUtil'
|
||||||
|
|
||||||
const props = defineProps<{
|
const { hidden = false, radiusClass = 'rounded-[7px]' } = defineProps<{
|
||||||
hidden?: boolean
|
hidden?: boolean
|
||||||
|
radiusClass?: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { totalPercent, currentNodePercent } = useQueueProgress()
|
const { totalPercent, currentNodePercent } = useQueueProgress()
|
||||||
|
|
||||||
const shouldShow = computed(
|
const shouldShow = computed(
|
||||||
() =>
|
() => !hidden && (totalPercent.value > 0 || currentNodePercent.value > 0)
|
||||||
!props.hidden && (totalPercent.value > 0 || currentNodePercent.value > 0)
|
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user