mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Show bookmark icon on booked mark nodes in node search box (#839)
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
>
|
>
|
||||||
<div class="option-display-name font-semibold flex flex-col">
|
<div class="option-display-name font-semibold flex flex-col">
|
||||||
<div>
|
<div>
|
||||||
|
<span v-if="isBookmarked">
|
||||||
|
<i class="pi pi-bookmark-fill text-sm mr-1"></i>
|
||||||
|
</span>
|
||||||
<span
|
<span
|
||||||
v-html="highlightQuery(nodeDef.display_name, currentQuery)"
|
v-html="highlightQuery(nodeDef.display_name, currentQuery)"
|
||||||
></span>
|
></span>
|
||||||
@@ -45,6 +48,7 @@ import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
|
|||||||
import { highlightQuery } from '@/utils/formatUtil'
|
import { highlightQuery } from '@/utils/formatUtil'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useSettingStore } from '@/stores/settingStore'
|
import { useSettingStore } from '@/stores/settingStore'
|
||||||
|
import { useNodeBookmarkStore } from '@/stores/nodeBookmarkStore'
|
||||||
|
|
||||||
const settingStore = useSettingStore()
|
const settingStore = useSettingStore()
|
||||||
const showCategory = computed(() =>
|
const showCategory = computed(() =>
|
||||||
@@ -54,7 +58,12 @@ const showIdName = computed(() =>
|
|||||||
settingStore.get('Comfy.NodeSearchBoxImpl.ShowIdName')
|
settingStore.get('Comfy.NodeSearchBoxImpl.ShowIdName')
|
||||||
)
|
)
|
||||||
|
|
||||||
defineProps<{
|
const nodeBookmarkStore = useNodeBookmarkStore()
|
||||||
|
const isBookmarked = computed(() =>
|
||||||
|
nodeBookmarkStore.isBookmarked(props.nodeDef)
|
||||||
|
)
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
nodeDef: ComfyNodeDefImpl
|
nodeDef: ComfyNodeDefImpl
|
||||||
currentQuery: string
|
currentQuery: string
|
||||||
}>()
|
}>()
|
||||||
|
|||||||
Reference in New Issue
Block a user