diff --git a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsx index 7d266cafe..54fd490a1 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/page.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/react-query"; import { useAtomValue } from "jotai"; -import { RefreshCw, SquarePlus } from "lucide-react"; +import { RefreshCw, SquarePlus, Upload } from "lucide-react"; import { motion } from "motion/react"; import { useParams, useRouter } from "next/navigation"; import { useTranslations } from "next-intl"; @@ -10,6 +10,7 @@ import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react" import { toast } from "sonner"; import { deleteDocumentMutationAtom } from "@/atoms/documents/document-mutation.atoms"; import { documentTypeCountsAtom } from "@/atoms/documents/document-query.atoms"; +import { useDocumentUploadDialog } from "@/components/assistant-ui/document-upload-popup"; import { Button } from "@/components/ui/button"; import type { DocumentTypeEnum } from "@/contracts/types/document.types"; import { useLogsSummary } from "@/hooks/use-logs"; @@ -36,6 +37,7 @@ export default function DocumentsTable() { const params = useParams(); const router = useRouter(); const searchSpaceId = Number(params.search_space_id); + const { openDialog: openUploadDialog } = useDocumentUploadDialog(); const handleNewNote = useCallback(() => { router.push(`/dashboard/${searchSpaceId}/editor/new`); @@ -365,7 +367,11 @@ export default function DocumentsTable() {

{t("subtitle")}

- + diff --git a/surfsense_web/components/assistant-ui/document-upload-popup.tsx b/surfsense_web/components/assistant-ui/document-upload-popup.tsx index 6ac1ec979..453c6abde 100644 --- a/surfsense_web/components/assistant-ui/document-upload-popup.tsx +++ b/surfsense_web/components/assistant-ui/document-upload-popup.tsx @@ -86,7 +86,6 @@ const DocumentUploadPopupContent: FC<{ }> = ({ isOpen, onOpenChange }) => { const searchSpaceId = useAtomValue(activeSearchSpaceIdAtom); const router = useRouter(); - const [isAccordionExpanded, setIsAccordionExpanded] = useState(false); if (!searchSpaceId) return null; @@ -118,19 +117,16 @@ const DocumentUploadPopupContent: FC<{ {/* Scrollable Content */}
-
+
- {/* Bottom fade shadow - only show when scrolling */} - {isAccordionExpanded && ( -
- )} + {/* Bottom fade shadow */} +
diff --git a/surfsense_web/messages/en.json b/surfsense_web/messages/en.json index c0c579070..ae7f98843 100644 --- a/surfsense_web/messages/en.json +++ b/surfsense_web/messages/en.json @@ -319,6 +319,7 @@ "rows_per_page": "Rows per page", "refresh": "Refresh", "refresh_success": "Documents refreshed", + "upload_documents": "Upload Documents", "create_shared_note": "Create Shared Note", "processing_documents": "Processing documents...", "active_tasks_count": "{count} active task(s)" diff --git a/surfsense_web/messages/zh.json b/surfsense_web/messages/zh.json index f01ccda4b..1404c176f 100644 --- a/surfsense_web/messages/zh.json +++ b/surfsense_web/messages/zh.json @@ -315,6 +315,7 @@ "rows_per_page": "每页行数", "refresh": "刷新", "refresh_success": "文档已刷新", + "upload_documents": "上传文档", "create_shared_note": "创建共享笔记", "processing_documents": "正在处理文档...", "active_tasks_count": "{count} 个正在进行的工作项"