Releases with what's new, notices to churches, withdrawn update requests
- Releases page: each Cross Events version with notes and an urgent flag; the newest is the latest version (moved off Settings; the old setting becomes the first release). Installs get the notes for every newer version. - Notices page: a banner for site admins and supervisors (with a time window), an email to the customer and admin contact, or both; for every install or chosen ones. - POST /api/installs/update-request/cancel resolves the request and emails Joshua. - Protocol doc: releases and notices in the heartbeat/register replies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { api, errorText, setToken } from "@/lib/api";
|
||||
import { fmtDate } from "@/lib/format";
|
||||
import { matches, usePaged } from "@/lib/paging";
|
||||
@@ -11,7 +12,6 @@ type AuditRow = { id: string; action: string; target: string | null; metadata: u
|
||||
type Msg = { type: "ok" | "err"; text: string } | null;
|
||||
|
||||
const FIELDS: { key: string; label: string; hint: string; type?: string }[] = [
|
||||
{ key: "latest_version", label: "Latest Cross Events release", hint: "e.g. 1.41.0 — installs on an older version show as behind, and see \"Update available\"." },
|
||||
{ key: "alert_email", label: "Alert email", hint: "Where new alerts are sent.", type: "email" },
|
||||
{ key: "offline_minutes", label: "Offline after (minutes without a heartbeat)", hint: "Default 60.", type: "number" },
|
||||
{ key: "backup_max_age_hours", label: "Backup too old after (hours)", hint: "Default 48.", type: "number" },
|
||||
@@ -22,7 +22,7 @@ const FIELDS: { key: string; label: string; hint: string; type?: string }[] = [
|
||||
|
||||
type Tab = "alerts" | "email" | "security" | "audit";
|
||||
const TABS: { key: Tab; label: string }[] = [
|
||||
{ key: "alerts", label: "Releases and alerts" },
|
||||
{ key: "alerts", label: "Alerts" },
|
||||
{ key: "email", label: "Email" },
|
||||
{ key: "security", label: "Login and security" },
|
||||
{ key: "audit", label: "Audit log" },
|
||||
@@ -122,6 +122,7 @@ export default function SettingsPage() {
|
||||
<div role="tabpanel" id={`panel-${tab}`} aria-labelledby={`tab-${tab}`}>
|
||||
{tab === "alerts" && (
|
||||
<form onSubmit={save} className="card max-w-2xl space-y-4">
|
||||
<p className="text-sm text-slate-600">The latest Cross Events version is the newest one on the <Link href="/releases" className="text-indigo-700 hover:underline">Releases</Link> page{settings.latest_version ? ` (now ${settings.latest_version})` : ""}.</p>
|
||||
{FIELDS.map(f => (
|
||||
<div key={f.key}>
|
||||
<label className="label" htmlFor={f.key}>{f.label}</label>
|
||||
|
||||
Reference in New Issue
Block a user