Hub 2.3.0: install Accounts (first product, or added next to a church's others)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "events-hub-frontend",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "events-hub-frontend",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.0",
|
||||
"dependencies": {
|
||||
"lucide-react": "^0.536.0",
|
||||
"next": "^15.5.24",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "events-hub-frontend",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 3200",
|
||||
|
||||
@@ -13,7 +13,7 @@ type Msg = { type: "ok" | "err"; text: string } | null;
|
||||
type Customer = { id: string; name: string; domain?: string | null };
|
||||
type InstallRow = { id: string; name: string; url: string; customer: { id: string; name: string } | null; version: string | null };
|
||||
|
||||
const emptyNew = { customerId: "", serverId: "", shortName: "", domain: "", timezone: "", adminName: "", adminEmail: "", version: "" };
|
||||
const emptyNew = { product: "events", customerId: "", serverId: "", shortName: "", domain: "", timezone: "", adminName: "", adminEmail: "", version: "" };
|
||||
const emptyLink = { installId: "", serverId: "", shortName: "", webPort: "", apiPort: "" };
|
||||
|
||||
/** Installs on servers: New install (§7) and linking existing installs (§14). */
|
||||
@@ -44,7 +44,7 @@ export default function InstallsPage() {
|
||||
setBusy(true);
|
||||
setMsg(null);
|
||||
try {
|
||||
const r = await api<{ deployment: Deployment; warnings: string[] }>("/api/admin/deployments", { method: "POST", body: { ...form, product: "events", version: form.version || undefined } });
|
||||
const r = await api<{ deployment: Deployment; warnings: string[] }>("/api/admin/deployments", { method: "POST", body: { ...form, version: form.version || undefined } });
|
||||
router.push(`/servers/installs/${r.deployment.id}${r.warnings.length ? `?warn=${encodeURIComponent(r.warnings.join(" "))}` : ""}`);
|
||||
} catch (err) { setMsg({ type: "err", text: errorText(err) }); }
|
||||
setBusy(false);
|
||||
@@ -71,10 +71,22 @@ export default function InstallsPage() {
|
||||
|
||||
{mode === "new" && (
|
||||
<form onSubmit={submitNew} className="card mb-6 grid gap-3 md:grid-cols-2">
|
||||
<h2 className="font-medium md:col-span-2">New Cross Events install</h2>
|
||||
<h2 className="font-medium md:col-span-2">New install</h2>
|
||||
<div className="md:col-span-2">
|
||||
<label className="label" htmlFor="n-product">Product</label>
|
||||
<select id="n-product" className="input" {...f("product")}>
|
||||
<option value="events">Cross Events</option>
|
||||
<option value="accounts">Accounts (the church's sign-in)</option>
|
||||
</select>
|
||||
<p className="mt-1 text-xs text-slate-500">
|
||||
{form.product === "accounts"
|
||||
? "Install Accounts before the Website, the App or Cross Events 3.0. Use the church's short name to add it next to its Events on the same server."
|
||||
: "A church that already has a product here keeps its short name: the new one is added next to it on the same server."}
|
||||
</p>
|
||||
</div>
|
||||
<div><label className="label" htmlFor="n-cust">Customer</label><select id="n-cust" className="input" required {...f("customerId")}><option value="">Choose…</option>{customers.map(c => <option key={c.id} value={c.id}>{c.name}</option>)}</select></div>
|
||||
<div><label className="label" htmlFor="n-short">Short name</label><input id="n-short" className="input" required pattern="[a-z][a-z0-9-]{1,30}" placeholder="hope" {...f("shortName")} /><p className="mt-1 text-xs text-slate-500">Folders, database and tunnels: a-z, 0-9 and -.</p></div>
|
||||
<div><label className="label" htmlFor="n-domain">Domain</label><input id="n-domain" className="input" required placeholder="events.hope.co.za" {...f("domain")} /></div>
|
||||
<div><label className="label" htmlFor="n-domain">Domain</label><input id="n-domain" className="input" required placeholder={form.product === "accounts" ? "accounts.hope.co.za" : "events.hope.co.za"} {...f("domain")} /></div>
|
||||
<div><label className="label" htmlFor="n-tz">Time zone</label><input id="n-tz" className="input" placeholder="Africa/Johannesburg" {...f("timezone")} /></div>
|
||||
<div><label className="label" htmlFor="n-an">Site admin name</label><input id="n-an" className="input" {...f("adminName")} /></div>
|
||||
<div><label className="label" htmlFor="n-ae">Site admin email</label><input id="n-ae" type="email" className="input" {...f("adminEmail")} /><p className="mt-1 text-xs text-slate-500">Gets the welcome email and update notices.</p></div>
|
||||
|
||||
Reference in New Issue
Block a user