From b3f6a3aae6052656d08e417bec70a4dddf7ea4f2 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Fri, 7 Mar 2025 17:20:14 +0530 Subject: [PATCH] (fix:ui) mninor adjustments --- frontend/src/components/Dropdown.tsx | 6 +++-- .../src/conversation/ConversationBubble.tsx | 6 ++--- frontend/src/settings/Documents.tsx | 23 ++++++++++--------- frontend/src/upload/Upload.tsx | 8 +++---- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/Dropdown.tsx b/frontend/src/components/Dropdown.tsx index 5932933e..f8783aad 100644 --- a/frontend/src/components/Dropdown.tsx +++ b/frontend/src/components/Dropdown.tsx @@ -11,6 +11,7 @@ function Dropdown({ rounded = 'xl', border = 'border-2', borderColor = 'silver', + darkBorderColor = 'dim-gray', showEdit, onEdit, showDelete, @@ -38,6 +39,7 @@ function Dropdown({ rounded?: 'xl' | '3xl'; border?: 'border' | 'border-2'; borderColor?: string; + darkBorderColor?: string; showEdit?: boolean; onEdit?: (value: { name: string; id: string; type: string }) => void; showDelete?: boolean; @@ -77,7 +79,7 @@ function Dropdown({ > {isOpen && (
{options.map((option: any, index) => (
{ setEditInputBox(e.target.value); }} - onKeyDown={(e) => { - if(e.key === 'Enter' && !e.shiftKey){ - e.preventDefault(); + onKeyDown={(e) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); handleEditClick(); } }} diff --git a/frontend/src/settings/Documents.tsx b/frontend/src/settings/Documents.tsx index f5fa6dd0..c4a5086b 100644 --- a/frontend/src/settings/Documents.tsx +++ b/frontend/src/settings/Documents.tsx @@ -240,16 +240,6 @@ export default function Documents({ iconHeight: 18, variant: 'primary', }, - { - icon: Trash, - label: t('convTile.delete'), - onClick: () => { - handleDeleteConfirmation(index, document); - }, - iconWidth: 18, - iconHeight: 18, - variant: 'danger', - }, ]; if (document.syncFrequency) { @@ -269,6 +259,17 @@ export default function Documents({ }); } + actions.push({ + icon: Trash, + label: t('convTile.delete'), + onClick: () => { + handleDeleteConfirmation(index, document); + }, + iconWidth: 18, + iconHeight: 18, + variant: 'danger', + }); + return actions; }; useEffect(() => { @@ -310,7 +311,7 @@ export default function Documents({ />