Perfectly align inline progress

This commit is contained in:
Benjamin Lu
2026-01-23 03:50:43 -08:00
parent ce86b53e87
commit aef4ddb5cc
2 changed files with 8 additions and 4 deletions

View File

@@ -48,6 +48,7 @@
<Teleport v-if="inlineProgressTarget" :to="inlineProgressTarget">
<QueueInlineProgress
:hidden="queueOverlayExpanded"
:radius-class="cn(isDocked ? 'rounded-[7px]' : 'rounded-[5px]')"
data-testid="queue-inline-progress"
/>
</Teleport>

View File

@@ -2,7 +2,9 @@
<div
v-if="shouldShow"
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
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 { useQueueProgress } from '@/composables/queue/useQueueProgress'
import { cn } from '@/utils/tailwindUtil'
const props = defineProps<{
const { hidden = false, radiusClass = 'rounded-[7px]' } = defineProps<{
hidden?: boolean
radiusClass?: string
}>()
const { totalPercent, currentNodePercent } = useQueueProgress()
const shouldShow = computed(
() =>
!props.hidden && (totalPercent.value > 0 || currentNodePercent.value > 0)
() => !hidden && (totalPercent.value > 0 || currentNodePercent.value > 0)
)
</script>