From a5dfebb1eb3410cb68dd9db7b22cce4327f93292 Mon Sep 17 00:00:00 2001 From: o1key <951565127@qq.com> Date: Mon, 13 Apr 2026 10:58:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=AC=A2=E8=BF=8E=E5=BC=B9=E6=A1=86=EF=BC=8C=E4=BB=85=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E6=9B=B4=E6=96=B0=E9=80=9A=E7=9F=A5=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- __init__.py | 4 +-- web/js/updateNotifier.js | 59 +--------------------------------------- 2 files changed, 2 insertions(+), 61 deletions(-) diff --git a/__init__.py b/__init__.py index 1545265..964aabb 100644 --- a/__init__.py +++ b/__init__.py @@ -11,9 +11,7 @@ Comfyui_o1key - ComfyUI 自定义节点集合 # 检查更新(仅在启动时检查一次) try: - from .utils.update_checker import check_for_updates, notify_update_available, notify_new_version - - notify_update_available() + from .utils.update_checker import check_for_updates, notify_new_version if check_for_updates(): notify_new_version() diff --git a/web/js/updateNotifier.js b/web/js/updateNotifier.js index d525d33..2af628f 100644 --- a/web/js/updateNotifier.js +++ b/web/js/updateNotifier.js @@ -22,63 +22,6 @@ function startCountdown(toast, closeBtn, seconds, accentColor) { }; } -api.addEventListener("o1key.update_available", (event) => { - const message = event.detail?.message || "欢迎使用o1key工作流"; - - const style = document.createElement("style"); - style.textContent = ` - @keyframes o1key-fadein { - from { opacity: 0; transform: translateY(16px) scale(0.97); } - to { opacity: 1; transform: translateY(0) scale(1); } - } - `; - document.head.appendChild(style); - - const toast = document.createElement("div"); - toast.style.cssText = ` - position: fixed; - bottom: 28px; - left: 28px; - background: linear-gradient(135deg, #0d3320 0%, #145a32 60%, #1e8449 100%); - color: #d5f5e3; - border: 1px solid #27ae60; - border-radius: 12px; - padding: 18px 20px 16px 20px; - font-size: 15px; - z-index: 99999; - box-shadow: 0 6px 24px rgba(39,174,96,0.35), 0 2px 8px rgba(0,0,0,0.5); - max-width: 340px; - animation: o1key-fadein 0.4s cubic-bezier(.22,.68,0,1.2); - `; - - const header = document.createElement("div"); - header.style.cssText = `display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;`; - - const title = document.createElement("span"); - title.textContent = "🐴 o1key 工作流"; - title.style.cssText = `font-weight: bold; font-size: 13px; color: #82e0aa; letter-spacing: 0.5px;`; - - const closeBtn = document.createElement("button"); - closeBtn.style.cssText = `background: none; border: none; color: #82e0aa; font-size: 13px; cursor: pointer; padding: 0; line-height: 1;`; - - header.appendChild(title); - header.appendChild(closeBtn); - - const divider = document.createElement("div"); - divider.style.cssText = `height: 1px; background: rgba(39,174,96,0.3); margin-bottom: 10px;`; - - const text = document.createElement("div"); - text.textContent = message; - text.style.cssText = `line-height: 1.7; color: #d5f5e3;`; - - toast.appendChild(header); - toast.appendChild(divider); - toast.appendChild(text); - document.body.appendChild(toast); - - startCountdown(toast, closeBtn, 5, "#82e0aa"); -}); - api.addEventListener("o1key.new_version", (event) => { const changelog = event.detail?.changelog || []; @@ -94,7 +37,7 @@ api.addEventListener("o1key.new_version", (event) => { const toast = document.createElement("div"); toast.style.cssText = ` position: fixed; - bottom: 148px; + bottom: 28px; left: 28px; background: linear-gradient(135deg, #0a1628 0%, #0d2b4e 60%, #1a4a7a 100%); color: #d6eaf8;