mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 00:20:07 +00:00
22 lines
694 B
TypeScript
22 lines
694 B
TypeScript
import { markRaw } from 'vue'
|
|
|
|
import QueueSidebarTab from '@/components/sidebar/tabs/QueueSidebarTab.vue'
|
|
import { useQueuePendingTaskCountStore } from '@/stores/queueStore'
|
|
import type { SidebarTabExtension } from '@/types/extensionTypes'
|
|
|
|
export const useQueueSidebarTab = (): SidebarTabExtension => {
|
|
const queuePendingTaskCountStore = useQueuePendingTaskCountStore()
|
|
return {
|
|
id: 'queue',
|
|
icon: 'pi pi-history',
|
|
iconBadge: () => {
|
|
const value = queuePendingTaskCountStore.count.toString()
|
|
return value === '0' ? null : value
|
|
},
|
|
title: 'sideToolbar.queue',
|
|
tooltip: 'sideToolbar.queue',
|
|
component: markRaw(QueueSidebarTab),
|
|
type: 'vue'
|
|
}
|
|
}
|