mirror of
https://github.com/zadam/trilium.git
synced 2025-11-21 16:14:23 +01:00
client/note color picker menu item: add to the table row context menu
This commit is contained in:
parent
79830870dd
commit
87fcc0afe6
@ -6,6 +6,7 @@ import { TableData } from "./rows.js";
|
|||||||
import link_context_menu from "../../../menus/link_context_menu.js";
|
import link_context_menu from "../../../menus/link_context_menu.js";
|
||||||
import froca from "../../../services/froca.js";
|
import froca from "../../../services/froca.js";
|
||||||
import branches from "../../../services/branches.js";
|
import branches from "../../../services/branches.js";
|
||||||
|
import ColorPickerMenuItem from "../../../menus/custom-items/ColorPickerMenuItem.jsx";
|
||||||
import Component from "../../../components/component.js";
|
import Component from "../../../components/component.js";
|
||||||
import { RefObject } from "preact";
|
import { RefObject } from "preact";
|
||||||
|
|
||||||
@ -219,6 +220,11 @@ export function showRowContextMenu(parentComponent: Component, e: MouseEvent, ro
|
|||||||
title: t("table_context_menu.delete_row"),
|
title: t("table_context_menu.delete_row"),
|
||||||
uiIcon: "bx bx-trash",
|
uiIcon: "bx bx-trash",
|
||||||
handler: () => branches.deleteNotes([ rowData.branchId ], false, false)
|
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),
|
selectMenuItemHandler: ({ command }) => link_context_menu.handleLinkContextMenuItem(command, rowData.noteId),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user