feat: 新增首页组件,展示账户概览、近期交易、支出趋势和预算统计。

This commit is contained in:
2026-01-29 09:51:22 +08:00
parent 573e665a1d
commit f1651147a4

View File

@@ -482,8 +482,7 @@ function Home() {
{streakInfo && streakInfo.currentStreak > 0 && ( {streakInfo && streakInfo.currentStreak > 0 && (
<div <div
className="streak-badge" className="streak-badge"
onClick={() => setShowContributionModal(true)} title={`最长连续: ${streakInfo.longestStreak}\n累计记账: ${streakInfo.totalRecordDays}`}
title={`最长连续: ${streakInfo.longestStreak}\n累计记账: ${streakInfo.totalRecordDays}\n点击查看详情`}
> >
<Icon icon="solar:heart-bold" width="16" className="streak-icon" /> <Icon icon="solar:heart-bold" width="16" className="streak-icon" />
<span className="streak-count">{streakInfo.currentStreak}</span> <span className="streak-count">{streakInfo.currentStreak}</span>
@@ -531,6 +530,11 @@ function Home() {
/> />
</div> </div>
{/* Contribution Heatmap */}
<div>
<ContributionHeatmap streakInfo={streakInfo} />
</div>
{/* Asset Dashboard - Requirement 8.1 */} {/* Asset Dashboard - Requirement 8.1 */}
<section className="dashboard-grid"> <section className="dashboard-grid">
{/* Net Worth Card - Main Hero */} {/* Net Worth Card - Main Hero */}
@@ -724,13 +728,6 @@ function Home() {
todaySpend={todaySpend} todaySpend={todaySpend}
yesterdaySpend={yesterdaySpend} yesterdaySpend={yesterdaySpend}
/> />
{/* Contribution Heatmap Modal */}
<ContributionModal
isOpen={showContributionModal}
onClose={() => setShowContributionModal(false)}
streakInfo={streakInfo}
/>
</div> </div>
); );
} }