mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 23:50:08 +00:00
fix: update template filtering and workflow templates to include 'Getting Started' category
This commit is contained in:
@@ -4,20 +4,6 @@ import { type Ref, computed, ref } from 'vue'
|
||||
|
||||
import type { TemplateInfo } from '@/platform/workflow/templates/types/template'
|
||||
|
||||
// @ts-expect-error unused (To be used later?)
|
||||
interface TemplateFilterOptions {
|
||||
searchQuery?: string
|
||||
selectedModels?: string[]
|
||||
selectedUseCases?: string[] // Now represents selected tags
|
||||
selectedLicenses?: string[]
|
||||
sortBy?:
|
||||
| 'default'
|
||||
| 'alphabetical'
|
||||
| 'newest'
|
||||
| 'vram-low-to-high'
|
||||
| 'model-size-low-to-high'
|
||||
}
|
||||
|
||||
export function useTemplateFiltering(
|
||||
templates: Ref<TemplateInfo[]> | TemplateInfo[]
|
||||
) {
|
||||
@@ -57,7 +43,7 @@ export function useTemplateFiltering(
|
||||
const availableModels = computed(() => {
|
||||
const modelSet = new Set<string>()
|
||||
templatesArray.value.forEach((template) => {
|
||||
if (template.models && Array.isArray(template.models)) {
|
||||
if (Array.isArray(template.models)) {
|
||||
template.models.forEach((model) => modelSet.add(model))
|
||||
}
|
||||
})
|
||||
|
||||
@@ -656,6 +656,7 @@
|
||||
"ComfyUI Examples": "ComfyUI Examples",
|
||||
"Custom Nodes": "Custom Nodes",
|
||||
"Basics": "Basics",
|
||||
"GettingStarted": "Getting Started",
|
||||
"Flux": "Flux",
|
||||
"ControlNet": "ControlNet",
|
||||
"Upscaling": "Upscaling",
|
||||
|
||||
@@ -316,7 +316,10 @@ export const useWorkflowTemplatesStore = defineStore(
|
||||
if (hasEssentialCategories) {
|
||||
items.push({
|
||||
id: 'basics',
|
||||
label: st('templateWorkflows.category.Basics', 'Basics'),
|
||||
label: st(
|
||||
'templateWorkflows.category.GettingStarted',
|
||||
'Getting Started'
|
||||
),
|
||||
icon: 'icon-[lucide--graduation-cap]'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user