Restore default template binding across browser sessions

This commit is contained in:
2026-10-10 10:51:59 +08:00
parent 608229a497
commit 5db283c05a
20 changed files with 334 additions and 8 deletions
@@ -1,9 +1,10 @@
export function createTemplateEditContext(template, baseline) {
return {
type: template.type || "template",
id: template.id,
name: template.name,
revision: template.revision,
readOnly: Boolean(template.read_only ?? template.readOnly),
readOnly: template.type === "animation" || Boolean(template.read_only ?? template.readOnly),
baseline,
};
}
@@ -11,6 +12,7 @@ export function createTemplateEditContext(template, baseline) {
export function templateEditSnapshot(context, serializedScene) {
if (!context) return null;
return {
type: context.type || "template",
id: context.id,
name: context.name,
revision: context.revision,