Build Studio visual layout library with recoverable design CRUD
studio CI and deployment / verify-and-deploy (pull_request) Successful in 5m33s
waterfall-wiki CI and deployment / verify-and-deploy (pull_request) Successful in 16m52s

This commit is contained in:
2026-10-28 14:45:37 +08:00
parent ee4d818eed
commit dba9785379
27 changed files with 477 additions and 195 deletions
@@ -2,7 +2,7 @@ import {randomUUID} from 'node:crypto';
import type {PoolClient} from 'pg';
import type {Parameters} from './layout-parameters';
export type DesignRow={id:string;layout_id:string;name:string;parameters:Parameters;revision:number;post_id:string|null;created_at:Date;updated_at:Date};
export type DesignRow={id:string;layout_id:string;name:string;parameters:Parameters;revision:number;post_id:string|null;archived?:boolean;created_at:Date;updated_at:Date};
export const studioPageUrl=(design:Pick<DesignRow,'id'|'layout_id'>)=>`/studio/layouts/${design.layout_id}?id=${design.id}`;
function postDescription(design:DesignRow){return `已保存的 ${design.layout_id} 排版页面,可直接打开并继续编辑。`}
/** Caller holds the design row lock. All writes share the design's transaction. */