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:
2026-11-26 19:57:22 +02:00
co-authored by Claude Opus 5.5
parent e6c91c3705
commit dcc22a5c16
42 changed files with 1278 additions and 353 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
import { cookies } from "next/headers";
import { cookies, headers } from "next/headers";
import { cache } from "react";
import type { Image, Published, SiteContent, Template } from "./types";
@@ -20,8 +20,11 @@ const FALLBACK: SiteContent = {
*/
export const loadContent = cache(async (): Promise<SiteContent> => {
// Previewing (§4): the working copy, if the backend agrees this is an admin or a live share link.
// The admin's live preview beside its editors is the site in a frame: a signed-in admin's framed
// page is the working copy too, without the cookie (which would turn the whole browser to preview).
const jar = await cookies();
const preview = jar.get("ccw_preview")?.value;
const framed = (await headers()).get("sec-fetch-dest") === "iframe" && jar.has("ccw_session");
const preview = jar.get("ccw_preview")?.value ?? (framed ? "admin" : undefined);
if (preview) {
try {
const session = jar.get("ccw_session")?.value;