mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
* Add support for custom iconify using tailwind plugin - Register svgs from custom icons folder - Update existing custom icons to remove padding - Swap component icons for classes in sidebar tabs - Update browse templates in menu to use custom icon * Add basic check for custom SVG icons * Remove unused iconify packages
30 lines
964 B
TypeScript
30 lines
964 B
TypeScript
import { markRaw } from 'vue'
|
|
|
|
import WorkflowsSidebarTab from '@/components/sidebar/tabs/WorkflowsSidebarTab.vue'
|
|
import { useSettingStore } from '@/stores/settingStore'
|
|
import { useWorkflowStore } from '@/stores/workflowStore'
|
|
import type { SidebarTabExtension } from '@/types/extensionTypes'
|
|
|
|
export const useWorkflowsSidebarTab = (): SidebarTabExtension => {
|
|
const settingStore = useSettingStore()
|
|
const workflowStore = useWorkflowStore()
|
|
return {
|
|
id: 'workflows',
|
|
icon: 'icon-[comfy--workflow]',
|
|
iconBadge: () => {
|
|
if (
|
|
settingStore.get('Comfy.Workflow.WorkflowTabsPosition') !== 'Sidebar'
|
|
) {
|
|
return null
|
|
}
|
|
const value = workflowStore.openWorkflows.length.toString()
|
|
return value === '0' ? null : value
|
|
},
|
|
title: 'sideToolbar.workflows',
|
|
tooltip: 'sideToolbar.workflows',
|
|
label: 'sideToolbar.labels.workflows',
|
|
component: markRaw(WorkflowsSidebarTab),
|
|
type: 'vue'
|
|
}
|
|
}
|