mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 21:07:05 -06:00
client/tree context menu: relocate the note color picker
This commit is contained in:
parent
d42f911df9
commit
e53a2255a9
@ -244,6 +244,19 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
|
|||||||
|
|
||||||
{ kind: "separator"},
|
{ kind: "separator"},
|
||||||
|
|
||||||
|
{
|
||||||
|
kind: "custom",
|
||||||
|
componentFn: () => {
|
||||||
|
if (notOptionsOrHelp && selectedNotes.length === 1) {
|
||||||
|
return NoteColorPicker({note});
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ kind: "separator" },
|
||||||
|
|
||||||
{ title: t("tree-context-menu.import-into-note"), command: "importIntoNote", uiIcon: "bx bx-import", enabled: notSearch && noSelectedNotes && notOptionsOrHelp },
|
{ title: t("tree-context-menu.import-into-note"), command: "importIntoNote", uiIcon: "bx bx-import", enabled: notSearch && noSelectedNotes && notOptionsOrHelp },
|
||||||
|
|
||||||
{ title: t("tree-context-menu.export"), command: "exportNote", uiIcon: "bx bx-export", enabled: notSearch && noSelectedNotes && notOptionsOrHelp },
|
{ title: t("tree-context-menu.export"), command: "exportNote", uiIcon: "bx bx-export", enabled: notSearch && noSelectedNotes && notOptionsOrHelp },
|
||||||
@ -256,20 +269,7 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
|
|||||||
keyboardShortcut: "searchInSubtree",
|
keyboardShortcut: "searchInSubtree",
|
||||||
uiIcon: "bx bx-search",
|
uiIcon: "bx bx-search",
|
||||||
enabled: notSearch && noSelectedNotes
|
enabled: notSearch && noSelectedNotes
|
||||||
},
|
|
||||||
|
|
||||||
{ kind: "separator"},
|
|
||||||
|
|
||||||
{
|
|
||||||
kind: "custom",
|
|
||||||
componentFn: () => {
|
|
||||||
if (notOptionsOrHelp && selectedNotes.length === 1) {
|
|
||||||
return NoteColorPicker({note});
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
return items.filter((row) => row !== null) as MenuItem<TreeCommandNames>[];
|
return items.filter((row) => row !== null) as MenuItem<TreeCommandNames>[];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user