Bring back templates tab.

This commit is contained in:
Robin Huang
2026-02-03 17:42:45 -08:00
parent 08c35b49f3
commit b17971a75a
3 changed files with 9 additions and 9 deletions

View File

@@ -19,6 +19,7 @@
>
<div ref="topToolbarRef" :class="groupClasses">
<ComfyMenuButton />
<SidebarTemplatesButton :is-small="isSmall" />
<SidebarIcon
v-for="tab in tabs"
:key="tab.id"
@@ -63,6 +64,7 @@ import ModeToggle from '@/components/sidebar/ModeToggle.vue'
import SidebarBottomPanelToggleButton from '@/components/sidebar/SidebarBottomPanelToggleButton.vue'
import SidebarSettingsButton from '@/components/sidebar/SidebarSettingsButton.vue'
import SidebarShortcutsToggleButton from '@/components/sidebar/SidebarShortcutsToggleButton.vue'
import SidebarTemplatesButton from '@/components/sidebar/SidebarTemplatesButton.vue'
import { useFeatureFlags } from '@/composables/useFeatureFlags'
import { isCloud } from '@/platform/distribution/types'
import { useSettingStore } from '@/platform/settings/settingStore'

View File

@@ -116,8 +116,8 @@
icon="pi pi-folder"
:title="$t('g.empty')"
:message="$t('g.noWorkflowsFound')"
:button-label="$t('sideToolbar.workflowTab.discoverWorkflows')"
@action="openDiscoverTab"
:button-label="$t('sideToolbar.browseTemplates')"
@action="openTemplates"
/>
</div>
</div>
@@ -157,7 +157,7 @@ import {
useWorkflowBookmarkStore,
useWorkflowStore
} from '@/platform/workflow/management/stores/workflowStore'
import { useSidebarTabStore } from '@/stores/workspace/sidebarTabStore'
import { useWorkflowTemplateSelectorDialog } from '@/composables/useWorkflowTemplateSelectorDialog'
import { useWorkspaceStore } from '@/stores/workspaceStore'
import type { TreeExplorerNode, TreeNode } from '@/types/treeExplorerTypes'
import { appendJsonExt } from '@/utils/formatUtil'
@@ -306,10 +306,10 @@ const selectionKeys = computed(() => ({
}))
const workflowBookmarkStore = useWorkflowBookmarkStore()
const sidebarTabStore = useSidebarTabStore()
const { show } = useWorkflowTemplateSelectorDialog()
function openDiscoverTab() {
sidebarTabStore.activeSidebarTabId = 'discover'
function openTemplates() {
show('sidebar')
}
onMounted(async () => {

View File

@@ -2,7 +2,6 @@ import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import { useAssetsSidebarTab } from '@/composables/sidebarTabs/useAssetsSidebarTab'
import { useDiscoverSidebarTab } from '@/composables/sidebarTabs/useDiscoverSidebarTab'
import { useModelLibrarySidebarTab } from '@/composables/sidebarTabs/useModelLibrarySidebarTab'
import { useNodeLibrarySidebarTab } from '@/composables/sidebarTabs/useNodeLibrarySidebarTab'
import { t, te } from '@/i18n'
@@ -23,7 +22,7 @@ export const useSidebarTabStore = defineStore('sidebarTab', () => {
)
})
const FULL_PAGE_TAB_IDS = ['discover']
const FULL_PAGE_TAB_IDS: string[] = []
const isFullPageTabActive = computed(() => {
return (
@@ -112,7 +111,6 @@ export const useSidebarTabStore = defineStore('sidebarTab', () => {
* Register the core sidebar tabs.
*/
const registerCoreSidebarTabs = () => {
registerSidebarTab(useDiscoverSidebarTab())
registerSidebarTab(useAssetsSidebarTab())
registerSidebarTab(useNodeLibrarySidebarTab())
registerSidebarTab(useModelLibrarySidebarTab())