mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 14:55:50 +01:00
feat(tray): support bookmark folders
This commit is contained in:
@@ -91,15 +91,25 @@ function updateTrayMenu() {
|
|||||||
|
|
||||||
for (const bookmarkNote of parentNote?.children) {
|
for (const bookmarkNote of parentNote?.children) {
|
||||||
if (bookmarkNote.isLabelTruthy("bookmarkFolder")) {
|
if (bookmarkNote.isLabelTruthy("bookmarkFolder")) {
|
||||||
// Ignore bookmark folders for now.
|
menuItems.push({
|
||||||
continue;
|
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",
|
||||||
|
click: () => openInSameTab(bookmarkNote)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
menuItems.push({
|
|
||||||
label: bookmarkNote.title,
|
|
||||||
type: "normal",
|
|
||||||
click: () => openInSameTab(bookmarkNote)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return menuItems;
|
return menuItems;
|
||||||
|
|||||||
Reference in New Issue
Block a user