From a0e9b62de5df18bb8261be5b9dd2f86ff5dae3d5 Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 25 Nov 2024 12:21:37 +0800 Subject: [PATCH] Feat: Add TeamManagement component #3221 (#3626) ### What problem does this PR solve? Feat: Add TeamManagement component #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/pages/profile-setting/index.tsx | 6 +- .../pages/profile-setting/profile/index.tsx | 3 +- web/src/pages/profile-setting/team/index.tsx | 108 +++++++++++++++++- web/tailwind.config.js | 2 + 4 files changed, 112 insertions(+), 7 deletions(-) diff --git a/web/src/pages/profile-setting/index.tsx b/web/src/pages/profile-setting/index.tsx index bcae513305..55ad2053bf 100644 --- a/web/src/pages/profile-setting/index.tsx +++ b/web/src/pages/profile-setting/index.tsx @@ -1,11 +1,9 @@ import { Button } from '@/components/ui/button'; import { ArrowLeft } from 'lucide-react'; import { Outlet } from 'umi'; -import { useGetPageTitle } from './hooks'; import { SideBar } from './sidebar'; export default function ProfileSetting() { - const title = useGetPageTitle(); return (
@@ -24,9 +22,9 @@ export default function ProfileSetting() {
-
-

{title}

+
+ {/*

{title}

*/}
diff --git a/web/src/pages/profile-setting/profile/index.tsx b/web/src/pages/profile-setting/profile/index.tsx index 26bab91e8e..353d46e57c 100644 --- a/web/src/pages/profile-setting/profile/index.tsx +++ b/web/src/pages/profile-setting/profile/index.tsx @@ -11,7 +11,8 @@ import { export default function Profile() { return ( -
+
+

User profile

team; +import { Button } from '@/components/ui/button'; +import { Card } from '@/components/ui/card'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { Table, TableBody, TableCell, TableRow } from '@/components/ui/table'; +import { ChevronDown, MoreVertical, Plus, UserPlus } from 'lucide-react'; + +interface TeamMember { + email: string; + name: string; + role: string; } + +const TeamManagement = () => { + const teamMembers: TeamMember[] = [ + { email: 'yifanwu92@gmail.com', name: 'Yifan Wu', role: 'Admin' }, + { email: 'yifanwu92@gmail.com', name: 'Yifan Wu', role: 'Admin' }, + ]; + + const stats = { + project: 1, + token: '1,000', + storage: '1GB', + }; + + return ( +
+
+
+

Team management

+ +
+ +
+
+

Yifan's team

+ +
+ + +
+
+

Project

+

{stats.project}

+
+
+

Token

+

{stats.token}

+
+
+

Storage

+

{stats.storage}

+
+
+
+ + + + + {teamMembers.map((member, idx) => ( + + {member.email} + {member.name} + + + {member.role} + + + + + + + Edit + + Remove + + + + + + ))} + +
+ + +
+
+
+
+ ); +}; + +export default TeamManagement; diff --git a/web/tailwind.config.js b/web/tailwind.config.js index b37a574011..36c48d139a 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -29,6 +29,8 @@ module.exports = { 'colors-outline-sentiment-primary': 'var(--colors-outline-sentiment-primary)', + 'colors-text-core-standard': 'var(--colors-text-core-standard)', + primary: { DEFAULT: 'hsl(var(--primary))', foreground: 'hsl(var(--primary-foreground))',