Skip to content

Commit

Permalink
Show bookmark icon on booked mark nodes in node search box (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Sep 15, 2024
1 parent 7d25d97 commit 3550e7f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/searchbox/NodeSearchItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
>
<div class="option-display-name font-semibold flex flex-col">
<div>
<span v-if="isBookmarked">
<i class="pi pi-bookmark-fill text-sm mr-1"></i>
</span>
<span
v-html="highlightQuery(nodeDef.display_name, currentQuery)"
></span>
Expand Down Expand Up @@ -45,6 +48,7 @@ import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
import { highlightQuery } from '@/utils/formatUtil'
import { computed } from 'vue'
import { useSettingStore } from '@/stores/settingStore'
import { useNodeBookmarkStore } from '@/stores/nodeBookmarkStore'
const settingStore = useSettingStore()
const showCategory = computed(() =>
Expand All @@ -54,7 +58,12 @@ const showIdName = computed(() =>
settingStore.get('Comfy.NodeSearchBoxImpl.ShowIdName')
)
defineProps<{
const nodeBookmarkStore = useNodeBookmarkStore()
const isBookmarked = computed(() =>
nodeBookmarkStore.isBookmarked(props.nodeDef)
)
const props = defineProps<{
nodeDef: ComfyNodeDefImpl
currentQuery: string
}>()
Expand Down

0 comments on commit 3550e7f

Please sign in to comment.