Hub 2.24.1: Servers -> Updates offers every product

The product tabs were a fixed Events/Accounts list from before the Church
Website, so Website installs couldn't be batch-updated there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 08:34:52 +02:00
co-authored by Claude Opus 5.5
parent db90a0260a
commit d2fd58642f
7 changed files with 26 additions and 13 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "events-hub-frontend",
"version": "2.24.0",
"version": "2.24.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "events-hub-frontend",
"version": "2.24.0",
"version": "2.24.1",
"dependencies": {
"lucide-react": "^0.536.0",
"next": "^15.5.24",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "events-hub-frontend",
"version": "2.24.0",
"version": "2.24.1",
"private": true,
"scripts": {
"dev": "next dev -p 3200",
@@ -5,7 +5,7 @@ import Link from "next/link";
import { api, ApiError, errorText } from "@/lib/api";
import { fmtDate } from "@/lib/format";
import { usePaged } from "@/lib/paging";
import { PRODUCT_NAMES } from "@/lib/products";
import { PRODUCTS, PRODUCT_NAMES, type Product } from "@/lib/products";
import { ReleaseSelect } from "@/components/ReleaseSelect";
import type { Release } from "@/lib/types";
import { Loading, Message, PageTitle, Pager, Tabs } from "@/components/ui";
@@ -13,9 +13,9 @@ import { ServersNav, StatusPill, toInput, fromInput, type Deployment, type Job }
type Msg = { type: "ok" | "err"; text: string } | null;
const H = 60 * 60 * 1000;
/** Products the Hub updates on servers. */
const UPDATABLE = ["events", "accounts"] as const;
type Updatable = (typeof UPDATABLE)[number];
/** Products the Hub updates on servers. 2.24.1: the Church Website and App too (only Events and Accounts were offered). */
const UPDATABLE = PRODUCTS;
type Updatable = Product;
const versionOf = (d: Deployment) => d.install?.version || d.version || "?";
@@ -95,7 +95,7 @@ export default function UpdatesPage() {
{!all ? <Loading /> : (
<form className="card space-y-4" onSubmit={submit}>
<Tabs tabs={UPDATABLE.map(p => ({ key: p, label: `${PRODUCT_NAMES[p]} (${(all || []).filter(d => d.product === p).length})` }))} active={product} onChange={pick} />
<Tabs tabs={UPDATABLE.filter(p => p !== "app" || (all || []).some(d => d.product === p)).map(p => ({ key: p, label: `${PRODUCT_NAMES[p]} (${(all || []).filter(d => d.product === p).length})` }))} active={product} onChange={pick} />
<div className="flex flex-wrap items-center gap-2 text-sm">
<span className="text-slate-500">Select:</span>
<button type="button" className="btn-secondary px-2 py-1 text-xs" onClick={() => setChosen(deployments.map(d => d.id))}>All live {name} ({deployments.length})</button>
@@ -115,7 +115,7 @@ export default function UpdatesPage() {
<div>
<label className="label" htmlFor="b-v">{name} release</label>
<ReleaseSelect key={product} id="b-v" releases={ownReleases} value={form.version} onChange={version => setForm({ ...form, version })} />
{product === "events" && <p className="mt-1 text-xs text-slate-500">Each church&apos;s Accounts stays on its version, unless this release needs a newer one: then it&apos;s updated first in the same deploy, or installed first if the church has none. The confirmation lists what happens.</p>}
{product !== "accounts" && <p className="mt-1 text-xs text-slate-500">Each church&apos;s Accounts stays on its version, unless this release needs a newer one: then it&apos;s updated first in the same deploy, or installed first if the church has none. The confirmation lists what happens.</p>}
</div>
{form.emergency && form.asap
? <div><span className="label">When</span><p className="mt-2 text-sm">As soon as possible: the agent starts within a minute. They run one at a time.</p></div>