From ee37ee3d28fbef241f34d6d9101bcd50b1952b61 Mon Sep 17 00:00:00 2001 From: balibabu Date: Wed, 27 Nov 2024 09:31:08 +0800 Subject: [PATCH] Feat: Add Datasets page #3221 (#3661) ### What problem does this PR solve? Feat: Add Datasets page #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/pages/datasets/index.tsx | 138 +++++++++++++++++++++++++++++++ web/src/routes.ts | 5 ++ 2 files changed, 143 insertions(+) create mode 100644 web/src/pages/datasets/index.tsx diff --git a/web/src/pages/datasets/index.tsx b/web/src/pages/datasets/index.tsx new file mode 100644 index 000000000..558243aea --- /dev/null +++ b/web/src/pages/datasets/index.tsx @@ -0,0 +1,138 @@ +import { Button } from '@/components/ui/button'; +import { Card, CardContent } from '@/components/ui/card'; +import { + ChevronRight, + Filter, + MoreHorizontal, + Plus, + Search, +} from 'lucide-react'; + +const datasets = [ + { + id: 1, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 2, + title: 'HR knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 3, + title: 'IT knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 4, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 5, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 6, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 7, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 8, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, + { + id: 9, + title: 'Legal knowledge base', + files: '1,242 files', + size: '152 MB', + created: '12.02.2024', + image: 'https://github.com/shadcn.png', + }, +]; + +export default function Datasets() { + return ( +
+
+ Datasets +
+ + + +
+
+
+ {datasets.map((dataset) => ( + + +
+
+ +
+
+
+

+ {dataset.title} +

+

+ {dataset.files} | {dataset.size} +

+

+ Created {dataset.created} +

+
+ +
+ + + ))} +
+
+ ); +} diff --git a/web/src/routes.ts b/web/src/routes.ts index ed8243e0f..b7d68168b 100644 --- a/web/src/routes.ts +++ b/web/src/routes.ts @@ -131,6 +131,11 @@ const routes = [ layout: false, component: '@/pages/home', }, + { + path: '/datasets', + layout: false, + component: '@/pages/datasets', + }, { path: '/profile-setting', layout: false,