mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
Refactor core sidebar tab registration (#1158)
* Refactor sidebar tab register * Register core tabs
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import { useModelLibrarySidebarTab } from '@/hooks/sidebarTabs/modelLibrarySidebarTab'
|
||||
import { useNodeLibrarySidebarTab } from '@/hooks/sidebarTabs/nodeLibrarySidebarTab'
|
||||
import { useQueueSidebarTab } from '@/hooks/sidebarTabs/queueSidebarTab'
|
||||
import { useWorkflowsSidebarTab } from '@/hooks/sidebarTabs/workflowsSidebarTab'
|
||||
import { SidebarTabExtension } from '@/types/extensionTypes'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref } from 'vue'
|
||||
@@ -34,12 +38,23 @@ export const useSidebarTabStore = defineStore('sidebarTab', () => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the core sidebar tabs.
|
||||
*/
|
||||
const registerCoreSidebarTabs = () => {
|
||||
registerSidebarTab(useQueueSidebarTab())
|
||||
registerSidebarTab(useNodeLibrarySidebarTab())
|
||||
registerSidebarTab(useModelLibrarySidebarTab())
|
||||
registerSidebarTab(useWorkflowsSidebarTab())
|
||||
}
|
||||
|
||||
return {
|
||||
sidebarTabs,
|
||||
activeSidebarTabId,
|
||||
activeSidebarTab,
|
||||
toggleSidebarTab,
|
||||
registerSidebarTab,
|
||||
unregisterSidebarTab
|
||||
unregisterSidebarTab,
|
||||
registerCoreSidebarTabs
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user