import { useState } from "react"; import { useNavigate } from "react-router-dom"; import Layout from "@/components/Layout"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle, CardDescription, } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Badge } from "@/components/ui/badge"; import { Alert, AlertDescription } from "@/components/ui/alert"; import { Shield, Users, Settings, Key, BarChart3, AlertTriangle, ExternalLink, } from "lucide-react"; export default function StaffAdmin() { const navigate = useNavigate(); const [activeTab, setActiveTab] = useState("users"); const [newApiKey, setNewApiKey] = useState(""); const [apiKeys] = useState([ { id: 1, name: "Discord Integration", key: "aethex_sk_****...****", created: "2024-01-15", lastUsed: "2024-01-20", }, { id: 2, name: "Analytics", key: "aethex_sk_****...****", created: "2024-01-10", lastUsed: "2024-01-21", }, ]); return (
{/* Header */}

Administration

System configuration and management

{/* Tabs */} Users Permissions Settings API Keys Audit Log {/* Users Tab */} This interface allows management of AeThex users

Total Users

All registered accounts

2,487

Active Users

Signed in this week

1,234

New This Month

Recent sign-ups

287

{/* Permissions Tab */}

Owner

Full system access

2 members

Admin

Management access

5 members

Editor

Edit content

12 members
{/* Settings Tab */}
System Settings

Enable to restrict access during updates

{/* API Keys Tab */}
setNewApiKey(e.target.value)} />

Active Keys

{apiKeys.map((key) => (

{key.name}

{key.key}

Created: {key.created} | Last used:{" "} {key.lastUsed}

))}
{/* Audit Log Tab */}
{[ { action: "User created", details: "john.doe@example.com", time: "2 hours ago", user: "admin", }, { action: "Settings updated", details: "Discord integration enabled", time: "5 hours ago", user: "admin", }, { action: "API key generated", details: "Analytics key created", time: "1 day ago", user: "operations", }, ].map((log, i) => (

{log.action}

{log.details}

{log.time}

{log.user}
))}
); }