From ce9ca1917db01bb91e2703d5b80d007bdd8367a3 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 1 Feb 2026 21:59:19 +0200 Subject: [PATCH] fix(mobile/note_actions): reintroduce split buttons --- .../mobile_widgets/mobile_detail_menu.tsx | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx index 5bb1f434e5..3458dcb0cf 100644 --- a/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx +++ b/apps/client/src/widgets/mobile_widgets/mobile_detail_menu.tsx @@ -6,8 +6,10 @@ import { useNoteContext } from "../react/hooks"; import { CommandItem, NoteContextMenu } from "../ribbon/NoteActions"; export default function MobileDetailMenu() { - const { note, noteContext } = useNoteContext(); + const { note, noteContext, parentComponent, ntxId } = useNoteContext(); const helpUrl = getHelpUrlForNote(note); + const subContexts = noteContext?.getMainContext().getSubContexts() ?? []; + const isMainContext = noteContext?.isMainContext(); return (
@@ -16,11 +18,27 @@ export default function MobileDetailMenu() { note={note} noteContext={noteContext} extraItems={<> - - {helpUrl && openInAppHelpFromUrl(helpUrl)} - >{t("help-button.title")}} + {helpUrl && <> + + openInAppHelpFromUrl(helpUrl)} + >{t("help-button.title")} + } + {subContexts.length < 2 && <> + + parentComponent.triggerCommand("openNewNoteSplit", { ntxId })} + icon="bx bx-dock-right" + >{t("create_pane_button.create_new_split")} + } + {!isMainContext && <> + + parentComponent.triggerCommand("closeThisNoteSplit", { ntxId })} + >{t("close_pane_button.close_this_pane")} + } } />