From e1c39aa45724d249c914155a110b0583737f7bb9 Mon Sep 17 00:00:00 2001 From: Tony Bark <35226681+tonytins@users.noreply.github.com> Date: Mon, 24 Aug 2026 04:40:33 -0400 Subject: [PATCH 1/2] Added station presence column and bumped up version - Added a StationStatus "presence" property to TrainStatusRow and display it as a new (unnamed) TableColumn in ContentView (using presence.rawValue). - Populated presence from leg?.status. - Bumped app version to 0.2.103 in Bundler.toml and add a 0.2.103 entry to changelog noting the new column. --- Bundler.toml | 2 +- Sources/AmtrakStatus/ContentView.swift | 3 ++- Sources/AmtrakStatus/Models.swift | 2 +- changelog.md | 4 ++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Bundler.toml b/Bundler.toml index cc33fa4..142cdbf 100644 --- a/Bundler.toml +++ b/Bundler.toml @@ -3,7 +3,7 @@ format_version = 2 [apps.AmtrakStatus] identifier = 'com.tonybark.AmtrakStatus' product = 'AmtrakStatus' -version = '0.2.102' +version = '0.2.103' icon = "./assets/icon.png" diff --git a/Sources/AmtrakStatus/ContentView.swift b/Sources/AmtrakStatus/ContentView.swift index 09d601c..0b25506 100644 --- a/Sources/AmtrakStatus/ContentView.swift +++ b/Sources/AmtrakStatus/ContentView.swift @@ -53,6 +53,7 @@ struct ContentView: View { Table(rows) { TableColumn("Time", value: \TrainStatusRow.arrival) TableColumn("Number", value: \TrainStatusRow.trainNum) + TableColumn("", value: \TrainStatusRow.presence.rawValue) TableColumn("Train", value: \TrainStatusRow.routeName) TableColumn("To", value: \TrainStatusRow.destination) TableColumn("From", value: \TrainStatusRow.origin) @@ -209,7 +210,7 @@ struct ContentView: View { departure: depature ?? "", origin: train.origName, destination: train.destName, - // serviceDate: train.serviceDate + presence: leg?.status ?? .unknown // Yeah... It's a little confusing ) } } diff --git a/Sources/AmtrakStatus/Models.swift b/Sources/AmtrakStatus/Models.swift index eba059c..74c9747 100644 --- a/Sources/AmtrakStatus/Models.swift +++ b/Sources/AmtrakStatus/Models.swift @@ -103,5 +103,5 @@ struct TrainStatusRow: Identifiable { var departure: String var origin: String var destination: String - // var serviceDate: String + var presence: StationStatus } diff --git a/changelog.md b/changelog.md index 8a28089..91f9def 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Change Log +## 0.2.103 + +- A new column after number has "Enroute," "Station," and "Departed" status. It's left blank since status is already taken. + ## 0.2.102 - The status bar at the bottom now shows ``It is