mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 06:19:58 +00:00
Add setting to hide node category in search result (#546)
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
:python_module="option.python_module"
|
||||
/>
|
||||
</div>
|
||||
<div class="option-category">
|
||||
<div v-if="showCategory" class="option-category">
|
||||
{{ option.category.replaceAll('/', ' > ') }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -70,6 +70,9 @@ const settingStore = useSettingStore()
|
||||
const enableNodePreview = computed(() =>
|
||||
settingStore.get('Comfy.NodeSearchBoxImpl.NodePreview')
|
||||
)
|
||||
const showCategory = computed(() =>
|
||||
settingStore.get('Comfy.NodeSearchBoxImpl.ShowCategory')
|
||||
)
|
||||
|
||||
const props = defineProps({
|
||||
filters: {
|
||||
|
||||
@@ -95,6 +95,15 @@ export const useSettingStore = defineStore('setting', {
|
||||
defaultValue: true
|
||||
})
|
||||
|
||||
app.ui.settings.addSetting({
|
||||
id: 'Comfy.NodeSearchBoxImpl.ShowCategory',
|
||||
category: ['Comfy', 'Node Search Box', 'ShowCategory'],
|
||||
name: 'Show node category in search results',
|
||||
tooltip: 'Only applies to the default implementation',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
})
|
||||
|
||||
app.ui.settings.addSetting({
|
||||
id: 'Comfy.Sidebar.Location',
|
||||
category: ['Comfy', 'Sidebar', 'Location'],
|
||||
|
||||
@@ -417,6 +417,7 @@ const zSettings = z.record(z.any()).and(
|
||||
]),
|
||||
'Comfy.NodeSearchBoxImpl.NodePreview': z.boolean(),
|
||||
'Comfy.NodeSearchBoxImpl': z.enum(['default', 'simple']),
|
||||
'Comfy.NodeSearchBoxImpl.ShowCategory': z.boolean(),
|
||||
'Comfy.NodeSuggestions.number': z.number(),
|
||||
'Comfy.PreviewFormat': z.string(),
|
||||
'Comfy.PromptFilename': z.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user