mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 10:24:23 +01:00
feat(tab_navigation): improve indicator for current item in context menu
This commit is contained in:
parent
4b2a4b8f7b
commit
7ee060b228
@ -47,16 +47,16 @@ export function handleHistoryContextMenu(webContents: WebContents) {
|
|||||||
if (!notePath) continue;
|
if (!notePath) continue;
|
||||||
|
|
||||||
const title = await tree.getNotePathTitle(notePath);
|
const title = await tree.getNotePathTitle(notePath);
|
||||||
|
const index = parseInt(idx, 10);
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
title,
|
title,
|
||||||
command: idx,
|
command: idx,
|
||||||
uiIcon:
|
checked: index === activeIndex,
|
||||||
parseInt(idx, 10) === activeIndex
|
enabled: index !== activeIndex,
|
||||||
? "bx bx-radio-circle-marked" // compare with type coercion!
|
uiIcon: index !== activeIndex && index < activeIndex
|
||||||
: parseInt(idx, 10) < activeIndex
|
? "bx bx-left-arrow-alt"
|
||||||
? "bx bx-left-arrow-alt"
|
: "bx bx-right-arrow-alt"
|
||||||
: "bx bx-right-arrow-alt"
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user