From 5580d19b75f8d0c255883d608f42a58cda604a9a Mon Sep 17 00:00:00 2001 From: AkashJana18 Date: Tue, 22 Oct 2024 20:41:18 +0530 Subject: [PATCH] table redesign --- frontend/src/assets/caret-sort.svg | 1 + frontend/src/index.css | 10 ++++---- frontend/src/settings/Documents.tsx | 37 ++++++++++++++++++++++------- 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 frontend/src/assets/caret-sort.svg diff --git a/frontend/src/assets/caret-sort.svg b/frontend/src/assets/caret-sort.svg new file mode 100644 index 00000000..9380120d --- /dev/null +++ b/frontend/src/assets/caret-sort.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/index.css b/frontend/src/index.css index 5bcc7683..1eca983c 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -53,22 +53,24 @@ body.dark { } .table-default th { - @apply border-r border-silver dark:border-silver/40 p-4 w-[244px]; + @apply p-4 w-[244px] font-normal text-gray-400; /* Remove border-r */ } .table-default th:last-child { - @apply w-[auto] border-r-0; + @apply w-[auto]; } .table-default td { - @apply border-r border-t border-silver dark:border-silver/40 px-4 py-2; + @apply border-t border-silver dark:border-silver/40 px-4 py-2; /* Remove border-r */ } .table-default td:last-child { - @apply border-r-0; + @apply border-r-0; /* Ensure no right border on the last column */ } + } + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ /* Document diff --git a/frontend/src/settings/Documents.tsx b/frontend/src/settings/Documents.tsx index b2ac3f83..67cdb6d0 100644 --- a/frontend/src/settings/Documents.tsx +++ b/frontend/src/settings/Documents.tsx @@ -6,6 +6,7 @@ import { useDispatch } from 'react-redux'; import userService from '../api/services/userService'; import SyncIcon from '../assets/sync.svg'; import Trash from '../assets/trash.svg'; +import caretSort from '../assets/caret-sort.svg'; import DropdownMenu from '../components/DropdownMenu'; import { Doc, DocumentsProps, ActiveState } from '../models/misc'; // Ensure ActiveState type is imported import { getDocs } from '../preferences/preferenceApi'; @@ -97,9 +98,24 @@ const Documents: React.FC = ({ {t('settings.documents.name')} - {t('settings.documents.date')} - {t('settings.documents.tokenUsage')} - {t('settings.documents.type')} + +
+ {t('settings.documents.date')}{' '} + {' '} +
+ + +
+ {t('settings.documents.tokenUsage')}{' '} + +
+ + +
+ {t('settings.documents.type')}{' '} + +
+ @@ -158,11 +174,16 @@ const Documents: React.FC = ({ {/* Conditionally render the Upload modal based on modalState */} {modalState === 'ACTIVE' && ( - +
+
+ {/* Your Upload component */} + +
+
)}