mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-18 02:43:00 +08:00
fix: reboot button occassionally doesn't work
This commit is contained in:
parent
2a54d98dbf
commit
aed16687ca
@ -624,12 +624,12 @@ async function updateAll(update_check_checkbox, manager_dialog) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.ui.dialog.show(
|
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.<BR>"
|
"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-button5'>RESTART</button> ComfyUI. And refresh browser.<BR>"
|
||||||
+failed_list
|
+failed_list
|
||||||
+updated_list
|
+updated_list
|
||||||
);
|
);
|
||||||
|
|
||||||
const rebootButton = document.getElementById('cm-reboot-button');
|
const rebootButton = document.getElementById('cm-reboot-button5');
|
||||||
rebootButton.addEventListener("click",
|
rebootButton.addEventListener("click",
|
||||||
function() {
|
function() {
|
||||||
if(rebootAPI()) {
|
if(rebootAPI()) {
|
||||||
|
|||||||
10
js/common.js
10
js/common.js
@ -67,7 +67,7 @@ export async function install_checked_custom_node(grid_rows, target_i, caller, m
|
|||||||
}
|
}
|
||||||
|
|
||||||
await caller.invalidateControl();
|
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}`);
|
const res = await api.fetchApi(`/customnode/install/pip?packages=${packages}`);
|
||||||
|
|
||||||
if(res.status == 200) {
|
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;
|
const self = this;
|
||||||
|
|
||||||
rebootButton.addEventListener("click", rebootAPI);
|
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}`);
|
const res = await api.fetchApi(`/customnode/install/git_url?url=${url}`);
|
||||||
|
|
||||||
if(res.status == 200) {
|
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;
|
const self = this;
|
||||||
|
|
||||||
rebootButton.addEventListener("click",
|
rebootButton.addEventListener("click",
|
||||||
|
|||||||
@ -23,7 +23,7 @@ async function restore_snapshot(target) {
|
|||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
await SnapshotManager.instance.invalidateControl();
|
await SnapshotManager.instance.invalidateControl();
|
||||||
SnapshotManager.instance.updateMessage("<BR>To apply the snapshot, please <button id='cm-reboot-button' class='cm-small-button'>RESTART</button> ComfyUI. And refresh browser.", 'cm-reboot-button');
|
SnapshotManager.instance.updateMessage("<BR>To apply the snapshot, please <button id='cm-reboot-button2' class='cm-small-button'>RESTART</button> ComfyUI. And refresh browser.", 'cm-reboot-button2');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user