From ed284fbc5f9c4cafe5b4046446ed69f144d55c7e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 15 Dec 2025 08:32:01 +0200 Subject: [PATCH] feat(layout/note_actions): integrate open API docs --- .../src/widgets/FloatingButtonsDefinitions.tsx | 2 +- .../src/widgets/ribbon/NoteActionsCustom.tsx | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx index ecd7c9b92..bd7372d66 100644 --- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx +++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx @@ -182,7 +182,7 @@ function RunActiveNoteButton({ note }: FloatingButtonContext) { } function OpenTriliumApiDocsButton({ note }: FloatingButtonContext) { - const isEnabled = note.mime.startsWith("application/javascript;env="); + const isEnabled = !isNewLayout && note.mime.startsWith("application/javascript;env="); return isEnabled && + @@ -195,3 +200,12 @@ function SaveToNoteButton({ note }: NoteActionsCustomInnerProps) { onClick={buildSaveSqlToNoteHandler(note)} />; } + +function OpenTriliumApiDocsButton({ note }: NoteActionsCustomInnerProps) { + const isEnabled = note.mime.startsWith("application/javascript;env="); + return isEnabled && openInAppHelpFromUrl(note.mime.endsWith("frontend") ? "Q2z6av6JZVWm" : "MEtfsqa5VwNi")} + />; +}