fix: update template filtering and workflow templates to include 'Getting Started' category

This commit is contained in:
Johnpaul
2025-09-23 06:35:41 +01:00
parent b6b4a562b9
commit 920f6cfa91
3 changed files with 6 additions and 16 deletions

View File

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

View File

@@ -656,6 +656,7 @@
"ComfyUI Examples": "ComfyUI Examples",
"Custom Nodes": "Custom Nodes",
"Basics": "Basics",
"GettingStarted": "Getting Started",
"Flux": "Flux",
"ControlNet": "ControlNet",
"Upscaling": "Upscaling",

View File

@@ -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]'
})
}