Improve toolbox checklists, image browsing, and guide integration
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s

This commit is contained in:
Shinuwa 2026-09-27 22:26:39 +02:00
parent 00e73f0062
commit 386212041f
47 changed files with 744 additions and 112 deletions

View file

@ -191,16 +191,19 @@ function remapModuleDataForExport(type, data, nextId) {
const compact = compactModuleDataForStorage(type, data);
if (!compact) return null;
if (type === "checklist") {
const { sections, items, ...settings } = compact;
if (compact.sections) {
return {
sections: compact.sections.map((section) => ({
...settings,
sections: sections.map((section) => ({
...section,
id: nextId("section"),
items: section.items.map((item) => ({ ...item, id: nextId("item") }))
}))
};
}
return { items: compact.items.map((item) => ({ ...item, id: nextId("item") })) };
if (items) return { ...settings, items: items.map((item) => ({ ...item, id: nextId("item") })) };
return settings;
}
if (type === "images") {
return { images: compact.images.map((image) => ({ ...image, id: nextId("image") })) };