Add display frames and improve create-page page management.

Store phone/tablet/photo-frame shells with catalogs, append pages from extra images or PDFs, and reorder drafts with drag-and-drop.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-20 14:20:16 +03:30
co-authored by Cursor
parent 16cd3197ef
commit c236b0f621
23 changed files with 1069 additions and 134 deletions
+5
View File
@@ -33,6 +33,7 @@ export async function openDatabase(databasePath: string): Promise<DbBundle> {
effect TEXT NOT NULL,
page_count INTEGER NOT NULL,
flip_ms INTEGER NOT NULL DEFAULT 1000,
frame TEXT NOT NULL DEFAULT 'none',
created_at TEXT NOT NULL
)
`);
@@ -42,6 +43,10 @@ export async function openDatabase(databasePath: string): Promise<DbBundle> {
if (!colNames.has("flip_ms")) {
sqlite.run("ALTER TABLE catalogs ADD COLUMN flip_ms INTEGER NOT NULL DEFAULT 1000");
}
if (!colNames.has("frame")) {
sqlite.run("ALTER TABLE catalogs ADD COLUMN frame TEXT NOT NULL DEFAULT 'none'");
console.log("[db] added catalogs.frame column");
}
const persist = () => {
fs.mkdirSync(path.dirname(databasePath), { recursive: true });