From 1bd6fddf2d264038ebbc01e4e6b4d9657f074749 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Fri, 12 Sep 2025 20:55:52 +0100 Subject: [PATCH] fix: update category icon mappings to use Lucide icon classes --- src/stores/workflowTemplatesStore.ts | 2 - src/utils/categoryIcons.ts | 58 ++++++++++++++-------------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/stores/workflowTemplatesStore.ts b/src/stores/workflowTemplatesStore.ts index 7872569fe..ff587366a 100644 --- a/src/stores/workflowTemplatesStore.ts +++ b/src/stores/workflowTemplatesStore.ts @@ -358,8 +358,6 @@ export const useWorkflowTemplatesStore = defineStore( const extensionCounts = enhancedTemplates.value.filter( (t) => t.sourceModule !== 'default' ).length - // Performance-related counts removed (Small Models / Mac) per request - // Removed loraTrainingCounts (deprecated category) // All Templates - as a simple selector items.push({ diff --git a/src/utils/categoryIcons.ts b/src/utils/categoryIcons.ts index 2d59cd8e2..9c202df07 100644 --- a/src/utils/categoryIcons.ts +++ b/src/utils/categoryIcons.ts @@ -1,52 +1,52 @@ /** - * Maps category IDs to their corresponding Lucide icon names + * Maps category IDs to their corresponding Lucide icon classes */ export const getCategoryIcon = (categoryId: string): string => { const iconMap: Record = { // Main categories - all: 'list', - 'getting-started': 'graduation-cap', + all: 'icon-[lucide--list]', + 'getting-started': 'icon-[lucide--graduation-cap]', // Generation types - 'generation-image': 'image', - image: 'image', - 'generation-video': 'film', - video: 'film', - 'generation-3d': 'box', - '3d': 'box', - 'generation-audio': 'volume-2', - audio: 'volume-2', - 'generation-llm': 'message-square-text', + 'generation-image': 'icon-[lucide--image]', + image: 'icon-[lucide--image]', + 'generation-video': 'icon-[lucide--film]', + video: 'icon-[lucide--film]', + 'generation-3d': 'icon-[lucide--box]', + '3d': 'icon-[lucide--box]', + 'generation-audio': 'icon-[lucide--volume-2]', + audio: 'icon-[lucide--volume-2]', + 'generation-llm': 'icon-[lucide--message-square-text]', // API and models - 'api-nodes': 'hand-coins', - 'closed-models': 'hand-coins', + 'api-nodes': 'icon-[lucide--hand-coins]', + 'closed-models': 'icon-[lucide--hand-coins]', // LLMs and AI - llm: 'message-square-text', - llms: 'message-square-text', - 'llm-api': 'message-square-text', + llm: 'icon-[lucide--message-square-text]', + llms: 'icon-[lucide--message-square-text]', + 'llm-api': 'icon-[lucide--message-square-text]', // Performance and hardware - 'small-models': 'zap', - performance: 'zap', - 'mac-compatible': 'command', - 'runs-on-mac': 'command', + 'small-models': 'icon-[lucide--zap]', + performance: 'icon-[lucide--zap]', + 'mac-compatible': 'icon-[lucide--command]', + 'runs-on-mac': 'icon-[lucide--command]', // Training - 'lora-training': 'dumbbell', - training: 'dumbbell', + 'lora-training': 'icon-[lucide--dumbbell]', + training: 'icon-[lucide--dumbbell]', // Extensions and tools - extensions: 'puzzle', - tools: 'wrench', + extensions: 'icon-[lucide--puzzle]', + tools: 'icon-[lucide--wrench]', // Fallbacks for common patterns - upscaling: 'maximize-2', - controlnet: 'sliders-horizontal', - 'area-composition': 'layout-grid' + upscaling: 'icon-[lucide--maximize-2]', + controlnet: 'icon-[lucide--sliders-horizontal]', + 'area-composition': 'icon-[lucide--layout-grid]' } // Return mapped icon or fallback to folder - return iconMap[categoryId.toLowerCase()] || 'folder' + return iconMap[categoryId.toLowerCase()] || 'icon-[lucide--folder]' }