mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 06:19:58 +00:00
Fix actionbar digit shifting
This commit is contained in:
@@ -53,6 +53,15 @@
|
||||
:label="queueToggleLabel"
|
||||
@click="toggleQueueOverlay"
|
||||
>
|
||||
<!-- Custom implementation for static 1-2 digit shifts -->
|
||||
<span class="flex items-center gap-1">
|
||||
<span
|
||||
class="inline-flex min-w-[2ch] justify-center tabular-nums text-center"
|
||||
>
|
||||
{{ queuedCount }}
|
||||
</span>
|
||||
<span>{{ queuedSuffix }}</span>
|
||||
</span>
|
||||
<template #icon>
|
||||
<i class="icon-[lucide--chevron-down] size-4" />
|
||||
</template>
|
||||
@@ -132,6 +141,9 @@ const queueToggleLabel = computed(() =>
|
||||
count: queuedCount.value
|
||||
})
|
||||
)
|
||||
const queuedSuffix = computed(() =>
|
||||
t('sideToolbar.queueProgressOverlay.queuedSuffix')
|
||||
)
|
||||
const queueHistoryTooltipConfig = computed(() =>
|
||||
buildTooltipConfig(t('sideToolbar.queueProgressOverlay.viewJobHistory'))
|
||||
)
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
@click="onClick"
|
||||
>
|
||||
<slot v-if="iconPosition !== 'right'" name="icon"></slot>
|
||||
<span>{{ label }}</span>
|
||||
<slot v-if="hasDefaultSlot"></slot>
|
||||
<span v-else>{{ label }}</span>
|
||||
<slot v-if="iconPosition === 'right'" name="icon"></slot>
|
||||
</Button>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Button from 'primevue/button'
|
||||
import { computed } from 'vue'
|
||||
import { computed, useSlots } from 'vue'
|
||||
|
||||
import type { BaseButtonProps } from '@/types/buttonTypes'
|
||||
import {
|
||||
@@ -46,6 +47,9 @@ const {
|
||||
onClick
|
||||
} = defineProps<IconTextButtonProps>()
|
||||
|
||||
const slots = useSlots()
|
||||
const hasDefaultSlot = computed(() => !!slots.default)
|
||||
|
||||
const buttonStyle = computed(() => {
|
||||
const baseClasses = `${getBaseButtonClasses()} justify-start gap-2`
|
||||
const sizeClasses = getButtonSizeClasses(size)
|
||||
|
||||
Reference in New Issue
Block a user