Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/tree context menu: relocate the note color picker
Adorian Dorane53a2255a9b8
diff --git a/apps/client/src/menus/tree_context_menu.ts b/apps/client/src/menus/tree_context_menu.tsindex 35480cfc60..19e6f4e169 100644--- a/apps/client/src/menus/tree_context_menu.ts+++ b/apps/client/src/menus/tree_context_menu.ts@@ -242,6 +242,19 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Treeenabled: isNotRoot && !isHoisted && parentNotSearch && notOptionsOrHelp},+ { 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 },@@ -256,20 +269,7 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<TreekeyboardShortcut: "searchInSubtree",uiIcon: "bx bx-search",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>[];}