feat(in-app-help): render folders as book

This commit is contained in:
Elian Doran 2025-02-02 17:34:52 +02:00
parent 02708d593f
commit 122c1ad1ec
No known key found for this signature in database

View File

@ -33,13 +33,13 @@ function parseNoteMetaFile(noteMetaFile: NoteMetaFile): HiddenSubtreeItem[] {
}
function parseNoteMeta(noteMeta: NoteMeta, docNameRoot: string): HiddenSubtreeItem {
let iconClass: string = "bx bx-file";
const item: HiddenSubtreeItem = {
id: `_help_${noteMeta.noteId}`,
title: noteMeta.title,
type: "doc",
type: "doc", // can change
attributes: []
};
let iconClass: string = "bx bx-file";
// Handle attributes
for (const attribute of noteMeta.attributes ?? []) {
@ -51,6 +51,7 @@ function parseNoteMeta(noteMeta: NoteMeta, docNameRoot: string): HiddenSubtreeIt
// Handle folder notes
if (!noteMeta.dataFileName) {
iconClass = "bx bx-folder";
item.type = "book";
}
// Handle text notes