Newsletter drafts with content blocks, a footer and Post as blog post; Home has no header dropdown
Tools → Newsletter saves drafts (migration 057: newsletters, with content blocks owned 'newsletter'), adds blocks written for the issue and an editable footer (no unsubscribe link: Mailchimp adds one), and turns a draft into an unpublished blog post. The admin engine binds child owner ids as text, so an auto-numbered record's blocks are owned by '1', not '1.0'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9daf7b1a4f
commit
e8ac242e6d
8 changed files with 575 additions and 34 deletions
27
server/src/admin-schema/newsletters.js
Normal file
27
server/src/admin-schema/newsletters.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { text, blocksChild } from "./columns.js";
|
||||
|
||||
/* ── Newsletter drafts (057_newsletters.sql) ─────────────────────
|
||||
|
||||
Saved from Tools → Newsletter (AdminNewsletter.tsx), which is
|
||||
their only editor: there is no list or form for them in Data.
|
||||
`picks` is the builder's JSON of what's ticked. Deleting a draft
|
||||
takes its blocks with it (newsletters_cleanup). */
|
||||
|
||||
export const newsletters = {
|
||||
key: "newsletters",
|
||||
table: "newsletters",
|
||||
idColumn: "id",
|
||||
idKind: "auto",
|
||||
concurrency: "updated_at",
|
||||
|
||||
list: {
|
||||
columns: ["id", "title", "updated_at"],
|
||||
filters: [],
|
||||
search: ["title"],
|
||||
order: "updated_at DESC, id DESC",
|
||||
},
|
||||
|
||||
columns: [text("title"), text("intro"), text("footer"), text("picks")],
|
||||
|
||||
children: [blocksChild("newsletter")],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue