From 8c730745d641300416c20f601adc83bfc3f2ad83 Mon Sep 17 00:00:00 2001 From: "dr.lt.data" Date: Thu, 4 Jan 2024 13:53:04 +0900 Subject: [PATCH] improve: show `try update` when 'skip update check' is checked fix: show failed/not updated item when 'installed' filter --- __init__.py | 2 +- js/custom-nodes-downloader.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index fd636a31..58e0d33b 100644 --- a/__init__.py +++ b/__init__.py @@ -27,7 +27,7 @@ except: print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.") -version = [1, 19, 2] +version = [1, 20] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') print(f"### Loading: ComfyUI-Manager ({version_str})") diff --git a/js/custom-nodes-downloader.js b/js/custom-nodes-downloader.js index fda3476e..5a486868 100644 --- a/js/custom-nodes-downloader.js +++ b/js/custom-nodes-downloader.js @@ -131,7 +131,10 @@ export class CustomNodesInstaller extends ComfyDialog { let content = data.author.toLowerCase() + data.description.toLowerCase() + data.title.toLowerCase() + data.reference.toLowerCase(); if(this.filter && this.filter != '*') { - if(this.filter != data.installed) { + if(this.filter == 'True' && (data.installed == 'Update' || data.installed == 'Fail')) { + this.grid_rows[i].control.style.display = null; + } + else if(this.filter != data.installed) { this.grid_rows[i].control.style.display = 'none'; continue; } @@ -530,6 +533,15 @@ export class CustomNodesInstaller extends ComfyDialog { break; case 'Fail': case 'True': + if(manager_instance.update_check_checkbox.checked) { + installBtn2 = document.createElement('button'); + installBtn2.innerHTML = 'Try update'; + installBtn2.className = "cm-btn-update"; + installBtn2.style.backgroundColor = 'Gray'; + installBtn2.style.color = 'white'; + this.install_buttons.push(installBtn2); + } + installBtn3 = document.createElement('button'); installBtn3.innerHTML = 'Disable'; installBtn3.className = "cm-btn-disable";