mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-02-08 12:12:35 +08:00
fix loading
This commit is contained in:
parent
3a7f495c96
commit
da5b12aa2d
@ -430,7 +430,7 @@ export class CustomNodesManager {
|
|||||||
const installGroups = {
|
const installGroups = {
|
||||||
"Disabled": ["enable", "uninstall"],
|
"Disabled": ["enable", "uninstall"],
|
||||||
"Update": ["update", "disable", "uninstall"],
|
"Update": ["update", "disable", "uninstall"],
|
||||||
"Fail": ["try-fix"],
|
"Fail": ["try-fix", "uninstall"],
|
||||||
"True": ["try-update", "disable", "uninstall"],
|
"True": ["try-update", "disable", "uninstall"],
|
||||||
"False": ["install"],
|
"False": ["install"],
|
||||||
'None': ["try-install"]
|
'None': ["try-install"]
|
||||||
@ -982,6 +982,14 @@ export class CustomNodesManager {
|
|||||||
const res = await api.fetchApi(route, options).catch(e => {
|
const res = await api.fetchApi(route, options).catch(e => {
|
||||||
err = e;
|
err = e;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!res) {
|
||||||
|
return {
|
||||||
|
status: 400,
|
||||||
|
error: new Error("Unknown Error")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const { status, statusText } = res;
|
const { status, statusText } = res;
|
||||||
if (err) {
|
if (err) {
|
||||||
return {
|
return {
|
||||||
@ -993,7 +1001,7 @@ export class CustomNodesManager {
|
|||||||
if (status !== 200) {
|
if (status !== 200) {
|
||||||
return {
|
return {
|
||||||
status,
|
status,
|
||||||
error: new Error(statusText)
|
error: new Error(statusText || "Unknown Error")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1340,9 +1348,13 @@ export class CustomNodesManager {
|
|||||||
$elem.setAttribute("disabled", "disabled");
|
$elem.setAttribute("disabled", "disabled");
|
||||||
} else {
|
} else {
|
||||||
$elem.removeAttribute("disabled");
|
$elem.removeAttribute("disabled");
|
||||||
$elem.classList.remove("cn-btn-loading");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Array.from(this.element.querySelectorAll(".cn-btn-loading")).forEach($elem => {
|
||||||
|
$elem.classList.remove("cn-btn-loading");
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showRestart() {
|
showRestart() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user