From 5068a6b4f392301a728f59f8c26fdf4679c6fc0c Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:52:59 +0530 Subject: [PATCH] style: update button variant and improve drag-and-drop UI in DocumentUploadTab --- .../components/sources/DocumentUploadTab.tsx | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/surfsense_web/components/sources/DocumentUploadTab.tsx b/surfsense_web/components/sources/DocumentUploadTab.tsx index 2d70a4e1a..0bf842b6d 100644 --- a/surfsense_web/components/sources/DocumentUploadTab.tsx +++ b/surfsense_web/components/sources/DocumentUploadTab.tsx @@ -401,15 +401,19 @@ export function DocumentUploadTab({ e.stopPropagation()}> - e.stopPropagation()}> + e.stopPropagation()} + > fileInputRef.current?.click()}> {t("browse_files")} @@ -492,17 +496,20 @@ export function DocumentUploadTab({ {renderBrowseButton({ compact: true })} - ) : isDragActive ? ( -
- -

{t("drop_files")}

-
) : ( -
- -

{t("drag_drop")}

-

{t("file_size_limit")}

-
{renderBrowseButton()}
+
+ {isDragActive && ( +
+ +

{t("drop_files")}

+
+ )} +
+ +

{t("drag_drop")}

+

{t("file_size_limit")}

+
{renderBrowseButton()}
+
)}