@@ -4,13 +4,16 @@ import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "./ui/
44import { Users , MessageSquare , Zap , Activity , TrendingUp , ArrowUpRight , ArrowDownRight } from "lucide-react" ;
55import { motion } from "framer-motion" ;
66import OverviewCharts from "./OverviewCharts" ;
7+ import { Badge } from "./ui/badge" ;
8+ import { CheckCircle , XCircle } from "lucide-react" ;
79
810interface OverviewSettingsProps {
911 guildId : string | null ;
1012 initialStats ?: any ;
13+ settings ?: any ;
1114}
1215
13- export default function OverviewSettings ( { guildId, initialStats } : OverviewSettingsProps ) {
16+ export default function OverviewSettings ( { guildId, initialStats, settings } : OverviewSettingsProps ) {
1417 const [ stats , setStats ] = useState < any > ( initialStats || null ) ;
1518 const [ loading , setLoading ] = useState ( ! initialStats ) ;
1619
@@ -121,31 +124,79 @@ export default function OverviewSettings({ guildId, initialStats }: OverviewSett
121124 />
122125 </ div >
123126
124- < div className = "grid grid-cols-1 lg:grid-cols-2 gap-6" >
125- < Card className = "bg-white/[0.03] border-white/5 backdrop-blur-xl rounded-[32px] overflow-hidden" >
126- < CardHeader >
127- < CardTitle className = "flex items-center gap-2" >
128- < Activity className = "w-5 h-5 text-primary" /> Nachrichten Volumen
129- </ CardTitle >
130- < CardDescription > Aktivität der letzten 7 Tage</ CardDescription >
127+ < div className = "grid grid-cols-1 lg:grid-cols-3 gap-6" >
128+ { /* Bot Health & Activity Summary */ }
129+ < Card className = "lg:col-span-2 glass border-white/10 shadow-2xl rounded-[2.5rem] overflow-hidden" >
130+ < CardHeader className = "flex flex-row items-center justify-between" >
131+ < div className = "space-y-1" >
132+ < CardTitle className = "flex items-center gap-2" >
133+ < Activity className = "w-5 h-5 text-primary" /> Command Center
134+ </ CardTitle >
135+ < CardDescription > Live-Metriken deiner Server-Instanz</ CardDescription >
136+ </ div >
137+ < Badge variant = "outline" className = "bg-primary/10 text-primary border-primary/20 px-3 py-1" >
138+ Live updates
139+ </ Badge >
131140 </ CardHeader >
132141 < CardContent >
133- < OverviewCharts data = { messageData } type = "messages" color = "#3B82F6" />
142+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-8" >
143+ < div className = "space-y-6" >
144+ < div className = "p-5 rounded-3xl bg-white/5 border border-white/10" >
145+ < OverviewCharts data = { messageData } type = "messages" color = "#DC2626" height = { 180 } />
146+ < p className = "text-center text-[10px] font-bold uppercase tracking-widest text-muted-foreground mt-4" > Nachrichten Volumen (7 Tage)</ p >
147+ </ div >
148+ </ div >
149+ < div className = "grid grid-cols-2 gap-4" >
150+ < QuickStat title = "Server Age" value = "238d" />
151+ < QuickStat title = "Avg Activity" value = "High" />
152+ < QuickStat title = "Staff Count" value = "12" />
153+ < QuickStat title = "Uptime" value = "99.9%" />
154+ </ div >
155+ </ div >
134156 </ CardContent >
135157 </ Card >
136158
137- < Card className = "bg-white/[0.03] border-white/5 backdrop-blur-xl rounded-[32px] overflow-hidden" >
159+ { /* Module Status Sidebar */ }
160+ < Card className = "glass border-white/10 shadow-2xl rounded-[2.5rem] overflow-hidden" >
138161 < CardHeader >
139- < CardTitle className = "flex items-center gap-2" >
140- < Users className = "w-5 h-5 text-emerald-400" /> Mitglieder Wachstum
141- </ CardTitle >
142- < CardDescription > Wachstumstrend der Woche</ CardDescription >
162+ < CardTitle className = "text-xl font-bold" > Module Status</ CardTitle >
163+ < CardDescription > Aktive Bot-Funktionen</ CardDescription >
143164 </ CardHeader >
144- < CardContent >
145- < OverviewCharts data = { memberData } type = "members" color = "#10B981" />
165+ < CardContent className = "space-y-3" >
166+ < ModuleRow name = "Level System" active = { true } />
167+ < ModuleRow name = "Anti-Spam AI" active = { true } />
168+ < ModuleRow name = "Welcome Suite" active = { settings ?. welcome_message ?? false } />
169+ < ModuleRow name = "Global Network" active = { true } />
170+ < ModuleRow name = "Auto-Mod" active = { settings ?. auto_mod ?? true } />
171+ < ModuleRow name = "Logging" active = { true } />
172+ < ModuleRow name = "Economy" active = { false } />
146173 </ CardContent >
147174 </ Card >
148175 </ div >
149176 </ div >
150177 ) ;
151178}
179+
180+ const QuickStat = ( { title, value } : { title : string , value : string } ) => (
181+ < div className = "p-4 rounded-2xl bg-white/5 border border-white/5 flex flex-col justify-center" >
182+ < span className = "text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-1" > { title } </ span >
183+ < span className = "text-lg font-black text-white" > { value } </ span >
184+ </ div >
185+ ) ;
186+
187+ const ModuleRow = ( { name, active } : { name : string , active : boolean } ) => (
188+ < div className = "flex items-center justify-between p-3 rounded-xl bg-white/5 border border-white/5 group hover:bg-white/10 transition-all" >
189+ < span className = "text-sm font-bold text-white/80" > { name } </ span >
190+ { active ? (
191+ < div className = "flex items-center gap-1.5 text-emerald-500 bg-emerald-500/10 px-2 py-0.5 rounded-full border border-emerald-500/20" >
192+ < CheckCircle className = "w-3 h-3" />
193+ < span className = "text-[9px] font-black uppercase tracking-widest" > Active</ span >
194+ </ div >
195+ ) : (
196+ < div className = "flex items-center gap-1.5 text-rose-500 bg-rose-500/10 px-2 py-0.5 rounded-full border border-rose-500/20" >
197+ < XCircle className = "w-3 h-3" />
198+ < span className = "text-[9px] font-black uppercase tracking-widest" > Disabled</ span >
199+ </ div >
200+ ) }
201+ </ div >
202+ ) ;
0 commit comments