mirror of
https://github.com/tonytins/amtkstat.git
synced 2026-10-24 05:32:54 -04:00
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.
This commit is contained in:
parent
0543d43ba5
commit
e1c39aa457
4 changed files with 8 additions and 3 deletions
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,5 +103,5 @@ struct TrainStatusRow: Identifiable {
|
|||
var departure: String
|
||||
var origin: String
|
||||
var destination: String
|
||||
// var serviceDate: String
|
||||
var presence: StationStatus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <time> at <station> station``.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue