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

This commit is contained in:
Dr.Lt.Data 2024-01-15 18:55:29 +09:00
parent 7f10374a9f
commit 9eef99b868
2 changed files with 7 additions and 3 deletions

View File

@ -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})")

View File

@ -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}`);
}