|
|
@ -1,5 +1,5 @@ |
|
|
import { useState, useEffect } from 'react' |
|
|
import { useState, useEffect } from 'react' |
|
|
import { Users, Zap, Activity, Database, Loader2 } from 'lucide-react' |
|
|
import { Users, Zap, Activity as ActivityIcon, Database, Loader2 } from 'lucide-react' |
|
|
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card' |
|
|
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card' |
|
|
import { apiClient } from '@/services/api' |
|
|
import { apiClient } from '@/services/api' |
|
|
import type { DashboardStats, Activity } from '@/types' |
|
|
import type { DashboardStats, Activity } from '@/types' |
|
|
@ -90,7 +90,7 @@ export function DashboardPage() { |
|
|
title: '活跃用户', |
|
|
title: '活跃用户', |
|
|
value: stats ? formatNumber(stats.activeUsers) : '-', |
|
|
value: stats ? formatNumber(stats.activeUsers) : '-', |
|
|
change: calculateGrowth(stats?.activeUsers || 0), |
|
|
change: calculateGrowth(stats?.activeUsers || 0), |
|
|
icon: Activity, |
|
|
icon: ActivityIcon, |
|
|
color: 'from-green-500 to-emerald-600', |
|
|
color: 'from-green-500 to-emerald-600', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
@ -230,7 +230,7 @@ export function DashboardPage() { |
|
|
{ label: '添加用户', icon: Users, action: 'users' }, |
|
|
{ label: '添加用户', icon: Users, action: 'users' }, |
|
|
{ label: '系统设置', icon: Zap, action: 'settings' }, |
|
|
{ label: '系统设置', icon: Zap, action: 'settings' }, |
|
|
{ label: '数据备份', icon: Database, action: 'backup' }, |
|
|
{ label: '数据备份', icon: Database, action: 'backup' }, |
|
|
{ label: '查看日志', icon: Activity, action: 'logs' }, |
|
|
{ label: '查看日志', icon: ActivityIcon, action: 'logs' }, |
|
|
].map((item, index) => ( |
|
|
].map((item, index) => ( |
|
|
<button |
|
|
<button |
|
|
key={index} |
|
|
key={index} |
|
|
|