Add guided onboarding tour for first toolbox creation
All checks were successful
Deploy Sokko G / deploy (push) Successful in 14s

This commit is contained in:
Shinuwa 2026-08-14 13:20:47 +02:00
parent 3007aa1389
commit 4f73e0068b
20 changed files with 470 additions and 20 deletions

View file

@ -114,7 +114,7 @@ export function remapModuleOrderIds(moduleOrder, moduleIdMap) {
export function normalizeToolbox(toolbox) {
if (!toolbox || typeof toolbox !== "object") return null;
const modules = (Array.isArray(toolbox.modules) ? toolbox.modules : []).map(normalizeToolboxModule).filter(Boolean);
return {
const normalized = {
id: toolbox.id || uid("tbx"),
name: String(toolbox.name || "Nouvelle toolbox").trim() || "Nouvelle toolbox",
icon: normalizeToolboxIcon(toolbox.icon),
@ -123,6 +123,8 @@ export function normalizeToolbox(toolbox) {
moduleOrder: normalizeModuleOrder(toolbox.moduleOrder, modules),
updatedAt: toolbox.updatedAt || new Date().toISOString()
};
if (toolbox.tutorial === true) normalized.tutorial = true;
return normalized;
}
export function compactToolboxForStorage(toolbox) {
@ -137,6 +139,7 @@ export function compactToolboxForStorage(toolbox) {
};
if (normalized.moduleColumns === 1) compact.moduleColumns = 1;
if (normalized.icon !== DEFAULT_TOOLBOX_ICON) compact.icon = normalized.icon;
if (normalized.tutorial === true) compact.tutorial = true;
return compact;
}