mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-15 09:04:52 +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
|
from torchvision.datasets.utils import download_url
|
||||||
|
|
||||||
# ensure .js
|
# ensure .js
|
||||||
print("### Loading: ComfyUI-Manager (V0.28.7)")
|
print("### Loading: ComfyUI-Manager (V0.28.8)")
|
||||||
|
|
||||||
comfy_ui_required_revision = 1240
|
comfy_ui_required_revision = 1240
|
||||||
comfy_ui_revision = "Unknown"
|
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:
|
if do_fetch:
|
||||||
print(f"\x1b[2K\rFetching done.")
|
print(f"\x1b[2K\rFetching done.")
|
||||||
elif do_update:
|
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:
|
elif do_update_check:
|
||||||
print(f"\x1b[2K\rUpdate check done.")
|
print(f"\x1b[2K\rUpdate check done.")
|
||||||
|
|
||||||
|
|
||||||
@server.PromptServer.instance.routes.get("/customnode/getmappings")
|
@server.PromptServer.instance.routes.get("/customnode/getmappings")
|
||||||
async def fetch_customnode_mappings(request):
|
async def fetch_customnode_mappings(request):
|
||||||
if request.rel_url.query["mode"] == "local":
|
if request.rel_url.query["mode"] == "local":
|
||||||
@ -549,6 +554,11 @@ async def update_all(request):
|
|||||||
json_obj = await get_data(uri)
|
json_obj = await get_data(uri)
|
||||||
check_custom_nodes_installed(json_obj, do_update=True)
|
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)
|
return web.Response(status=200)
|
||||||
except:
|
except:
|
||||||
return web.Response(status=400)
|
return web.Response(status=400)
|
||||||
|
|||||||
@ -265,9 +265,15 @@ async function updateAll(update_check_checkbox) {
|
|||||||
app.ui.dialog.element.style.zIndex = 9999;
|
app.ui.dialog.element.style.zIndex = 9999;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
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.show('ComfyUI and all extensions have been updated to the latest version.');
|
||||||
app.ui.dialog.element.style.zIndex = 9999;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user