Accounts 1.8.0, Website 1.1.0: admins redesigned as Cross Events' dashboard and settings
- Website: an icon sidebar in groups (Your site, Content, Go live, Team), a dashboard with cards and a tile per part of the admin, steps to the first publish across the top of every admin page, and a live preview beside the page editor and Template and style (computer or phone width, folds away, reloads on save). A framed request (Sec-Fetch-Dest: iframe) with an admin session reads the drafts, so no preview cookie is set. /preview/start takes ?to=. The page editor has Content and Page details tabs. - Accounts: /admin is an overview (cards, "Needs you", a tile per section); People moved to /admin/people; the sidebar shows the part you're in, grouped, with a count on Deletion requests; People redesigned, with a confirm before Deactivate; Email and WhatsApp split into two cards. - Both: darker grey labels for contrast; lucide-react in the Website. - e2e: the live preview shows drafts while the site stays live; axe on the page editor. - docs: VERSIONS, changelogs, WHATS-NEW. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
import { api, canEdit } from "@/admin/api";
|
||||
import { Btn, Field, inputClass, Loading, Notice, Panel, Title, useAction, useAdmin } from "@/admin/ui";
|
||||
import { Hourglass, ListOrdered, Search, Settings } from "lucide-react";
|
||||
|
||||
type Settings = { comingSoonText: string; googleVerification: string | null; bingVerification: string | null };
|
||||
type PageRow = { id: string; kind: string; title: string; inNav: boolean };
|
||||
@@ -30,10 +31,10 @@ export default function SettingsPage() {
|
||||
}, "Saved as a draft: publish to change the menu.");
|
||||
return (
|
||||
<>
|
||||
<Title sub="How your site is found, and its menu.">Settings</Title>
|
||||
<Title icon={Settings} sub="How your site is found, and its menu.">Settings</Title>
|
||||
{message && <div className="mb-4"><Notice tone={message.tone}>{message.text}</Notice></div>}
|
||||
<fieldset disabled={!editor} className="space-y-6">
|
||||
<Panel title="Search engines">
|
||||
<Panel icon={Search} title="Search engines">
|
||||
<p className="mb-3 text-sm text-gray-600">To see how people find your site, add it to Google Search Console and Bing Webmaster Tools. They give you a code to prove the site is yours: paste it here (the whole tag is fine), save, then press Verify there. This goes live straight away.</p>
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
<Field label="Google Search Console code" error={fields.googleVerification}><input className={inputClass} value={s.googleVerification ?? ""} onChange={(e) => setForm({ ...form, googleVerification: e.target.value })} /></Field>
|
||||
@@ -41,7 +42,7 @@ export default function SettingsPage() {
|
||||
</div>
|
||||
<p className="mt-3 text-sm text-gray-600">A Google Business Profile helps people find your church on Google Maps: set one up at business.google.com with the same address as your church details.</p>
|
||||
</Panel>
|
||||
<Panel title="Coming soon">
|
||||
<Panel icon={Hourglass} title="Coming soon">
|
||||
<Field label="The line under “Coming soon”" hint="Shown until you first publish your site." error={fields.comingSoonText}>
|
||||
<input className={inputClass} value={s.comingSoonText} maxLength={300} onChange={(e) => setForm({ ...form, comingSoonText: e.target.value })} />
|
||||
</Field>
|
||||
@@ -49,7 +50,7 @@ export default function SettingsPage() {
|
||||
{editor && Object.keys(form).length > 0 && (
|
||||
<Btn kind="primary" busy={busy} onClick={() => run(async () => { settings.setData(await api<Settings>("/settings", { method: "PUT", body: form })); setForm({}); }, "Saved.")}>Save settings</Btn>
|
||||
)}
|
||||
<Panel title="Menu order">
|
||||
<Panel icon={ListOrdered} title="Menu order">
|
||||
<p className="mb-3 text-sm text-gray-600">Pages in the menu, in this order. Which pages show is set on each page (<Link href="/admin/pages" className="underline">Pages</Link>).</p>
|
||||
<ul className="divide-y divide-gray-200">
|
||||
{menu.map((p, i) => (
|
||||
|
||||
Reference in New Issue
Block a user