feat: 新增首页组件,展示账户概览、近期交易、支出趋势和预算统计。
This commit is contained in:
@@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user