From 44a91d20932131e1fb83e966a87ff9c09c7a4767 Mon Sep 17 00:00:00 2001 From: bennykok Date: Wed, 9 Oct 2024 17:08:40 -0700 Subject: [PATCH] fix: default new ui for comfyui --- web-plugin/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web-plugin/index.js b/web-plugin/index.js index d8915a3..f714544 100644 --- a/web-plugin/index.js +++ b/web-plugin/index.js @@ -457,6 +457,17 @@ const ext = { // } }); + if (this.native_mode) { + // console.log("native mode", window, window.app); + try { + await app.ui.settings.setSettingValueAsync('Comfy.UseNewMenu', 'Top') + await app.ui.settings.setSettingValueAsync('Comfy.Sidebar.Size', 'small') + await app.ui.settings.setSettingValueAsync('Comfy.Sidebar.Location', 'right') + } catch (error) { + console.error("Error setting validation to false", error); + } + } + app.graph.onAfterChange = ((originalFunction) => async function () { const prompt = await app.graphToPrompt();