Enhanced custom icon support with tailwind (#5159)

* Add support for custom iconify using tailwind plugin
- Register svgs from custom icons folder
- Update existing custom icons to remove padding
- Swap component icons for classes in sidebar tabs
- Update browse templates in menu to use custom icon

* Add basic check for custom SVG icons

* Remove unused iconify packages
This commit is contained in:
pythongosssss
2025-08-25 18:20:12 +01:00
committed by GitHub
parent 6bf430b779
commit a630caa9d5
14 changed files with 603 additions and 176 deletions

View File

@@ -1,6 +1,6 @@
<template>
<SidebarIcon
:icon="TemplateIcon"
icon="icon-[comfy--template]"
:tooltip="$t('sideToolbar.templates')"
:label="$t('sideToolbar.labels.templates')"
:is-small="isSmall"
@@ -10,18 +10,13 @@
</template>
<script setup lang="ts">
import { computed, defineAsyncComponent, markRaw } from 'vue'
import { computed } from 'vue'
import { useCommandStore } from '@/stores/commandStore'
import { useSettingStore } from '@/stores/settingStore'
import SidebarIcon from './SidebarIcon.vue'
// Import the custom template icon
const TemplateIcon = markRaw(
defineAsyncComponent(() => import('virtual:icons/comfy/template'))
)
const settingStore = useSettingStore()
const commandStore = useCommandStore()