Line data Source code
1 : <template>
2 21 : <div class="flex h-12 items-center gap-2 border-b px-2">
3 : <div class="min-w-0 flex-1 px-2 text-[14px] font-normal">
4 : <span>{{ headerTitle }}</span>
5 : </div>
6 : <div class="inline-flex h-6 items-center gap-2 text-[12px] leading-none">
7 : <span :class="{ 'opacity-50': queuedCount === 0 }">{{
8 : t('sideToolbar.queueProgressOverlay.clearQueueTooltip')
9 : }}</span>
10 : <Button
11 : :tooltip="t('sideToolbar.queueProgressOverlay.clearAllJobsTooltip')"
12 : variant="destructive"
13 : size="icon"
14 : :aria-label="t('sideToolbar.queueProgressOverlay.clearQueued')"
15 : :disabled="queuedCount === 0"
16 : @click="$emit('clearQueued')"
17 : >
18 : <i class="icon-[lucide--list-x]" />
19 : </Button>
20 : </div>
21 : <JobHistoryActionsMenu @clear-history="$emit('clearHistory')" />
22 : </div>
23 : </template>
24 :
25 : <script setup lang="ts">
26 : import { useI18n } from 'vue-i18n'
27 :
28 : import JobHistoryActionsMenu from '@/components/queue/JobHistoryActionsMenu.vue'
29 : import Button from '@comfyorg/design-system/button/Button'
30 :
31 : defineProps<{
32 : headerTitle: string
33 : queuedCount: number
34 : }>()
35 :
36 : defineEmits<{
37 : (e: 'clearHistory'): void
38 : (e: 'clearQueued'): void
39 : }>()
40 :
41 21 : const { t } = useI18n()
42 : </script>
|