Add toolbox library page with editable examples
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s

This commit is contained in:
Shinuwa 2026-08-03 11:37:59 +02:00
parent 8eb622e05d
commit 9b72f4934c
20 changed files with 4774 additions and 31 deletions

View file

@ -143,7 +143,7 @@ function getComboCategory(combo) {
return String(combo?.category || "").trim();
}
function setComboCategory(combo, category) {
function setComboItemCategory(combo, category) {
const nextCombo = { ...combo };
if (category) nextCombo.category = category;
else delete nextCombo.category;
@ -292,7 +292,7 @@ export function CombosModule({ toolboxId, moduleId, context, editing }) {
getDropPlacement,
shouldShowGroupBoundaries
} = useGroupedReorder({
namespace: "combos",
namespace: `combos-${moduleId}`,
items: data.combos,
getItemId: (combo) => combo.id,
getItemGroup: getComboCategory,
@ -334,7 +334,7 @@ export function CombosModule({ toolboxId, moduleId, context, editing }) {
groupOrderKey: "categoryOrder",
collapsedGroupsKey: "collapsedCategories",
getItemGroup: getComboCategory,
setItemGroup: setComboCategory
setItemGroup: setComboItemCategory
}));
}
@ -595,7 +595,7 @@ export function CombosModule({ toolboxId, moduleId, context, editing }) {
</button>
<h3>{category}</h3>
</div>
<div>
<div className="checklist-section-actions">
<span>{group.combos.length}</span>
<button
className="checklist-section-collapse-button"