From 906fe4f8daa538abb29de2fb5325ce9a1766cf9e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 15 Dec 2025 08:19:40 +0200 Subject: [PATCH] feat(layout/note_actions): integrate execute script button --- apps/client/src/widgets/FloatingButtonsDefinitions.tsx | 2 +- apps/client/src/widgets/ribbon/NoteActionsCustom.tsx | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx index 644e87f5e..496532c06 100644 --- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx +++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx @@ -173,7 +173,7 @@ function ShowHighlightsListWidgetButton({ note, noteContext, isDefaultViewMode } } function RunActiveNoteButton({ note }: FloatingButtonContext) { - const isEnabled = note.mime.startsWith("application/javascript") || note.mime === "text/x-sqlite;schema=trilium"; + const isEnabled = !isNewLayout && (note.mime.startsWith("application/javascript") || note.mime === "text/x-sqlite;schema=trilium"); return isEnabled && + @@ -174,3 +175,12 @@ function ToggleReadOnlyButton({ note, viewType, isDefaultViewMode }: NoteActions onClick={() => setReadOnly(!isReadOnly)} />; } + +function RunActiveNoteButton({ note }: NoteActionsCustomInnerProps) { + const isEnabled = note.mime.startsWith("application/javascript") || note.mime === "text/x-sqlite;schema=trilium"; + return isEnabled && ; +}