diff --git a/surfsense_web/components/report-panel/report-panel.tsx b/surfsense_web/components/report-panel/report-panel.tsx index 7200e1003..780af9cac 100644 --- a/surfsense_web/components/report-panel/report-panel.tsx +++ b/surfsense_web/components/report-panel/report-panel.tsx @@ -8,7 +8,7 @@ import { z } from "zod"; import { closeReportPanelAtom, reportPanelAtom } from "@/atoms/chat/report-panel.atom"; import { PlateEditor } from "@/components/editor/plate-editor"; import { Button } from "@/components/ui/button"; -import { Drawer, DrawerContent, DrawerHandle } from "@/components/ui/drawer"; +import { Drawer, DrawerContent, DrawerHandle, DrawerTitle } from "@/components/ui/drawer"; import { DropdownMenu, DropdownMenuContent, @@ -499,8 +499,9 @@ function MobileReportDrawer() { }} shouldScaleBackground={false} > - + + {panelState.title || "Report"}
- {!readOnly && ( - <> +
+ {/* Scrollable editing buttons */} +
+ {!readOnly && ( + <> + + { + editor.undo(); + editor.tf.focus(); + }} + > + + + + { + editor.redo(); + editor.tf.focus(); + }} + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )} +
+ + {/* Fixed right-side buttons (Save + Mode) */} +
+ {/* Save button — only in edit mode with unsaved changes */} + {!readOnly && onSave && hasUnsavedChanges && ( { - editor.undo(); - editor.tf.focus(); - }} + tooltip={isSaving ? 'Saving...' : 'Save (⌘+S)'} + onClick={onSave} + disabled={isSaving} + className="bg-primary text-primary-foreground hover:bg-primary/90" > - - - - { - editor.redo(); - editor.tf.focus(); - }} - > - + {isSaving ? ( + + ) : ( + + )} + )} + {/* Mode toggle */} + {canToggleMode && ( - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - )} - -
- - {/* Save button — only in edit mode with unsaved changes */} - {!readOnly && onSave && hasUnsavedChanges && ( - - - {isSaving ? ( - - ) : ( - - )} - - - )} - - {/* Mode toggle */} - {canToggleMode && ( - - - - )} + )} +
); } diff --git a/surfsense_web/components/ui/insert-toolbar-button.tsx b/surfsense_web/components/ui/insert-toolbar-button.tsx index 4abf6a57b..666704c0c 100644 --- a/surfsense_web/components/ui/insert-toolbar-button.tsx +++ b/surfsense_web/components/ui/insert-toolbar-button.tsx @@ -195,7 +195,7 @@ export function InsertToolbarButton(props: DropdownMenuProps) { {groups.map(({ group, items }) => ( diff --git a/surfsense_web/components/ui/turn-into-toolbar-button.tsx b/surfsense_web/components/ui/turn-into-toolbar-button.tsx index 4b8c80c8e..94b77529d 100644 --- a/surfsense_web/components/ui/turn-into-toolbar-button.tsx +++ b/surfsense_web/components/ui/turn-into-toolbar-button.tsx @@ -145,7 +145,7 @@ export function TurnIntoToolbarButton({ tooltip = 'Turn into', ...props }: Dropd { e.preventDefault(); editor.tf.focus();