Skip to content

Build your personal knowledge base with Trilium Notes

client/note color picker menu item: add to the table row context menu

Adorian Doran87fcc0afe616
diff --git a/apps/client/src/widgets/collections/table/context_menu.ts b/apps/client/src/widgets/collections/table/context_menu.ts
index eb0a303ae6..11d4477caa 100644
--- a/apps/client/src/widgets/collections/table/context_menu.ts
+++ b/apps/client/src/widgets/collections/table/context_menu.ts
@@ -6,6 +6,7 @@ import { TableData } from "./rows.js";
import link_context_menu from "../../../menus/link_context_menu.js";
import froca from "../../../services/froca.js";
import branches from "../../../services/branches.js";
+import ColorPickerMenuItem from "../../../menus/custom-items/ColorPickerMenuItem.jsx";
import Component from "../../../components/component.js";
import { RefObject } from "preact";
@@ -219,6 +220,11 @@ export function showRowContextMenu(parentComponent: Component, e: MouseEvent, ro
title: t("table_context_menu.delete_row"),
uiIcon: "bx bx-trash",
handler: () => branches.deleteNotes([ rowData.branchId ], false, false)
+ },
+ { kind: "separator"},
+ {
+ kind: "custom",
+ componentFn: () => ColorPickerMenuItem({note: rowData.noteId})
}
],
selectMenuItemHandler: ({ command }) => link_context_menu.handleLinkContextMenuItem(command, rowData.noteId),