mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
client/note color picker menu item: improve the integration with the tree context menu
This commit is contained in:
@@ -262,7 +262,13 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
|
||||
|
||||
{
|
||||
kind: "custom",
|
||||
componentFn: () => ColorPickerMenuItem({note})
|
||||
componentFn: () => {
|
||||
if (notOptionsOrHelp && selectedNotes.length === 1) {
|
||||
return ColorPickerMenuItem({note});
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
];
|
||||
return items.filter((row) => row !== null) as MenuItem<TreeCommandNames>[];
|
||||
|
||||
Reference in New Issue
Block a user