auth ux improvements + cloner fix

This commit is contained in:
Your Name 2026-08-19 13:39:32 -04:00
parent 8bcaf264fa
commit 1394ce1e0c
3 changed files with 172 additions and 28 deletions

10
db.js
View file

@ -546,9 +546,14 @@ function cloneStructure(
cloneDbs = [],
) {
const transaction = db.transaction(() => {
// Carry over the source's head_injection (viewport meta, PWA tags, favicons,
// mobile-hardening CSS). Without this a clone renders unstyled/unscaled on
// mobile even though its templates are identical.
const source = getStructure(structId);
const cloneStructure = db.prepare(`
INSERT INTO structures (name, user_id, route_prefix, cloned_from)
VALUES (?, ?, ?, ?);
INSERT INTO structures (name, user_id, route_prefix, cloned_from, head_injection)
VALUES (?, ?, ?, ?, ?);
`);
const newStructId = cloneStructure.run(
@ -556,6 +561,7 @@ function cloneStructure(
userId,
routePrefix,
structId,
source ? source.head_injection : null,
).lastInsertRowid;
const dbIds = db