feat: 完善全栈 Dashboard 项目 - UI优化、Docker支持、账单系统等

This commit is contained in:
LAMCLOD
2026-03-09 07:07:28 +08:00
parent f6036cab66
commit 55b6c67271
32 changed files with 1893 additions and 512 deletions

View File

@@ -19,24 +19,33 @@ interface Props {
}
const logTypeMap: Record<number, { color: string; label: string }> = {
1: { color: 'green', label: '充值' },
2: { color: 'blue', label: '消费' },
3: { color: 'orange', label: '管理' },
4: { color: 'purple', label: '系统' },
5: { color: 'red', label: '错误' },
6: { color: 'cyan', label: '退款' },
1: { color: '#7DB87D', label: '充值' },
2: { color: '#C8956C', label: '消费' },
3: { color: '#E8A850', label: '管理' },
4: { color: '#9B8EC2', label: '系统' },
5: { color: '#D4645C', label: '错误' },
6: { color: '#7BA4C8', label: '退款' },
}
export default function RecentLogs({ logs, loading }: Props) {
if (!loading && logs.length === 0) {
return <Card title={<><HistoryOutlined /> </>}><Empty description="暂无日志" /></Card>
return (
<Card title={<><HistoryOutlined style={{ color: '#C8956C' }} /> </>} className="stat-accent">
<Empty description="暂无日志" />
</Card>
)
}
return (
<Card title={<><HistoryOutlined /> </>} loading={loading} hoverable>
<Card
title={<><HistoryOutlined style={{ color: '#C8956C' }} /> </>}
loading={loading}
hoverable
className="stat-accent"
>
<Timeline
items={logs.slice(0, 10).map((log) => {
const typeInfo = logTypeMap[log.type] || { color: 'default', label: '未知' }
const typeInfo = logTypeMap[log.type] || { color: '#A69278', label: '未知' }
return {
color: typeInfo.color,
children: (