Browse Source

fix: direct reflect to 'Add Node' context menu after component saving

pull/329/head
Dr.Lt.Data 10 months ago
parent
commit
9eef99b868
  1. 2
      __init__.py
  2. 8
      js/components-manager.js

2
__init__.py

@ -28,7 +28,7 @@ except:
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.") 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 '') version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
print(f"### Loading: ComfyUI-Manager ({version_str})") print(f"### Loading: ComfyUI-Manager ({version_str})")

8
js/components-manager.js

@ -140,8 +140,8 @@ export async function save_as_component(node, app) {
}); });
if(res.status == 200) { if(res.status == 200) {
storeGroupNode(name, subgraph); storeGroupNode(component_name, subgraph);
const config = new GroupNodeConfig(name, subgraph); const config = new GroupNodeConfig(component_name, subgraph);
await config.registerType(); await config.registerType();
let path = await res.text(); let path = await res.text();
@ -183,6 +183,10 @@ export async function save_as_component(node, app) {
}); });
if(res.status == 200) { if(res.status == 200) {
storeGroupNode(component_name, subgraph);
const config = new GroupNodeConfig(component_name, subgraph);
await config.registerType();
let path = await res.text(); let path = await res.text();
app.ui.dialog.show(`Component '${component_name}' is saved into:\n${path}`); app.ui.dialog.show(`Component '${component_name}' is saved into:\n${path}`);
} }

Loading…
Cancel
Save