Workflow templates (#938)

* Add template gallery

* Add simple test

* Add examples

* Enable floating menu in test
This commit is contained in:
pythongosssss
2024-09-24 08:59:28 +09:00
committed by Chenlei Hu
parent 2aaee5c331
commit bf7652227a
15 changed files with 2016 additions and 0 deletions

View File

@@ -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()