feat(ui): 2.0.0-alpha.13 — finer per-card width scaling (12-col grid + -/+ stepper)

clock/weather etc. default to 1/6 width; sizes store an integer span 1-12
(legacy s/m/l still accepted by /api/dashboard/layout).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-04 18:23:37 +10:00
parent ae3a45251d
commit f780043f2d
7 changed files with 51 additions and 16 deletions

View File

@@ -11,7 +11,8 @@ router.use(requireOwner);
const layoutSchema = z.object({
card_order: z.array(z.string()).default([]),
hidden: z.array(z.string()).default([]),
sizes: z.record(z.enum(['s', 'm', 'l'])).default({})
// Per-card width: an integer column span 112 (legacy 's'|'m'|'l' still accepted).
sizes: z.record(z.union([z.number().int().min(1).max(12), z.enum(['s', 'm', 'l'])])).default({})
});
router.get('/layout', asyncWrap(async (_req, res) => {