Tidy the structure the audit found
- The colour defaults have one source, server/src/themeDefaults.js, read by the server and the admin; the build stops if src/index.css disagrees with it - server/src/admin-schema.js split into admin-schema/, one file per entity plus columns.js (the registry checked identical) - loadOwned() in shape.js replaces the same three loads on four detail routes (every public route checked identical); one NO_STORE - One OrgLogo component for the org lists and the chapter map; an organization's own page now shows the same initials as the lists - One localISO() for the viewer's calendar day, in place of three - Boot refuses a descriptor dropdown value the table's CHECK doesn't allow, instead of it failing on save - Deleted the unused Other.tsx and white-background logo; chapters.ts is useCommunity.ts; isSuper() in the Panel; stale comments and docs corrected Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
048c7599ce
commit
f934b1dd93
44 changed files with 1187 additions and 1170 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import siteConfiguration from "../../../site.json";
|
||||
import { mediaUrl } from "../media.ts";
|
||||
import { THEME_DEFAULTS } from "../../../server/src/themeDefaults.js";
|
||||
|
||||
/* ── Site settings (035_site_settings.sql) ───────────────────────
|
||||
Overrides for site.json, superadmins only: every blank falls back
|
||||
|
|
@ -8,24 +9,32 @@ const SITE_PAGES: [string, string][] = Object.entries(siteConfiguration.pages).m
|
|||
([path, page]) => [path, `${page.title} (${path})`],
|
||||
);
|
||||
|
||||
/* The palette an admin can change: token, label, light default, dark
|
||||
default. Keep in step with THEME_DEFAULTS in server/src/theme.js
|
||||
and the tokens in src/index.css. */
|
||||
const THEME_COLORS: [string, string, string, string][] = [
|
||||
["ink", "Headings", "#073d4a", "#eaf6f8"],
|
||||
["body", "Body text", "#26454c", "#cde0e4"],
|
||||
["muted", "Secondary text and quiet borders", "#4a6b72", "#9fb9bf"],
|
||||
["link", "Links and teal text", "#0f7183", "#5ccbdc"],
|
||||
["brand", "Brand teal (borders, rules, rings)", "#138ba0", "#2aa7bc"],
|
||||
["action", "Buttons (under white text)", "#0f7183", "#0f7183"],
|
||||
["action-hover", "Buttons, hovered", "#0b5c6a", "#0b5c6a"],
|
||||
["surface", "Page and card background", "#ffffff", "#0c1d21"],
|
||||
["tint", "Tinted sections and panels", "#eef9fb", "#11292e"],
|
||||
["tint-soft", "Faint panels and hovered rows", "#f6fbfc", "#0f2428"],
|
||||
["danger", "Errors and warnings", "#b3261e", "#ff8a80"],
|
||||
["danger-tint", "Error panel background", "#fdf3f2", "#3b1714"],
|
||||
/* The palette an admin can change, in the order the dropdown lists
|
||||
it: token and label. The defaults come from the server's list
|
||||
(server/src/themeDefaults.js), which the build checks against
|
||||
src/index.css, so there's one copy of each colour to change. */
|
||||
const THEME_LABELS: [string, string][] = [
|
||||
["ink", "Headings"],
|
||||
["body", "Body text"],
|
||||
["muted", "Secondary text and quiet borders"],
|
||||
["link", "Links and teal text"],
|
||||
["brand", "Brand teal (borders, rules, rings)"],
|
||||
["action", "Buttons (under white text)"],
|
||||
["action-hover", "Buttons, hovered"],
|
||||
["surface", "Page and card background"],
|
||||
["tint", "Tinted sections and panels"],
|
||||
["tint-soft", "Faint panels and hovered rows"],
|
||||
["danger", "Errors and warnings"],
|
||||
["danger-tint", "Error panel background"],
|
||||
];
|
||||
|
||||
const THEME_COLORS: [string, string, string, string][] = THEME_LABELS.map(([token, label]) => [
|
||||
token,
|
||||
label,
|
||||
THEME_DEFAULTS[token][0],
|
||||
THEME_DEFAULTS[token][1],
|
||||
]);
|
||||
|
||||
const defaultHelp = (row, column: 2 | 3) => {
|
||||
const entry = THEME_COLORS.find(([token]) => token === row?.token);
|
||||
return entry ? `Default: ${entry[column]}` : undefined;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue