fix: reboot button doesn't work

This commit is contained in:
Dr.Lt.Data 2023-12-09 09:35:48 +09:00
parent 0b923a593a
commit 92ac9ef51f
6 changed files with 36 additions and 29 deletions

View File

@ -18,7 +18,7 @@ import re
import signal
import nodes
version = "V1.10.1"
version = "V1.10.2"
print(f"### Loading: ComfyUI-Manager ({version})")
required_comfyui_revision = 1793

View File

@ -116,12 +116,13 @@ export class AlternativesInstaller extends ComfyDialog {
if(btn_id) {
const rebootButton = document.getElementById(btn_id);
const self = this;
rebootButton.onclick = function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
};
rebootButton.addEventListener("click",
function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
});
}
}

View File

@ -438,11 +438,12 @@ async function updateAll(update_check_checkbox, manager_dialog) {
app.ui.dialog.show("ComfyUI and all extensions have been updated to the latest version.<BR>To apply the updated custom node, please <button class='cm-small-button' id='cm-reboot-button'>RESTART</button> ComfyUI. And refresh browser.");
const rebootButton = document.getElementById('cm-reboot-button');
rebootButton.onclick = function() {
if(rebootAPI()) {
manager_dialog.close();
}
};
rebootButton.addEventListener("click",
function() {
if(rebootAPI()) {
manager_dialog.close();
}
});
app.ui.dialog.element.style.zIndex = 10010;
}

View File

@ -101,11 +101,13 @@ export async function install_via_git_url(url, manager_dialog) {
const rebootButton = document.getElementById('cm-reboot-button');
const self = this;
rebootButton.onclick = function() {
if(rebootAPI()) {
manager_dialog.close();
}
};
rebootButton.addEventListener("click",
function() {
if(rebootAPI()) {
manager_dialog.close();
}
});
app.ui.dialog.element.style.zIndex = 10010;
}

View File

@ -255,12 +255,14 @@ export class CustomNodesInstaller extends ComfyDialog {
if(btn_id) {
const rebootButton = document.getElementById(btn_id);
const self = this;
rebootButton.onclick = function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
};
rebootButton.addEventListener("click",
function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
});
console.log(rebootButton);
}
}

View File

@ -130,12 +130,13 @@ export class ModelInstaller extends ComfyDialog {
if(btn_id) {
const rebootButton = document.getElementById(btn_id);
const self = this;
rebootButton.onclick = function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
};
rebootButton.addEventListener("click",
function() {
if(rebootAPI()) {
self.close();
self.manager_dialog.close();
}
});
}
}