feat: changes to the note editor
All checks were successful
Build and Push App Image / build-and-push (push) Successful in 31s

This commit is contained in:
domrichardson
2026-03-25 09:55:02 +00:00
parent 3bfdf24fff
commit b253bec9fc
2 changed files with 6 additions and 13 deletions

View File

@@ -342,10 +342,11 @@ const canManageSpaceSettings = computed(
authStore.hasSpacePermission(currentSpace.value, "settings.member.view"),
);
const flattenCategories = (items, level = 0) =>
const flattenCategories = (items, trail = []) =>
items.flatMap((category) => {
const label = `${" ".repeat(level)}${category.name}`;
return [{ id: category.id, name: category.name, label }, ...(category.subcategories?.length ? flattenCategories(category.subcategories, level + 1) : [])];
const nextTrail = [...trail, category.name];
const label = nextTrail.join("/");
return [{ id: category.id, name: category.name, label }, ...(category.subcategories?.length ? flattenCategories(category.subcategories, nextTrail) : [])];
});
const categoryOptions = computed(() => flattenCategories(categoryTree.value));