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
@@ -558,6 +558,10 @@ async function saveSceneAsNew({ initial = "", note = "", bind = true } = {}) {
}
async function saveSceneToCurrentTemplate(context) {
if (context.readOnly || context.type !== "template") {
announce("演示案例不得覆盖,请另存为新模板", true);
return;
}
await mutate(async () => {
const result = await apiJson(`/api/templates/${context.id}`, {
method: "PUT",