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