mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 06:04:31 +08:00
improve: better message.
This commit is contained in:
parent
fc528e8be2
commit
ca2a9b894f
14
__init__.py
14
__init__.py
@ -55,7 +55,7 @@ sys.path.append('../..')
|
||||
from torchvision.datasets.utils import download_url
|
||||
|
||||
# ensure .js
|
||||
print("### Loading: ComfyUI-Manager (V0.28.7)")
|
||||
print("### Loading: ComfyUI-Manager (V0.28.8)")
|
||||
|
||||
comfy_ui_required_revision = 1240
|
||||
comfy_ui_revision = "Unknown"
|
||||
@ -500,10 +500,15 @@ def check_custom_nodes_installed(json_obj, do_fetch=False, do_update_check=True,
|
||||
if do_fetch:
|
||||
print(f"\x1b[2K\rFetching done.")
|
||||
elif do_update:
|
||||
print(f"\x1b[2K\rUpdate done.")
|
||||
update_exists = any(item['installed'] == 'Update' for item in json_obj['custom_nodes'])
|
||||
if update_exists:
|
||||
print(f"\x1b[2K\rUpdate done.")
|
||||
else:
|
||||
print(f"\x1b[2K\rAll extensions are already up-to-date.")
|
||||
elif do_update_check:
|
||||
print(f"\x1b[2K\rUpdate check done.")
|
||||
|
||||
|
||||
@server.PromptServer.instance.routes.get("/customnode/getmappings")
|
||||
async def fetch_customnode_mappings(request):
|
||||
if request.rel_url.query["mode"] == "local":
|
||||
@ -549,6 +554,11 @@ async def update_all(request):
|
||||
json_obj = await get_data(uri)
|
||||
check_custom_nodes_installed(json_obj, do_update=True)
|
||||
|
||||
update_exists = any(item['installed'] == 'Update' for item in json_obj['custom_nodes'])
|
||||
|
||||
if update_exists:
|
||||
return web.Response(status=201)
|
||||
|
||||
return web.Response(status=200)
|
||||
except:
|
||||
return web.Response(status=400)
|
||||
|
||||
@ -265,9 +265,15 @@ async function updateAll(update_check_checkbox) {
|
||||
app.ui.dialog.element.style.zIndex = 9999;
|
||||
return false;
|
||||
}
|
||||
|
||||
app.ui.dialog.show('ComfyUI and all extensions have been updated to the latest version.');
|
||||
app.ui.dialog.element.style.zIndex = 9999;
|
||||
if(response1.status == 201 || response2.status == 201) {
|
||||
app.ui.dialog.show('ComfyUI and all extensions have been updated to the latest version.');
|
||||
app.ui.dialog.element.style.zIndex = 9999;
|
||||
update_check_checkbox.checked = false;
|
||||
}
|
||||
else {
|
||||
app.ui.dialog.show('ComfyUI and all extensions are already up-to-date with the latest versions.');
|
||||
app.ui.dialog.element.style.zIndex = 9999;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user