mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(tray): support bookmark folders
This commit is contained in:
parent
ae4f012390
commit
09bf48e5a4
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user