Widget tap relay via fuelboard:// scheme; full station names; no check-again
- WidgetKit widgets can only open their containing app — the Link URL is delivered to FuelBoard via onOpenURL, never opened directly in Maps. The widget now links to a registered fuelboard://directions?lat=&lng= URL, and FuelBoardApp forwards it to native maps://?daddr= directions. (http://maps.apple.com and raw maps:// both silently dropped in-app.) - Widget rows (small + medium) now show the full station name (station.name) instead of just the brand. - Onboarding network page: removed the 'Check again' secondary screen after the Local Network prompt — Open Settings remains the only retry path. 35 tests pass.
This commit is contained in:
@@ -224,7 +224,7 @@ struct FuelPriceWidgetView: View {
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Text(station.brand.sanitizedStationTitle)
|
||||
Text(station.name)
|
||||
.font(.headline)
|
||||
.lineLimit(1)
|
||||
if let price = station.prices[entry.fuel] {
|
||||
@@ -243,7 +243,7 @@ struct FuelPriceWidgetView: View {
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)
|
||||
.widgetURL(station.mapsDirectionsURL)
|
||||
.widgetURL(station.widgetDirectionsURL)
|
||||
}
|
||||
|
||||
private var stationList: some View {
|
||||
@@ -261,9 +261,9 @@ struct FuelPriceWidgetView: View {
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
ForEach(entry.stations.prefix(3)) { station in
|
||||
Link(destination: station.mapsDirectionsURL ?? URL(string: "maps://")!) {
|
||||
Link(destination: station.widgetDirectionsURL ?? URL(string: "fuelboard://")!) {
|
||||
HStack(spacing: 8) {
|
||||
Text(station.brand.sanitizedStationTitle)
|
||||
Text(station.name)
|
||||
.font(.caption.weight(.semibold))
|
||||
.lineLimit(1)
|
||||
if let location = entry.location {
|
||||
|
||||
Reference in New Issue
Block a user