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

This commit is contained in:
Adorian Doran 2025-11-18 01:14:05 +02:00
parent 79830870dd
commit 87fcc0afe6

View File

@ -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),