diff --git a/apps/web/src/SettingsPage.tsx b/apps/web/src/SettingsPage.tsx index 47148ec..04a4e03 100644 --- a/apps/web/src/SettingsPage.tsx +++ b/apps/web/src/SettingsPage.tsx @@ -6,6 +6,7 @@ import type { } from "@shellbook/core"; import { settingsApi } from "./settingsApi"; import { PasswordForm } from "./PasswordForm"; +import { UpdatePanel } from "./UpdatePanel"; function duration(seconds: number): string { const days = seconds / 86400; @@ -150,10 +151,8 @@ export function SettingsPage({ ) : (
Loading…
)} -
- Update from the container with shellbook-update.
-
Loading…
+Unable to load the update status.
+{status.current} : "unknown (not a git checkout)"}
+ Updating from the web UI is not set up on this installation. Run shellbook-update as root in the
+ container (from the Proxmox host: pct exec <ctid> -- shellbook-update); that run also
+ adds the button here.
+
+ {watch.phase === "starting" && "Starting the update…"} + {watch.phase === "running" && "Updating… This takes a few minutes; ShellBook restarts at the end."} + {watch.phase === "restarting" && "ShellBook is restarting…"} + {watch.phase === "done" && ( + <> + Update finished{status.current ? ` (${status.current})` : ""}. Reload to use the new version. + + > + )} + {watch.phase === "failed" && "The update failed. The log below shows why."} + {watch.phase === "stalled" && + "The update did not start. Check systemctl status shellbook-update.path in the container."} +
+ )} + {error &&{error}
} + {check === "error" &&Unable to reach the repository.
} + {check && check !== "checking" && check !== "error" && ( + check.pinned ? ( +This installation is pinned to a fixed version and is not updated from the branch.
+ ) : check.changes.length === 0 ? ( +Up to date{check.latest ? ` (${check.latest})` : ""}.
+ ) : ( +
+ {check.changes.length === 1 ? "1 new change" : `${check.changes.length} new changes`} (
+ {check.current} → {check.latest}):
+
{change.commit} {change.subject}
+
+ {status.log}
+
+