Skip to content

Commit e53a225

Browse files
committed
client/tree context menu: relocate the note color picker
1 parent d42f911 commit e53a225

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

apps/client/src/menus/tree_context_menu.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,19 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree
242242
enabled: isNotRoot && !isHoisted && parentNotSearch && notOptionsOrHelp
243243
},
244244

245+
{ kind: "separator"},
246+
247+
{
248+
kind: "custom",
249+
componentFn: () => {
250+
if (notOptionsOrHelp && selectedNotes.length === 1) {
251+
return NoteColorPicker({note});
252+
} else {
253+
return null;
254+
}
255+
}
256+
},
257+
245258
{ kind: "separator" },
246259

247260
{ 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<Tree
256269
keyboardShortcut: "searchInSubtree",
257270
uiIcon: "bx bx-search",
258271
enabled: notSearch && noSelectedNotes
259-
},
260-
261-
{ kind: "separator"},
262-
263-
{
264-
kind: "custom",
265-
componentFn: () => {
266-
if (notOptionsOrHelp && selectedNotes.length === 1) {
267-
return NoteColorPicker({note});
268-
} else {
269-
return null;
270-
}
271-
}
272-
},
272+
}
273273
];
274274
return items.filter((row) => row !== null) as MenuItem<TreeCommandNames>[];
275275
}

0 commit comments

Comments
 (0)