Commit graph

16 commits

Author SHA1 Message Date
791f261fc7 Brought back current station 2026-08-24 01:24:50 -04:00
dd50d7cd4a Add timezone-aware station lookup and formatting
These changes ensure displayed times respect the station's timezone. Something I mistakenly overlooked when creating this.

Luckily, my screenshot with Ashland isn't affected by this change.
2026-08-24 01:00:47 -04:00
921e23424f Woops! Fixed to and from's values 2026-08-23 21:52:08 -04:00
c74e6166bf Fix status text contrast on green rows
Green status rows used white text, which was difficult to read against the green background. This change selects a contrasting text color based on the status color so green rows use black text and other statuses keep white text for better legibility in the status table.
2026-08-23 21:46:15 -04:00
915d0ec2dc Train status is now coloured coded for your convenience
- Introduced TrainLateness enum to represent on-time, early, late (with minutes), and unknown states, including description text, color, and formatting logic.
- Replaced TrainStatusRow.status String with TrainLateness and update ContentView to render a colored status pill and to return TrainLateness from isOnTime.
2026-08-23 21:23:45 -04:00
3533e5d4b8 Train status now properly gives minutes (or hours) a train is early or late
- Convert AmtrakDateFormatting API from static to instance properties/methods and added parsedDate(from:) to return Date.
- Update time(from:) and date(from:) to instance methods. Improve isOnTime logic to compute actual vs scheduled differences (minutes/hours) and report early/late/on-time.
- Updated ContentView to create an AmtrakDateFormatting instance and use the new API. Remove the Train.serviceDate extension.
2026-08-23 20:32:33 -04:00
69fc10c6f2 Renamed Refresh button to Submit 2026-08-23 20:02:10 -04:00
bf67475107 Cleaned up and removed columns so it is what an actual Solari board would show
- This update adds ISO date/time helpers for Amtrak timestamps, refactors the train table to show arrival time, status, and track details, and tracks the current station context in the UI.
- It also hardens station status decoding with a safe fallback to Unknown and simplifies the row model to match the new display.
2026-08-23 19:52:27 -04:00
6f8cca9dc9 Removed on time column for now
- Added origin and destination columns
2026-08-23 07:12:40 -04:00
0475e39760 Ideal width 2026-08-22 18:37:20 -04:00
789e697828 Added a few pre-selected stations
- Went with the popular Virtual Railfan ones first.
- Moved the error message to its own dedicated space so it doesn't pop up out of nowhere
- Fixed a few typos
2026-08-22 18:19:14 -04:00
adeada6496 Forgot to rename route column to "Route" 2026-08-22 17:55:32 -04:00
f20d49f075 Finished wiring up loadTrainStatus()
Did a little code formatting after that cause Xcode is weird
2026-08-22 17:49:41 -04:00
3eb2018a8e Use ContentView and add station input UI
- Replace the placeholder window content with ContentView and implement a basic station lookup UI.
- Added a station code TextField, Refresh button that triggers an async load, loading indicator, and error message display. Introduces a Table for TrainStatusRow with columns for number, route, on-time and platform.
- Started plumbing for row population (work in progress).
- Also tweaked window title and fixes station comment (Ashland).
2026-08-22 17:36:14 -04:00
f81ae23bb0 Setup fail safes for loadTrainStatus() 2026-08-22 16:58:28 -04:00
df5b326e30 WIP content view 2026-08-22 16:53:27 -04:00