From 3550e7f7f1dc51d3f193d70539bf3df8770036f6 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 15 Sep 2024 17:31:44 +0900 Subject: [PATCH] Show bookmark icon on booked mark nodes in node search box (#839) --- src/components/searchbox/NodeSearchItem.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/searchbox/NodeSearchItem.vue b/src/components/searchbox/NodeSearchItem.vue index 01360731c..f5d5a200f 100644 --- a/src/components/searchbox/NodeSearchItem.vue +++ b/src/components/searchbox/NodeSearchItem.vue @@ -4,6 +4,9 @@ >
+ + + @@ -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(() => @@ -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 }>()