Skip to content

Commit b3f6a3a

Browse files
(fix:ui) mninor adjustments
1 parent 7731477 commit b3f6a3a

File tree

4 files changed

+23
-20
lines changed

4 files changed

+23
-20
lines changed

frontend/src/components/Dropdown.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function Dropdown({
1111
rounded = 'xl',
1212
border = 'border-2',
1313
borderColor = 'silver',
14+
darkBorderColor = 'dim-gray',
1415
showEdit,
1516
onEdit,
1617
showDelete,
@@ -38,6 +39,7 @@ function Dropdown({
3839
rounded?: 'xl' | '3xl';
3940
border?: 'border' | 'border-2';
4041
borderColor?: string;
42+
darkBorderColor?: string;
4143
showEdit?: boolean;
4244
onEdit?: (value: { name: string; id: string; type: string }) => void;
4345
showDelete?: boolean;
@@ -77,7 +79,7 @@ function Dropdown({
7779
>
7880
<button
7981
onClick={() => setIsOpen(!isOpen)}
80-
className={`flex w-full cursor-pointer items-center justify-between ${border} border-${borderColor} bg-white px-5 py-3 dark:border-${borderColor}/40 dark:bg-transparent ${
82+
className={`flex w-full cursor-pointer items-center justify-between ${border} border-${borderColor} bg-white px-5 py-3 dark:border-${darkBorderColor} dark:bg-transparent ${
8183
isOpen ? `${borderTopRadius}` : `${borderRadius}`
8284
}`}
8385
>
@@ -114,7 +116,7 @@ function Dropdown({
114116
</button>
115117
{isOpen && (
116118
<div
117-
className={`absolute left-0 right-0 z-20 -mt-1 max-h-40 overflow-y-auto rounded-b-xl ${border} border-${borderColor} bg-white shadow-lg dark:border-${borderColor}/40 dark:bg-dark-charcoal`}
119+
className={`absolute left-0 right-0 z-20 -mt-1 max-h-40 overflow-y-auto rounded-b-xl ${border} border-${borderColor} bg-white shadow-lg dark:border-${darkBorderColor} dark:bg-dark-charcoal`}
118120
>
119121
{options.map((option: any, index) => (
120122
<div

frontend/src/conversation/ConversationBubble.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ const ConversationBubble = forwardRef<
143143
onChange={(e) => {
144144
setEditInputBox(e.target.value);
145145
}}
146-
onKeyDown={(e) => {
147-
if(e.key === 'Enter' && !e.shiftKey){
148-
e.preventDefault();
146+
onKeyDown={(e) => {
147+
if (e.key === 'Enter' && !e.shiftKey) {
148+
e.preventDefault();
149149
handleEditClick();
150150
}
151151
}}

frontend/src/settings/Documents.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,6 @@ export default function Documents({
240240
iconHeight: 18,
241241
variant: 'primary',
242242
},
243-
{
244-
icon: Trash,
245-
label: t('convTile.delete'),
246-
onClick: () => {
247-
handleDeleteConfirmation(index, document);
248-
},
249-
iconWidth: 18,
250-
iconHeight: 18,
251-
variant: 'danger',
252-
},
253243
];
254244

255245
if (document.syncFrequency) {
@@ -269,6 +259,17 @@ export default function Documents({
269259
});
270260
}
271261

262+
actions.push({
263+
icon: Trash,
264+
label: t('convTile.delete'),
265+
onClick: () => {
266+
handleDeleteConfirmation(index, document);
267+
},
268+
iconWidth: 18,
269+
iconHeight: 18,
270+
variant: 'danger',
271+
});
272+
272273
return actions;
273274
};
274275
useEffect(() => {
@@ -310,7 +311,7 @@ export default function Documents({
310311
/>
311312
</div>
312313
<button
313-
className="rounded-full w-full sm:w-40 bg-purple-30 px-4 py-3 text-white hover:bg-[#6F3FD1]"
314+
className="rounded-full w-[108px] h-[32px] text-sm bg-purple-30 text-white hover:bg-[#6F3FD1] flex items-center justify-center"
314315
title={t('settings.documents.addNew')}
315316
onClick={() => {
316317
setIsOnboarding(false);

frontend/src/upload/Upload.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ function Upload({
9999
)
100100
}
101101
borderVariant="thin"
102-
label={field.label}
103102
required={isRequired}
104103
colorVariant="silver"
104+
labelBgClassName="bg-white dark:bg-charleston-green-2"
105105
/>
106106
);
107107
case 'number':
@@ -121,9 +121,9 @@ function Upload({
121121
)
122122
}
123123
borderVariant="thin"
124-
label={field.label}
125124
required={isRequired}
126125
colorVariant="silver"
126+
labelBgClassName="bg-white dark:bg-charleston-green-2"
127127
/>
128128
);
129129
case 'enum':
@@ -609,7 +609,7 @@ function Upload({
609609
onChange={(e) => setDocName(e.target.value)}
610610
borderVariant="thin"
611611
placeholder={t('modals.uploadDoc.name')}
612-
label={t('modals.uploadDoc.name')}
612+
labelBgClassName="bg-white dark:bg-charleston-green-2"
613613
required={true}
614614
/>
615615
<div className="my-2" {...getRootProps()}>
@@ -668,8 +668,8 @@ function Upload({
668668
onChange={(e) => setRemoteName(e.target.value)}
669669
borderVariant="thin"
670670
placeholder="Name"
671-
label="Name"
672671
required={true}
672+
labelBgClassName="bg-white dark:bg-charleston-green-2"
673673
/>
674674
{renderFormFields()}
675675
{IngestorFormSchemas[ingestor.type].some(

0 commit comments

Comments
 (0)