More info sheet: put Directions and Report issue on one line under the map
The two station actions now sit together directly beneath the map card, each taking half the width, instead of being two separate rows at the foot of the sheet.
This commit is contained in:
@@ -119,6 +119,24 @@ struct StationDetailView: View {
|
|||||||
comment: "Accessibility hint for the tappable map preview in the More info sheet"))
|
comment: "Accessibility hint for the tappable map preview in the More info sheet"))
|
||||||
}
|
}
|
||||||
.listRowInsets(EdgeInsets())
|
.listRowInsets(EdgeInsets())
|
||||||
|
// Both actions sit on ONE line directly under the map: the
|
||||||
|
// two things you can DO with a station belong with the
|
||||||
|
// station, not stranded at the foot of the sheet. Equal
|
||||||
|
// halves, so neither reads as the primary action.
|
||||||
|
HStack(spacing: 12) {
|
||||||
|
Button {
|
||||||
|
openDirections()
|
||||||
|
} label: {
|
||||||
|
Label("Directions", systemImage: "arrow.triangle.turn.up.right.diamond.fill")
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
}
|
||||||
|
Button(role: .destructive) {
|
||||||
|
showingReportIssueConfirmation = true
|
||||||
|
} label: {
|
||||||
|
Label("Report issue", systemImage: "exclamationmark.bubble.fill")
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Section {
|
Section {
|
||||||
// The station name is NOT repeated here: the sheet header
|
// The station name is NOT repeated here: the sheet header
|
||||||
@@ -208,18 +226,6 @@ struct StationDetailView: View {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Section {
|
|
||||||
Button {
|
|
||||||
openDirections()
|
|
||||||
} label: {
|
|
||||||
Label("Directions", systemImage: "arrow.triangle.turn.up.right.diamond.fill")
|
|
||||||
}
|
|
||||||
Button(role: .destructive) {
|
|
||||||
showingReportIssueConfirmation = true
|
|
||||||
} label: {
|
|
||||||
Label("Report issue", systemImage: "exclamationmark.bubble.fill")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.navigationTitle(station.name)
|
.navigationTitle(station.name)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|||||||
Reference in New Issue
Block a user