Results filter is now search radius in miles (5/10/15); relay fetch scoped to radius, limit 500; changing miles re-fetches; caption shows stations within N miles

This commit is contained in:
FuelBoard Contributor
2026-08-11 18:02:23 +01:00
parent 810cc2c006
commit 213f93aa04
4 changed files with 34 additions and 19 deletions
+4 -4
View File
@@ -80,9 +80,9 @@ struct StationsView: View {
if !stations.isEmpty {
Divider()
Picker("Show", selection: $stationLimit) {
ForEach([10, 25, 50, 75, 100], id: \.self) { count in
Text("\(count)").tag(count)
Picker("Within", selection: $stationLimit) {
ForEach(FuelStore.stationRadiusOptions, id: \.self) { miles in
Text("\(miles) miles").tag(miles)
}
}
.pickerStyle(.segmented)
@@ -90,7 +90,7 @@ struct StationsView: View {
FuelStore.saveStationLimit(newValue)
}
.padding(.vertical, 2)
Text("Showing \(stations.count) of \(totalCount) stations")
Text("\(totalCount) stations within \(stationLimit) miles")
.font(.caption2)
.foregroundStyle(.secondary)
}