diff --git a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx index 0bbab2a38..b514d0ed7 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsFilters.tsx @@ -76,87 +76,28 @@ export function DocumentsFilters({ return ( - {/* Main toolbar row */} -
- {/* Action Buttons - Left Side */} -
- -
- - {/* Spacer */} -
- - {/* Search Input */} - -
-
- onSearch(e.target.value)} - placeholder="Search" - type="text" - aria-label={t("filter_placeholder")} - /> - {Boolean(searchValue) && ( - { - onSearch(""); - inputRef.current?.focus(); - }} - initial={{ opacity: 0, scale: 0.8 }} - animate={{ opacity: 1, scale: 1 }} - exit={{ opacity: 0, scale: 0.8 }} - whileHover={{ scale: 1.1 }} - whileTap={{ scale: 0.9 }} +
+ {/* Type Filter */} + + + - + + {activeTypes.length > 0 && ( + + {activeTypes.length} + + )} + +
{/* Search input */} @@ -230,31 +171,46 @@ export function DocumentsFilters({ - {/* Bulk Delete Button */} - {selectedIds.size > 0 && ( + {/* Search Input */} +
+
+
+ onSearch(e.target.value)} + placeholder="Search" + type="text" + aria-label={t("filter_placeholder")} + /> + {Boolean(searchValue) && ( + + )} +
+ + {/* Bulk Delete Button */} + {selectedIds.size > 0 && ( - - {/* Mobile: icon with count */} - - {/* Desktop: full button */} - - +
@@ -285,8 +241,18 @@ export function DocumentsFilters({ - )} -
+ )} + + {/* Upload Button */} +
); diff --git a/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx b/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx index d9038cf0f..616932475 100644 --- a/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/DocumentsSidebar.tsx @@ -1,7 +1,7 @@ "use client"; import { useAtomValue } from "jotai"; -import { ChevronLeft, SquareLibrary } from "lucide-react"; +import { ChevronLeft } from "lucide-react"; import { useParams } from "next/navigation"; import { useTranslations } from "next-intl"; import { useCallback, useEffect, useRef, useState } from "react"; @@ -307,7 +307,7 @@ export function DocumentsSidebar({ open, onOpenChange }: DocumentsSidebarProps) const documentsContent = ( <> -
+
{isMobile && ( @@ -321,7 +321,6 @@ export function DocumentsSidebar({ open, onOpenChange }: DocumentsSidebarProps) {tSidebar("close") || "Close"} )} -

{t("title") || "Documents"}