fix: reboot button occassionally doesn't work

This commit is contained in:
Dr.Lt.Data
2024-02-25 23:18:20 +09:00
parent 2a54d98dbf
commit aed16687ca
3 changed files with 8 additions and 8 deletions

View File

@@ -67,7 +67,7 @@ export async function install_checked_custom_node(grid_rows, target_i, caller, m
}
await caller.invalidateControl();
caller.updateMessage("<BR>To apply the installed/updated/disabled/enabled custom node, please <button id='cm-reboot-button' class='cm-small-button'>RESTART</button> ComfyUI. And refresh browser.", 'cm-reboot-button');
caller.updateMessage("<BR>To apply the installed/updated/disabled/enabled custom node, please <button id='cm-reboot-button1' class='cm-small-button'>RESTART</button> ComfyUI. And refresh browser.", 'cm-reboot-button1');
}
};
@@ -92,9 +92,9 @@ export async function install_pip(packages) {
const res = await api.fetchApi(`/customnode/install/pip?packages=${packages}`);
if(res.status == 200) {
app.ui.dialog.show(`PIP package installation is processed.<br>To apply the pip packages, please click the <button id='cm-reboot-button'><font size='3px'>RESTART</font></button> button in ComfyUI.`);
app.ui.dialog.show(`PIP package installation is processed.<br>To apply the pip packages, please click the <button id='cm-reboot-button3'><font size='3px'>RESTART</font></button> button in ComfyUI.`);
const rebootButton = document.getElementById('cm-reboot-button');
const rebootButton = document.getElementById('cm-reboot-button3');
const self = this;
rebootButton.addEventListener("click", rebootAPI);
@@ -124,9 +124,9 @@ export async function install_via_git_url(url, manager_dialog) {
const res = await api.fetchApi(`/customnode/install/git_url?url=${url}`);
if(res.status == 200) {
app.ui.dialog.show(`'${url}' is installed<BR>To apply the installed custom node, please <button id='cm-reboot-button'><font size='3px'>RESTART</font></button> ComfyUI.`);
app.ui.dialog.show(`'${url}' is installed<BR>To apply the installed custom node, please <button id='cm-reboot-button4'><font size='3px'>RESTART</font></button> ComfyUI.`);
const rebootButton = document.getElementById('cm-reboot-button');
const rebootButton = document.getElementById('cm-reboot-button4');
const self = this;
rebootButton.addEventListener("click",