From 551130f0e19c983440fc3b0f74fbc07f6379362b Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Tue, 25 Mar 2025 03:22:21 +0530 Subject: [PATCH] (feat:sources/tools) ui perfection for pop-ups --- frontend/src/components/SourcesPopup.tsx | 46 ++++++++------- frontend/src/components/ToolsPopup.tsx | 71 ++++++++++++++++-------- 2 files changed, 75 insertions(+), 42 deletions(-) diff --git a/frontend/src/components/SourcesPopup.tsx b/frontend/src/components/SourcesPopup.tsx index 4f838a4e..611b7c81 100644 --- a/frontend/src/components/SourcesPopup.tsx +++ b/frontend/src/components/SourcesPopup.tsx @@ -94,9 +94,9 @@ export default function SourcesPopup({
-
+

{t('conversation.sources.text')}

@@ -114,7 +114,11 @@ export default function SourcesPopup({ />
-
+
{options ? ( <> {filteredOptions?.map((option: any, index: number) => { @@ -133,18 +137,20 @@ export default function SourcesPopup({ src={SourceIcon} alt="Source" width={14} height={14} - className="mr-3" + className="mr-3 flex-shrink-0" /> - + {option.name} - {selectedDocs && selectedDocs.id === option.id && ( - Selected - )} +
+ {selectedDocs && selectedDocs.id === option.id && ( + Selected + )} +
); } @@ -154,13 +160,15 @@ export default function SourcesPopup({ className="flex cursor-pointer items-center p-3 hover:bg-gray-100 dark:hover:bg-[#2C2E3C] transition-colors border-b border-[#D9D9D9] dark:border-dim-gray border-opacity-80 dark:text-[14px]" onClick={handleEmptyDocumentSelect} > - Source - + Source + {t('none')} - {selectedDocs === null && ( - Selected - )} +
+ {selectedDocs === null && ( + Selected + )} +
) : ( @@ -170,7 +178,7 @@ export default function SourcesPopup({ )}
-
+
-
+