mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44:06 +00:00
Restore context menu for new searchbox (#724)
* Searchbox revamp * nit * nit * Add playwright test * Update litegraph * Rename setting * Update test expectations [skip ci] --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { ZodType, z } from 'zod'
|
||||
import { zComfyWorkflow, zNodeId } from './comfyWorkflow'
|
||||
import { fromZodError } from 'zod-validation-error'
|
||||
import { colorPalettesSchema } from './colorPalette'
|
||||
import { LinkReleaseTriggerAction } from './searchBoxTypes'
|
||||
|
||||
const zNodeType = z.string()
|
||||
const zQueueIndex = z.number()
|
||||
@@ -419,6 +420,10 @@ const zBookmarkCustomization = z.object({
|
||||
})
|
||||
export type BookmarkCustomization = z.infer<typeof zBookmarkCustomization>
|
||||
|
||||
const zLinkReleaseTriggerAction = z.enum(
|
||||
Object.values(LinkReleaseTriggerAction) as [string, ...string[]]
|
||||
)
|
||||
|
||||
const zSettings = z.record(z.any()).and(
|
||||
z
|
||||
.object({
|
||||
@@ -454,6 +459,8 @@ const zSettings = z.record(z.any()).and(
|
||||
'hold shift',
|
||||
'NOT hold shift'
|
||||
]),
|
||||
'Comfy.LinkRelease.Action': zLinkReleaseTriggerAction,
|
||||
'Comfy.LinkRelease.ActionShift': zLinkReleaseTriggerAction,
|
||||
'Comfy.NodeSearchBoxImpl.NodePreview': z.boolean(),
|
||||
'Comfy.NodeSearchBoxImpl': z.enum(['default', 'simple']),
|
||||
'Comfy.NodeSearchBoxImpl.ShowCategory': z.boolean(),
|
||||
|
||||
@@ -3,3 +3,9 @@ export enum LinkReleaseTriggerMode {
|
||||
HOLD_SHIFT = 'hold shift',
|
||||
NOT_HOLD_SHIFT = 'NOT hold shift'
|
||||
}
|
||||
|
||||
export enum LinkReleaseTriggerAction {
|
||||
CONTEXT_MENU = 'context menu',
|
||||
SEARCH_BOX = 'search box',
|
||||
NO_ACTION = 'no action'
|
||||
}
|
||||
|
||||
@@ -44,4 +44,5 @@ export interface SettingParams {
|
||||
// Note: Like id, category value need to be unique.
|
||||
category?: string[]
|
||||
experimental?: boolean
|
||||
deprecated?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user