feat(tray): support bookmark folders

This commit is contained in:
Elian Doran 2025-02-01 10:54:00 +02:00
parent ae4f012390
commit 09bf48e5a4
No known key found for this signature in database

View File

@ -91,10 +91,18 @@ function updateTrayMenu() {
for (const bookmarkNote of parentNote?.children) {
if (bookmarkNote.isLabelTruthy("bookmarkFolder")) {
// Ignore bookmark folders for now.
continue;
}
menuItems.push({
label: bookmarkNote.title,
type: "submenu",
submenu: bookmarkNote.children.map((subitem) => {
return {
label: subitem.title,
type: "normal",
click: () => openInSameTab(subitem)
};
})
});
} else {
menuItems.push({
label: bookmarkNote.title,
type: "normal",
@ -102,6 +110,8 @@ function updateTrayMenu() {
});
}
}
return menuItems;
}