diff --git a/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx b/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx index 1f038a39b..09f53db11 100644 --- a/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx @@ -11,9 +11,9 @@ import { Laptop, ListFilter, Lock, - MoreHorizontal, Paperclip, Server, + SlidersVertical, Trash2, Upload, X, @@ -92,6 +92,7 @@ import { uploadFolderScan } from "@/lib/folder-sync-upload"; import { getWorkspaceIdNumber } from "@/lib/route-params"; import { getSupportedExtensionsSet } from "@/lib/supported-extensions"; import { queries } from "@/zero/queries/index"; +import { SidebarSection } from "./SidebarSection"; import { SidebarSlideOutPanel } from "./SidebarSlideOutPanel"; const DesktopLocalTabContent = dynamic( @@ -133,7 +134,7 @@ function downloadTextFile(content: string, fileName: string, type = "text/markdo URL.revokeObjectURL(url); } -function EmbeddedDocumentsMenu({ +export function EmbeddedDocumentsMenu({ typeCounts, activeTypes, onToggleType, @@ -159,7 +160,7 @@ function EmbeddedDocumentsMenu({ className="relative h-7 w-7 text-muted-foreground hover:bg-accent hover:text-accent-foreground" aria-label="Document actions" > - + {activeTypes.length > 0 ? ( ) : null} @@ -1555,17 +1556,22 @@ function AuthenticatedDocumentsSidebarBase({ if (embedded) { return ( -
-
+ handleCreateFolder(null)} /> -
+ } + > {renderDocumentTree()} -
+ ); } @@ -1934,15 +1940,20 @@ function AnonymousDocumentsSidebar({ if (embedded) { return ( -
-
+ {}} onCreateFolder={() => gate("create folders")} /> -
+ } + > gate("watch local folders")} onExportFolder={() => gate("export folders")} /> -
+ ); } diff --git a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx index 1ad370fab..6477e27a8 100644 --- a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx @@ -336,18 +336,13 @@ export function Sidebar({ )} {documentsPanel?.open ? ( - +
- +
) : null} )} diff --git a/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx b/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx index 573173cf5..ac995094a 100644 --- a/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx +++ b/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx @@ -41,7 +41,7 @@ export function SidebarSection({ className )} > -
+
{title} {persistentAction}
+
+ {persistentAction} +
)}