From 09185c2a2ac4977f2c254f93a4ddd3d6482607fe Mon Sep 17 00:00:00 2001 From: Cosmo Date: Thu, 23 Apr 2026 08:36:56 +0000 Subject: [PATCH] fix(home): drop greeting date; fix touch scroll; tokenize TopBar icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removes the date label from the greeting row (user request — тoo dense on tablet and redundant with TopBar clock). - Scrolling: drops overflowY: auto on the inner Events/Notes cards and removes flex: 1 / minHeight: 0 from their grid. On iPad-class touch nested scroll containers fought the root scroll; now only the root scrolls, which the browser handles natively. - TopBar: replaces hardcoded rgba(255,255,255,X) on sensor icons, chip background, chip border and header bottom-border with semantic tokens (--text-tertiary, --surface-2, --border-subtle, --hairline) so the thermometer/humidity/wind icons are visible in light theme. --- app/page.tsx | 29 ++++++++++------------------- components/TopBar.tsx | 10 +++++----- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index d8b4f4e..7b1a90a 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -424,22 +424,13 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S padding: '18px 22px 24px', display: 'flex', flexDirection: 'column', gap: 14, }}> - {/* ───── Greeting row ───── */} -
-

- {greeting} 👋 -

-
- {new Date().toLocaleDateString('ru-RU', { weekday: 'long', day: 'numeric', month: 'long' })} -
-
+ {/* ───── Greeting ───── */} +

+ {greeting} 👋 +

{/* ───── Bento row: Hero weather + Tram ───── */}
@@ -577,10 +568,10 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S )} {/* ───── Events + Notes row ───── */} -
+
{/* Events — today + tomorrow in one card */} -
+
{/* Today */}
@@ -659,7 +650,7 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
{/* Notes */} -
+
Заметки diff --git a/components/TopBar.tsx b/components/TopBar.tsx index 3a8ef8f..a3464a9 100644 --- a/components/TopBar.tsx +++ b/components/TopBar.tsx @@ -44,7 +44,7 @@ export default function TopBar({ sensors, haConnected }: TopBarProps) { alignItems: 'center', justifyContent: 'space-between', padding: '0 24px', - borderBottom: '1px solid rgba(255,255,255,0.04)', + borderBottom: '1px solid var(--hairline)', background: 'transparent', flexShrink: 0, position: 'relative', @@ -82,17 +82,17 @@ export default function TopBar({ sensors, haConnected }: TopBarProps) {
- + {sensors.temperature}° - + {sensors.humidity}% - + {sensors.pm25}