feat(home): tram arrival widget for Ул. Антонова-Овсеенко
All checks were successful
Deploy / deploy (push) Successful in 3m10s
All checks were successful
Deploy / deploy (push) Successful in 3m10s
Adds a live transit widget on the home screen showing upcoming trams
at both directions of the stop: toward Новочеркасская (stopID 16226)
and toward пр. Большевиков (stopID 16354).
- /api/transport proxies the СПб ORGP endpoint /stop/{id}/arriving
(DataTables POST format, JSON response with route number + minutes).
No auth required, free.
- TransportWidget renders two glassmorphism cards with route badges,
minutes-to-arrival, wheelchair indicator; imminent (<=2 min) arrivals
get a colored highlight. Filters to trams 23/27/39; refreshes every 30s.
- Route colors: 23 blue, 27 amber, 39 purple.
This commit is contained in:
@@ -9,6 +9,7 @@ import RoomTabs from '@/components/RoomTabs'
|
||||
import DeviceCard from '@/components/DeviceCard'
|
||||
import CalendarTab from '@/components/CalendarTab'
|
||||
import NotesTab from '@/components/NotesTab'
|
||||
import TransportWidget from '@/components/TransportWidget'
|
||||
import WeatherAnimation from '@/components/WeatherAnimation'
|
||||
|
||||
type Tab = 'home' | 'devices' | 'calendar' | 'notes' | 'settings'
|
||||
@@ -502,6 +503,9 @@ function HomeTab({ weather, sensors }: { weather: WeatherData | null; sensors: S
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Transport: tram arrivals at Ул. Антонова-Овсеенко, both directions */}
|
||||
<TransportWidget />
|
||||
|
||||
{/* Two columns: Events + Notes */}
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 14, flex: 1, minHeight: 0 }}>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user