mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-31 05:19:53 +00:00
Show node id name in node searchbox (#703)
* Show node unique name in node searchbox * nit
This commit is contained in:
@@ -44,9 +44,15 @@
|
||||
<template v-slot:option="{ option }">
|
||||
<div class="option-container">
|
||||
<div class="option-display-name">
|
||||
<span
|
||||
v-html="highlightQuery(option.display_name, currentQuery)"
|
||||
></span>
|
||||
<div>
|
||||
<span
|
||||
v-html="highlightQuery(option.display_name, currentQuery)"
|
||||
></span>
|
||||
<span> </span>
|
||||
<Tag v-if="showIdName" severity="secondary">
|
||||
<span v-html="highlightQuery(option.name, currentQuery)"></span>
|
||||
</Tag>
|
||||
</div>
|
||||
<div v-if="showCategory" class="option-category">
|
||||
{{ option.category.replaceAll('/', ' > ') }}
|
||||
</div>
|
||||
@@ -106,6 +112,9 @@ const enableNodePreview = computed(() =>
|
||||
const showCategory = computed(() =>
|
||||
settingStore.get('Comfy.NodeSearchBoxImpl.ShowCategory')
|
||||
)
|
||||
const showIdName = computed(() =>
|
||||
settingStore.get('Comfy.NodeSearchBoxImpl.ShowIdName')
|
||||
)
|
||||
|
||||
const props = defineProps({
|
||||
filters: {
|
||||
|
||||
@@ -107,6 +107,15 @@ export const useSettingStore = defineStore('setting', {
|
||||
defaultValue: true
|
||||
})
|
||||
|
||||
app.ui.settings.addSetting({
|
||||
id: 'Comfy.NodeSearchBoxImpl.ShowIdName',
|
||||
category: ['Comfy', 'Node Search Box', 'ShowIdName'],
|
||||
name: 'Show node id name in search results',
|
||||
tooltip: 'Only applies to the default implementation',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
})
|
||||
|
||||
app.ui.settings.addSetting({
|
||||
id: 'Comfy.Sidebar.Location',
|
||||
category: ['Comfy', 'Sidebar', 'Location'],
|
||||
|
||||
Reference in New Issue
Block a user