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 <noreply@anthropic.com>
This commit is contained in:
@@ -292,3 +292,10 @@ input[type=file]::file-selector-button { background: var(--panel); color: var(--
|
|||||||
.us-steps li { font-size: 11px; }
|
.us-steps li { font-size: 11px; }
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) { .us-fill, .us-steps li.active .us-dot, .update-overlay { animation: none; } }
|
@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; } }
|
||||||
|
|||||||
+1
-1
@@ -185,7 +185,7 @@ function renderNav() {
|
|||||||
if (p.group !== group) { group = p.group; items.push(h("div", { class: "nav-group" }, group)); }
|
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) },
|
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),
|
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);
|
nav.replaceChildren(...items);
|
||||||
$("meButton").classList.toggle("active", state.page === "account");
|
$("meButton").classList.toggle("active", state.page === "account");
|
||||||
|
|||||||
@@ -132,8 +132,16 @@ public sealed class Updater
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool firstCheckStarted;
|
||||||
|
|
||||||
public object Status()
|
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)
|
lock (gate)
|
||||||
{
|
{
|
||||||
var sdkInfo = sdk;
|
var sdkInfo = sdk;
|
||||||
|
|||||||
Reference in New Issue
Block a user