mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 23:20:07 +00:00
Group comfy core settings (#508)
* Add category overwrite * Group settings
This commit is contained in:
@@ -418,6 +418,7 @@ export class ComfyApp {
|
||||
}
|
||||
this.enableWorkflowViewRestore = this.ui.settings.addSetting({
|
||||
id: 'Comfy.EnableWorkflowViewRestore',
|
||||
category: ['Comfy', 'Workflow', 'EnableWorkflowViewRestore'],
|
||||
name: 'Save and restore canvas position and zoom level in workflows',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
|
||||
@@ -245,6 +245,7 @@ let enableDomClipping = true
|
||||
export function addDomClippingSetting(): void {
|
||||
app.ui.settings.addSetting({
|
||||
id: 'Comfy.DOMClippingEnabled',
|
||||
category: ['Comfy', 'Node', 'DOMClippingEnabled'],
|
||||
name: 'Enable DOM element clipping (enabling may reduce performance)',
|
||||
type: 'boolean',
|
||||
defaultValue: enableDomClipping,
|
||||
|
||||
@@ -167,7 +167,8 @@ function dragElement(dragEl, settings): () => void {
|
||||
let savePos = undefined
|
||||
settings.addSetting({
|
||||
id: 'Comfy.MenuPosition',
|
||||
name: 'Save menu position',
|
||||
category: ['Comfy', 'Menu', 'MenuPosition'],
|
||||
name: "Save legacy menu's position",
|
||||
type: 'boolean',
|
||||
defaultValue: savePos,
|
||||
onChange(value) {
|
||||
@@ -369,6 +370,7 @@ export class ComfyUI {
|
||||
|
||||
const confirmClear = this.settings.addSetting({
|
||||
id: 'Comfy.ConfirmClear',
|
||||
category: ['Comfy', 'Workflow', 'ConfirmClear'],
|
||||
name: 'Require confirmation when clearing workflow',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
@@ -376,6 +378,7 @@ export class ComfyUI {
|
||||
|
||||
const promptFilename = this.settings.addSetting({
|
||||
id: 'Comfy.PromptFilename',
|
||||
category: ['Comfy', 'Workflow', 'PromptFilename'],
|
||||
name: 'Prompt for filename when saving workflow',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
@@ -394,13 +397,17 @@ export class ComfyUI {
|
||||
*/
|
||||
const previewImage = this.settings.addSetting({
|
||||
id: 'Comfy.PreviewFormat',
|
||||
name: 'When displaying a preview in the image widget, convert it to a lightweight image, e.g. webp, jpeg, webp;50, etc.',
|
||||
category: ['Comfy', 'Node Widget', 'PreviewFormat'],
|
||||
name: 'Preview image format',
|
||||
tooltip:
|
||||
'When displaying a preview in the image widget, convert it to a lightweight image, e.g. webp, jpeg, webp;50, etc.',
|
||||
type: 'text',
|
||||
defaultValue: ''
|
||||
})
|
||||
|
||||
this.settings.addSetting({
|
||||
id: 'Comfy.DisableSliders',
|
||||
category: ['Comfy', 'Node Widget', 'DisableSliders'],
|
||||
name: 'Disable node widget sliders',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
@@ -408,14 +415,19 @@ export class ComfyUI {
|
||||
|
||||
this.settings.addSetting({
|
||||
id: 'Comfy.DisableFloatRounding',
|
||||
name: 'Disable rounding floats (requires page reload).',
|
||||
category: ['Comfy', 'Node Widget', 'DisableFloatRounding'],
|
||||
name: 'Disable default float widget rounding.',
|
||||
tooltip:
|
||||
'(requires page reload) Cannot disable round when round is set by the node in the backend.',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
})
|
||||
|
||||
this.settings.addSetting({
|
||||
id: 'Comfy.FloatRoundingPrecision',
|
||||
name: 'Decimal places [0 = auto] (requires page reload).',
|
||||
category: ['Comfy', 'Node Widget', 'FloatRoundingPrecision'],
|
||||
name: 'Float widget rounding decimal places [0 = auto].',
|
||||
tooltip: '(requires page reload)',
|
||||
type: 'slider',
|
||||
attrs: {
|
||||
min: 0,
|
||||
@@ -427,6 +439,7 @@ export class ComfyUI {
|
||||
|
||||
this.settings.addSetting({
|
||||
id: 'Comfy.EnableTooltips',
|
||||
category: ['Comfy', 'Node', 'EnableTooltips'],
|
||||
name: 'Enable Tooltips',
|
||||
type: 'boolean',
|
||||
defaultValue: true
|
||||
|
||||
@@ -158,8 +158,10 @@ export class ComfyAppMenu {
|
||||
let resizeHandler: () => void
|
||||
this.menuPositionSetting = app.ui.settings.addSetting({
|
||||
id: 'Comfy.UseNewMenu',
|
||||
category: ['Comfy', 'Menu', 'UseNewMenu'],
|
||||
defaultValue: 'Disabled',
|
||||
name: '[Beta] Use new menu and workflow management. Note: On small screens the menu will always be at the top.',
|
||||
name: '[Beta] Use new menu and workflow management.',
|
||||
tooltip: 'On small screens the menu will always be at the top.',
|
||||
type: 'combo',
|
||||
options: ['Disabled', 'Top', 'Bottom'],
|
||||
onChange: async (v: MenuPosition) => {
|
||||
|
||||
@@ -347,7 +347,10 @@ function isSlider(display, app) {
|
||||
export function initWidgets(app) {
|
||||
app.ui.settings.addSetting({
|
||||
id: 'Comfy.WidgetControlMode',
|
||||
name: 'Controls when widget values are updated (randomize/increment/decrement), either before the prompt is queued or after.',
|
||||
category: ['Comfy', 'Node Widget', 'WidgetControlMode'],
|
||||
name: 'Widget control mode',
|
||||
tooltip:
|
||||
'Controls when widget values are updated (randomize/increment/decrement), either before the prompt is queued or after.',
|
||||
type: 'combo',
|
||||
defaultValue: 'after',
|
||||
options: ['before', 'after'],
|
||||
|
||||
Reference in New Issue
Block a user