mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
Workflow templates (#938)
* Add template gallery * Add simple test * Add examples * Enable floating menu in test
This commit is contained in:
committed by
Chenlei Hu
parent
2aaee5c331
commit
bf7652227a
@@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<SidebarTabTemplate :title="$t('sideToolbar.workflows')">
|
||||
<template #tool-buttons>
|
||||
<Button
|
||||
class="browse-templates-button"
|
||||
icon="pi pi-th-large"
|
||||
v-tooltip="$t('sideToolbar.browseTemplates')"
|
||||
text
|
||||
@click="browseTemplates"
|
||||
/>
|
||||
<Button
|
||||
class="browse-workflows-button"
|
||||
icon="pi pi-folder-open"
|
||||
@@ -112,6 +119,7 @@ import { TreeExplorerNode } from '@/types/treeExplorerTypes'
|
||||
import { ComfyWorkflow } from '@/scripts/workflows'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useTreeExpansion } from '@/hooks/treeHooks'
|
||||
import { showTemplateWorkflowsDialog } from '@/services/dialogService'
|
||||
|
||||
const searchQuery = ref('')
|
||||
const isSearching = computed(() => searchQuery.value.length > 0)
|
||||
@@ -145,6 +153,10 @@ const browse = () => {
|
||||
app.ui.loadFile()
|
||||
}
|
||||
|
||||
const browseTemplates = () => {
|
||||
showTemplateWorkflowsDialog()
|
||||
}
|
||||
|
||||
const createBlank = () => {
|
||||
app.workflowManager.setWorkflow(null)
|
||||
app.clean()
|
||||
|
||||
Reference in New Issue
Block a user