From d7722a1e0555e69339e272a0eb5bd32393385d6c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 15 Dec 2025 09:07:45 +0200 Subject: [PATCH] feat(layout/note_actions): integrate add child for relation map --- apps/client/src/widgets/ribbon/NoteActionsCustom.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx b/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx index f1b178daf..497e1ae14 100644 --- a/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx +++ b/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx @@ -54,6 +54,7 @@ export default function NoteActionsCustom(props: NoteActionsCustomProps) { return (innerProps &&
+ @@ -221,4 +222,13 @@ function OpenTriliumApiDocsButton({ noteMime }: NoteActionsCustomInnerProps) { onClick={() => openInAppHelpFromUrl(noteMime.endsWith("frontend") ? "Q2z6av6JZVWm" : "MEtfsqa5VwNi")} />; } + +function AddChildButton({ parentComponent, noteType, ntxId }: NoteActionsCustomInnerProps) { + const isEnabled = noteType === "relationMap"; + return isEnabled && parentComponent.triggerEvent("relationMapCreateChildNote", { ntxId })} + />; +} //#endregion