From 7f42655d90ff8ab62156e99f8d90cd0c77489c0c Mon Sep 17 00:00:00 2001 From: 12975 <1297598740@qq.com> Date: Thu, 29 Jan 2026 00:19:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20DailyInsightCard?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=AF=8F=E6=97=A5=E6=B6=88=E8=B4=B9=E6=B4=9E=E5=AF=9F?= =?UTF-8?q?=E5=B9=B6=E9=9B=86=E6=88=90AI=E5=88=86=E6=9E=90=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DailyInsightCard/DailyInsightCard.css | 40 ------------------- .../DailyInsightCard/DailyInsightCard.tsx | 22 ---------- 2 files changed, 62 deletions(-) diff --git a/src/components/home/DailyInsightCard/DailyInsightCard.css b/src/components/home/DailyInsightCard/DailyInsightCard.css index 6aaf16a..5145a68 100644 --- a/src/components/home/DailyInsightCard/DailyInsightCard.css +++ b/src/components/home/DailyInsightCard/DailyInsightCard.css @@ -196,44 +196,4 @@ .daily-insight__tip svg { color: var(--color-primary); flex-shrink: 0; -} - -/* Trend Chart */ -.trend-chart { - display: flex; - align-items: flex-end; - justify-content: space-between; - height: 60px; - padding-top: 10px; - gap: 4px; -} - -.trend-bar-wrapper { - flex: 1; - height: 100%; - display: flex; - align-items: flex-end; - justify-content: center; -} - -.trend-bar { - width: 60%; - background: rgba(var(--color-text-rgb), 0.1); - border-radius: 4px; - transition: all 0.3s ease; - min-height: 4px; -} - -.trend-bar--today { - background: var(--color-primary); - box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.4); -} - -.trend-bar--max { - background: var(--color-warning, #F59E0B); -} - -/* If today is also max, give it a special gradient */ -.trend-bar--today.trend-bar--max { - background: linear-gradient(to top, var(--color-primary), var(--color-warning, #F59E0B)); } \ No newline at end of file diff --git a/src/components/home/DailyInsightCard/DailyInsightCard.tsx b/src/components/home/DailyInsightCard/DailyInsightCard.tsx index f1f1b61..67d595e 100644 --- a/src/components/home/DailyInsightCard/DailyInsightCard.tsx +++ b/src/components/home/DailyInsightCard/DailyInsightCard.tsx @@ -154,29 +154,7 @@ export const DailyInsightCard: React.FC = ({

{spendingInsight.text}

- {/* 7-Day Trend Chart */} - {last7DaysSpend && last7DaysSpend.length > 0 && ( -
- 近7天趋势 -
- {last7DaysSpend.map((amount, index) => { - const maxVal = Math.max(...last7DaysSpend, 1); - const heightPercent = Math.max((amount / maxVal) * 100, 10); // Min 10% height - const isToday = index === last7DaysSpend.length - 1; - const isMax = amount === maxVal && amount > 0; - return ( -
-
-
- ); - })} -
-
- )}