From 9eef99b868aa5d1470317370e50900c2e80f0e34 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Mon, 15 Jan 2024 18:55:29 +0900 Subject: [PATCH] fix: direct reflect to 'Add Node' context menu after component saving --- __init__.py | 2 +- js/components-manager.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 9ebf8c7..e2c896f 100644 --- a/__init__.py +++ b/__init__.py @@ -28,7 +28,7 @@ except: print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.") -version = [2, 0] +version = [2, 0, 1] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') print(f"### Loading: ComfyUI-Manager ({version_str})") diff --git a/js/components-manager.js b/js/components-manager.js index c510dc0..b22bc14 100644 --- a/js/components-manager.js +++ b/js/components-manager.js @@ -140,8 +140,8 @@ export async function save_as_component(node, app) { }); if(res.status == 200) { - storeGroupNode(name, subgraph); - const config = new GroupNodeConfig(name, subgraph); + storeGroupNode(component_name, subgraph); + const config = new GroupNodeConfig(component_name, subgraph); await config.registerType(); let path = await res.text(); @@ -183,6 +183,10 @@ export async function save_as_component(node, app) { }); if(res.status == 200) { + storeGroupNode(component_name, subgraph); + const config = new GroupNodeConfig(component_name, subgraph); + await config.registerType(); + let path = await res.text(); app.ui.dialog.show(`Component '${component_name}' is saved into:\n${path}`); }