fix: 4 bugs — MSK today events, settings scroll, note dates, persistent notes volume
All checks were successful
Deploy / deploy (push) Successful in 4m35s

- calendar API: today/week ranges use Moscow time (UTC+3) instead of UTC — previously today events did not appear until 03:00 MSK
- settings tab: add -webkit-overflow-scrolling: touch + touchAction pan-y for tablet scroll
- NotesTab: add date picker (pinDate) in editor header + date badge in list
- home: pinnedNotes now filters by pinDate (today or future), falls back to latest
- notes/auth: storage moved from /tmp to /data (falls back to /tmp if /data missing)
- deploy workflow: mount /opt/digital-home/smart-home-tablet-data:/data so notes survive redeploys
This commit is contained in:
Cosmo
2026-04-23 06:13:16 +00:00
parent 3a93d5bbea
commit b0fb9d0c54
6 changed files with 97 additions and 32 deletions

View File

@@ -394,10 +394,19 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
})
.catch(() => {})
// Notes
// Notes — pinned (pinDate today or future), fallback to latest
fetch('/api/notes')
.then(r => r.json())
.then(d => setPinnedNotes((d.notes || []).slice(0, 3)))
.then(d => {
const all = d.notes || []
const today = new Date(); today.setHours(0, 0, 0, 0)
const pinned = all.filter((n: any) => {
if (!n.pinDate) return false
const pd = new Date(n.pinDate); pd.setHours(0, 0, 0, 0)
return pd.getTime() >= today.getTime()
})
setPinnedNotes((pinned.length ? pinned : all).slice(0, 3))
})
.catch(() => {})
}, [])
@@ -650,7 +659,7 @@ function SettingsTab({ city, onCityChange, onLogout, theme, onThemeChange }: { c
const currentCity = CITIES.find(c => c.id === city) || CITIES[0]
return (
<div style={{ flex: 1, overflowY: 'auto', padding: '24px', display: 'flex', flexDirection: 'column', gap: 16, maxWidth: 560, margin: '0 auto', width: '100%' }}>
<div style={{ flex: 1, overflowY: 'auto', WebkitOverflowScrolling: 'touch' as any, touchAction: 'pan-y', padding: '24px', display: 'flex', flexDirection: 'column', gap: 16, maxWidth: 560, margin: '0 auto', width: '100%' }}>
<h2 style={{ fontSize: 24, fontWeight: 800, color: 'var(--text-primary)', margin: '0 0 8px', letterSpacing: '-0.5px' }}>Настройки</h2>
{/* City selector */}