From d24134d1fad18dde9fbeb6543203e14aa75e0ac4 Mon Sep 17 00:00:00 2001 From: "dr.lt.data" Date: Mon, 8 Apr 2024 18:12:38 +0900 Subject: [PATCH] feat: add 'restart button' into Manager menu --- __init__.py | 2 +- js/comfyui-manager.js | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 9cac289f..9361c885 100644 --- a/__init__.py +++ b/__init__.py @@ -30,7 +30,7 @@ except: print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.") -version = [2, 15] +version = [2, 16] 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/comfyui-manager.js b/js/comfyui-manager.js index 8ae6fff6..6b4c1ce6 100644 --- a/js/comfyui-manager.js +++ b/js/comfyui-manager.js @@ -226,6 +226,16 @@ const style = ` font-size: 17px !important; } +.cm-button-red { + width: 310px; + height: 30px; + position: relative; + overflow: hidden; + font-size: 17px !important; + background-color: #500000 !important; + color: white !important; +} + .cm-experimental-button { width: 290px; height: 30px; @@ -769,7 +779,14 @@ class ManagerMenuDialog extends ComfyDialog { AlternativesInstaller.instance = new AlternativesInstaller(app, self); AlternativesInstaller.instance.show(); } - }) + }), + + $el("br", {}, []), + $el("button.cm-button-red", { + type: "button", + textContent: "Restart", + onclick: () => rebootAPI() + }), ]; return res;