From 905d19180710d3b7e99c7392bb7e99b2858063a2 Mon Sep 17 00:00:00 2001 From: MrMaho Date: Fri, 2 Oct 2026 17:56:00 +0200 Subject: [PATCH] Panel: pulsing dot on Update when a new server version is available The dot replaces the small 'new' badge; the first update check now starts as soon as the panel asks for the update status instead of 60 s after start. Co-Authored-By: Claude Opus 5.5 --- Panel/app.css | 7 +++++++ Panel/app.js | 2 +- Updater.cs | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Panel/app.css b/Panel/app.css index 23e2077..bfda9fc 100644 --- a/Panel/app.css +++ b/Panel/app.css @@ -292,3 +292,10 @@ input[type=file]::file-selector-button { background: var(--panel); color: var(-- .us-steps li { font-size: 11px; } } @media (prefers-reduced-motion: reduce) { .us-fill, .us-steps li.active .us-dot, .update-overlay { animation: none; } } + +/* Punkt an "Update", wenn eine neue Server-Version da ist */ +nav button { position: relative; } +.nav-dot { margin-left: auto; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--accent); + box-shadow: 0 0 0 3px rgba(242, 107, 29, .22); animation: nav-dot-pulse 1.8s ease-in-out infinite; } +@keyframes nav-dot-pulse { 50% { box-shadow: 0 0 0 6px rgba(242, 107, 29, .08); } } +@media (prefers-reduced-motion: reduce) { .nav-dot { animation: none; } } diff --git a/Panel/app.js b/Panel/app.js index b6c4465..483ac13 100644 --- a/Panel/app.js +++ b/Panel/app.js @@ -185,7 +185,7 @@ function renderNav() { if (p.group !== group) { group = p.group; items.push(h("div", { class: "nav-group" }, group)); } items.push(h("button", { type: "button", class: p.id === state.page ? "active" : "", onclick: () => go(p.id) }, h("span", { class: "ico" }, p.icon), h("span", { class: "nav-label" }, p.label), - p.id === "update" && state.updateAvailable ? h("span", { class: "nav-badge", title: "Update available" }, "new") : null)); + p.id === "update" && state.updateAvailable ? h("span", { class: "nav-dot", title: "Update available", "aria-label": "Update available" }) : null)); } nav.replaceChildren(...items); $("meButton").classList.toggle("active", state.page === "account"); diff --git a/Updater.cs b/Updater.cs index 7d3f132..39871f3 100644 --- a/Updater.cs +++ b/Updater.cs @@ -132,8 +132,16 @@ public sealed class Updater }); } + bool firstCheckStarted; + public object Status() { + // Noch nie geprüft (gerade erst gestartet): jetzt im Hintergrund prüfen, damit das Panel den Punkt bald zeigt + if (lastCheckUtc == null && !firstCheckStarted) + { + firstCheckStarted = true; + _ = Task.Run(async () => { try { await CheckAsync(); } catch { } }); + } lock (gate) { var sdkInfo = sdk;