NGU-Web/server/src/admin-schema/siteSettings.js
Zaldimmar dc53af238f Add a Request form, with files in Google Drive and email notices
One form at /request for blog posts, events, and new or updated
chapters, regions (updates only), partners, teams, awards and people.
?type= opens it on one; buttons on the Community sections, blog posts,
Retreats and the front page calendar do. Files (.docx, PDF, JPEG, PNG)
go to a Google Drive folder through a service account.

Requests are feedback rows of type 'content' (migration 046), in a
third Forms queue: files download from Drive, a .docx can become a
draft blog post, and deleting a request deletes its files. New content
and data requests email the addresses in Site settings through Gmail.

Setup: docs/google-drive-and-mail.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 15:54:00 -05:00

59 lines
1.6 KiB
JavaScript

import { THEME_TOKENS, checkTheme } from "../theme.js";
import { text, enumeration } from "./columns.js";
/* ── Site settings (035_site_settings.sql) ──────────────────────
A singleton of overrides for what site.json says: name,
description, preview image, icons, search indexing, and static
pages' titles and intros. Superadmins only. pageMeta.js merges it
over site.json. */
export const siteSettings = {
key: "site_settings",
table: "site_settings",
idColumn: "id",
idKind: "slug",
singleton: "site",
concurrency: "updated_at",
writeRole: "superadmin",
list: {
columns: ["id", "site_name", "updated_at"],
filters: [],
search: [],
order: "id",
},
columns: [
text("site_name"),
text("description"),
text("preview_image"),
text("favicon"),
text("apple_touch_icon"),
enumeration("indexing", ["on", "off"]),
text("privacy_email"),
text("notify_emails"),
],
children: [
{
key: "pages",
table: "site_setting_pages",
owner: { column: "settings_id" },
order: "sort_order",
columns: [text("path", { required: true }), text("title"), text("description")],
},
{
key: "colors",
table: "site_setting_colors",
owner: { column: "settings_id" },
order: "sort_order",
columns: [
enumeration("token", THEME_TOKENS, { required: true }),
text("light"),
text("dark"),
],
},
],
// Refuses a palette that would make text hard to read (theme.js).
check: checkTheme,
};