mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-07-26 10:04:27 +08:00
### What problem does this PR solve? Feat: Add TeamManagement component #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
7874aaaf60
commit
a0e9b62de5
@ -1,11 +1,9 @@
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { ArrowLeft } from 'lucide-react';
|
import { ArrowLeft } from 'lucide-react';
|
||||||
import { Outlet } from 'umi';
|
import { Outlet } from 'umi';
|
||||||
import { useGetPageTitle } from './hooks';
|
|
||||||
import { SideBar } from './sidebar';
|
import { SideBar } from './sidebar';
|
||||||
|
|
||||||
export default function ProfileSetting() {
|
export default function ProfileSetting() {
|
||||||
const title = useGetPageTitle();
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full h-screen bg-background text-foreground">
|
<div className="flex flex-col w-full h-screen bg-background text-foreground">
|
||||||
<header className="flex items-center border-b">
|
<header className="flex items-center border-b">
|
||||||
@ -24,9 +22,9 @@ export default function ProfileSetting() {
|
|||||||
<div className="flex flex-1 bg-muted/50">
|
<div className="flex flex-1 bg-muted/50">
|
||||||
<SideBar></SideBar>
|
<SideBar></SideBar>
|
||||||
|
|
||||||
<main className="flex-1 p-10">
|
<main className="flex-1 ">
|
||||||
<h1 className="text-3xl font-bold mb-6"> {title}</h1>
|
|
||||||
<Outlet></Outlet>
|
<Outlet></Outlet>
|
||||||
|
{/* <h1 className="text-3xl font-bold mb-6"> {title}</h1> */}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,8 @@ import {
|
|||||||
|
|
||||||
export default function Profile() {
|
export default function Profile() {
|
||||||
return (
|
return (
|
||||||
<section>
|
<section className="p-8">
|
||||||
|
<h1 className="text-3xl font-bold mb-6">User profile</h1>
|
||||||
<Avatar className="w-[120px] h-[120px] mb-6">
|
<Avatar className="w-[120px] h-[120px] mb-6">
|
||||||
<AvatarImage
|
<AvatarImage
|
||||||
src={
|
src={
|
||||||
|
@ -1,3 +1,107 @@
|
|||||||
export default function Team() {
|
import { Button } from '@/components/ui/button';
|
||||||
return <div>team</div>;
|
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 (
|
||||||
|
<div className="min-h-screen text-white p-8 ">
|
||||||
|
<div className="max-w-6xl mx-auto">
|
||||||
|
<div className="flex justify-between items-center mb-8">
|
||||||
|
<h1 className="text-4xl font-bold">Team management</h1>
|
||||||
|
<Button className="hover:bg-[#6B4FD8] text-white bg-colors-background-core-standard">
|
||||||
|
<Plus className="mr-2 h-4 w-4" />
|
||||||
|
Create team
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mb-8">
|
||||||
|
<div className="flex justify-between items-center mb-4">
|
||||||
|
<h2 className="text-2xl font-semibold">Yifan's team</h2>
|
||||||
|
<Button variant="secondary" size="icon">
|
||||||
|
<ChevronDown className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Card className="border-0 p-6 mb-6 bg-colors-background-inverse-weak">
|
||||||
|
<div className="grid grid-cols-3 gap-8">
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-gray-400 mb-2">Project</p>
|
||||||
|
<p className="text-2xl font-semibold">{stats.project}</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-gray-400 mb-2">Token</p>
|
||||||
|
<p className="text-2xl font-semibold">{stats.token}</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p className="text-sm text-gray-400 mb-2">Storage</p>
|
||||||
|
<p className="text-2xl font-semibold">{stats.storage}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card className="border-0 p-6 bg-colors-background-inverse-weak">
|
||||||
|
<Table>
|
||||||
|
<TableBody>
|
||||||
|
{teamMembers.map((member, idx) => (
|
||||||
|
<TableRow key={idx}>
|
||||||
|
<TableCell>{member.email}</TableCell>
|
||||||
|
<TableCell>{member.name}</TableCell>
|
||||||
|
<TableCell className="flex items-center justify-end">
|
||||||
|
<span className="text-colors-text-core-standard">
|
||||||
|
{member.role}
|
||||||
|
</span>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button variant="ghost" size="icon">
|
||||||
|
<MoreVertical className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem className="text-red-600">
|
||||||
|
Remove
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
))}
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
|
||||||
|
<Button variant="outline" className="mt-6 ">
|
||||||
|
<UserPlus className="mr-2 h-4 w-4" />
|
||||||
|
Invite member
|
||||||
|
</Button>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TeamManagement;
|
||||||
|
@ -29,6 +29,8 @@ module.exports = {
|
|||||||
'colors-outline-sentiment-primary':
|
'colors-outline-sentiment-primary':
|
||||||
'var(--colors-outline-sentiment-primary)',
|
'var(--colors-outline-sentiment-primary)',
|
||||||
|
|
||||||
|
'colors-text-core-standard': 'var(--colors-text-core-standard)',
|
||||||
|
|
||||||
primary: {
|
primary: {
|
||||||
DEFAULT: 'hsl(var(--primary))',
|
DEFAULT: 'hsl(var(--primary))',
|
||||||
foreground: 'hsl(var(--primary-foreground))',
|
foreground: 'hsl(var(--primary-foreground))',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user