now support 'copy' install type for .js

bugfix: local db, message box
This commit is contained in:
Dr.Lt.Data
2023-05-06 20:14:23 +09:00
parent 2e41a8a3bd
commit 7d441ac473
3 changed files with 70 additions and 24 deletions

View File

@@ -57,7 +57,8 @@ async function install_custom_node(target, caller) {
return false;
}
finally {
caller.invalidateControl();
await caller.invalidateControl();
caller.updateMessage('<BR>To apply the installed custom node, please restart ComfyUI.');
}
}
}
@@ -84,7 +85,8 @@ async function install_model(target) {
return false;
}
finally {
ModelInstaller.instance.invalidateControl();
await ModelInstaller.instance.invalidateControl();
ModelInstaller.instance.updateMessage("<BR>To apply the installed model, please click the 'Refresh' button on the main menu.");
}
}
}
@@ -110,7 +112,7 @@ class CustomNodesInstaller extends ComfyDialog {
}
startInstall(target) {
this.message_box.innerHTML = `<BR><font color="green">Installing '${target.title}'</font>`;
this.updateMessage(`<BR><font color="green">Installing '${target.title}'</font>`);
for(let i in this.install_buttons) {
this.install_buttons[i].disabled = true;
@@ -130,6 +132,10 @@ class CustomNodesInstaller extends ComfyDialog {
this.createControls();
}
updateMessage(msg) {
this.message_box.innerHTML = msg;
}
async createGrid() {
var grid = document.createElement('table');
grid.setAttribute('id', 'custom-nodes-grid');
@@ -275,7 +281,7 @@ class AlternativesInstaller extends ComfyDialog {
}
startInstall(target) {
this.message_box.innerHTML = `<BR><font color="green">Installing '${target.title}'</font>`;
this.updateMessage(`<BR><font color="green">Installing '${target.title}'</font>`);
for(let i in this.install_buttons) {
this.install_buttons[i].disabled = true;
@@ -295,6 +301,10 @@ class AlternativesInstaller extends ComfyDialog {
this.createControls();
}
updateMessage(msg) {
this.message_box.innerHTML = msg;
}
async createGrid() {
var grid = document.createElement('table');
grid.setAttribute('id', 'alternatives-grid');
@@ -466,7 +476,7 @@ class ModelInstaller extends ComfyDialog {
}
startInstall(target) {
this.message_box.innerHTML = `<BR><font color="green">Installing '${target.name}'</font>`;
this.updateMessage(`<BR><font color="green">Installing '${target.name}'</font>`);
for(let i in this.install_buttons) {
this.install_buttons[i].disabled = true;
@@ -486,6 +496,10 @@ class ModelInstaller extends ComfyDialog {
this.createControls();
}
updateMessage(msg) {
this.message_box.innerHTML = msg;
}
async createGrid(models_json) {
var grid = document.createElement('table');
grid.setAttribute('id', 'external-models-grid');