improve: update all - background updating

modified: update all - don't update ComfyUI
This commit is contained in:
Dr.Lt.Data
2025-02-13 22:04:33 +09:00
parent aaf569ca8c
commit 6ff6e05408
6 changed files with 257 additions and 231 deletions

View File

@@ -431,4 +431,25 @@ export function showTerminal() {
catch(exception) {
// do nothing
}
}
}
let need_restart = false;
export function setNeedRestart(value) {
need_restart = value;
}
async function onReconnected(event) {
if(need_restart) {
setNeedRestart(false);
const confirmed = await customConfirm("To apply the changes to the node pack's installation status, you need to refresh the browser. Would you like to refresh?");
if (!confirmed) {
return;
}
window.location.reload(true);
}
}
api.addEventListener('reconnected', onReconnected);