Reverted back to old design

Forgot I was working on that
This commit is contained in:
Tony Bark 2026-09-01 13:35:59 -04:00
parent c699007cbf
commit ca60e36ea2

View file

@ -17,6 +17,18 @@ struct ContentView: View {
var body: some View { var body: some View {
VStack { VStack {
HStack {
Text("Station Code:")
TextField("e.g. ASD", text: $stationCode)
.frame(width: 100)
Button("Submit") {
Task {
await loadTrainStatus(forStationCode: normalizedStationCode)
}
}.disabled(normalizedStationCode.isEmpty)
}.padding(10)
// Most popular Virtual Railfan stations // Most popular Virtual Railfan stations
HStack { HStack {
Button("Ashland, VA") { Button("Ashland, VA") {
@ -36,7 +48,7 @@ struct ContentView: View {
await loadTrainStatus(forStationCode: "LAP") await loadTrainStatus(forStationCode: "LAP")
} }
} }
}.padding(10) }
Table(rows) { Table(rows) {
TableColumn("Time", value: \TrainStatusRow.time) TableColumn("Time", value: \TrainStatusRow.time)
@ -69,7 +81,7 @@ struct ContentView: View {
HStack { HStack {
if let errorMessage { if let errorMessage {
Text(errorMessage) Text(errorMessage)
} else if !currentStation.isEmpty && !isLoading { } else if !currentStation.isEmpty {
Text( Text(
"It is \(amtrakDate.localTime(timeZone: localTimeZone)) at \(currentStation) station" "It is \(amtrakDate.localTime(timeZone: localTimeZone)) at \(currentStation) station"
) )
@ -82,23 +94,7 @@ struct ContentView: View {
await loadTrainStatus(forStationCode: normalizedStationCode) await loadTrainStatus(forStationCode: normalizedStationCode)
} }
}.overlay(alignment: .topTrailing) { }.overlay(alignment: .topTrailing) {
HStack {
Text("Station Code:")
TextField("e.g. ASD", text: $stationCode)
.frame(width: 100)
Button("Submit") {
Task {
await loadTrainStatus(forStationCode: normalizedStationCode)
}
}.disabled(normalizedStationCode.isEmpty)
}.frame(alignment: .topTrailing)
.padding(10)
}
.overlay(alignment: .topLeading) {
Text("Information by Amtraker") Text("Information by Amtraker")
.frame(alignment: .topLeading)
.padding(10) .padding(10)
} }
} }