'use client'; import { Paper, Grid, Box, Typography, useMediaQuery, Avatar } from '@mui/material'; import { styles } from '@/styles/home'; import { useTheme } from '@mui/material'; import { motion } from 'framer-motion'; import FolderOpenIcon from '@mui/icons-material/FolderOpen'; import QuestionAnswerIcon from '@mui/icons-material/QuestionAnswer'; import StorageIcon from '@mui/icons-material/Storage'; import MemoryIcon from '@mui/icons-material/Memory'; // 默认模型列表 const mockModels = [ { id: 'deepseek-r1', provider: 'Ollama', name: 'DeepSeek-R1' }, { id: 'gpt-3.5-turbo-openai', provider: 'OpenAI', name: 'gpt-3.5-turbo' }, { id: 'gpt-3.5-turbo-guiji', provider: 'Guiji', name: 'gpt-3.5-turbo' }, { id: 'glm-4-flash', provider: 'Zhipu AI', name: 'GLM-4-Flash' } ]; export default function StatsCard({ projects }) { const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('sm')); // 统计卡片数据 const statsItems = [ { value: projects.length, label: t('stats.ongoingProjects'), color: 'primary', icon: }, { value: projects.reduce((sum, project) => sum + (project.questionsCount || 0), 0), label: t('stats.questionCount'), color: 'secondary', icon: }, { value: projects.reduce((sum, project) => sum + (project.datasetsCount || 0), 0), label: t('stats.generatedDatasets'), color: 'success', icon: }, { value: mockModels.length, label: t('stats.supportedModels'), color: 'warning', icon: } ]; return ( {statsItems.map((item, index) => ( {item.icon} {item.value} {item.label} ))} ); }