mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 15:30:39 +00:00
UI: gate update status pill on real version mismatch
This commit is contained in:
@@ -140,7 +140,12 @@ export function renderApp(state: AppViewState) {
|
||||
(typeof state.hello?.server?.version === "string" && state.hello.server.version.trim()) ||
|
||||
state.updateAvailable?.currentVersion ||
|
||||
t("common.na");
|
||||
const versionStatusClass = state.updateAvailable ? "warn" : "ok";
|
||||
const availableUpdate =
|
||||
state.updateAvailable &&
|
||||
state.updateAvailable.latestVersion !== state.updateAvailable.currentVersion
|
||||
? state.updateAvailable
|
||||
: null;
|
||||
const versionStatusClass = availableUpdate ? "warn" : "ok";
|
||||
const presenceCount = state.presenceEntries.length;
|
||||
const sessionsCount = state.sessionsResult?.count ?? null;
|
||||
const cronNext = state.cronStatus?.nextWakeAtMs ?? null;
|
||||
@@ -296,10 +301,10 @@ export function renderApp(state: AppViewState) {
|
||||
</aside>
|
||||
<main class="content ${isChat ? "content--chat" : ""}">
|
||||
${
|
||||
state.updateAvailable
|
||||
availableUpdate
|
||||
? html`<div class="update-banner callout danger" role="alert">
|
||||
<strong>Update available:</strong> v${state.updateAvailable.latestVersion}
|
||||
(running v${state.updateAvailable.currentVersion}).
|
||||
<strong>Update available:</strong> v${availableUpdate.latestVersion}
|
||||
(running v${availableUpdate.currentVersion}).
|
||||
<button
|
||||
class="btn btn--sm update-banner__btn"
|
||||
?disabled=${state.updateRunning || !state.connected}
|
||||
|
||||
Reference in New Issue
Block a user