This commit is contained in:
Mateusz Gruszczyński committed 2026-10-15 10:37:23 +02:00
1 parent 2ccc598b12
commit b757b34a31
26 files changed
+671 -116

No files matched your search

+6 -2
View File
@@ -145,7 +145,7 @@ window.rustProxyInlineLayout = (() => {
}
async function save() {
if (!draft || saving) return;
if (!dirty()) { finish(true); return; }
if (!dirty()) { finish(false); return; }
saving = true;
saveButton.disabled = cancelButton.disabled = unlock.disabled = true;
try {
@@ -196,5 +196,9 @@ window.rustProxyInlineLayout = (() => {
unlock?.addEventListener("click", () => { if (draft) void save(); else void begin(); });
saveButton?.addEventListener("click", () => { void save(); });
cancelButton?.addEventListener("click", cancel);
return { isEditing: () => !!draft, cancel };
return {
isEditing: () => !!draft,
currentDraft: () => draft ? { order: [...draft.order], hidden: [...draft.hidden] } : null,
cancel,
};
})();