Add Workspace.SearchBox.Toggle command (#1814)

* Add Workspace.SearchBox.Toggle command

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-12-05 12:30:02 -08:00
committed by GitHub
parent 55c04b5533
commit e2fa1e65d1
7 changed files with 41 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ import {
LGraphNode,
LGraphGroup
} from '@comfyorg/litegraph'
import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore'
export function useCoreCommands(): ComfyCommand[] {
const getTracker = () => useWorkflowStore()?.activeWorkflow?.changeTracker
@@ -477,6 +478,15 @@ export function useCoreCommands(): ComfyCommand[] {
function: () => {
window.open('https://www.comfy.org/discord', '_blank')
}
},
{
id: 'Workspace.SearchBox.Toggle',
icon: 'pi pi-search',
label: 'Toggle Search Box',
versionAdded: '1.5.7',
function: () => {
useSearchBoxStore().toggleVisible()
}
}
]
}