diff --git a/FuelBoard/SettingsView.swift b/FuelBoard/SettingsView.swift index 49f7a90..68613e9 100644 --- a/FuelBoard/SettingsView.swift +++ b/FuelBoard/SettingsView.swift @@ -9,7 +9,9 @@ import WidgetKit /// times to toggle it — no user-facing switch). The first test button uses /// REAL data (the actual cheapest station for the monitored fuel within the /// radius, exactly like a live alert) via `onTestAlert`; the second fires -/// with no criteria at all. +/// with no criteria at all. The Data source section (connection/stations/ +/// freshness) is debug-only too — moved here so release builds don't expose +/// relay plumbing. struct SettingsView: View { @Binding var distanceUnit: DistanceUnit /// The fuel + radius currently configured for alerts (mirrors the Alerts @@ -170,6 +172,33 @@ struct SettingsView: View { Text("Each beacon is written by the widget extension at the end of every timeline entry for that intent type (keychain, so it survives free-SideStore installs). A missing SMALL beacon after adding the small widget means its timeline never reaches the provider. Installed widgets come from WidgetCenter.") } .onAppear { refreshWidgetDiag() } + + Section { + HStack { + Text("Connection") + Spacer() + Text(connectionText) + .foregroundStyle(.secondary) + } + HStack { + Text("Stations") + Spacer() + Text(stationCountText) + .foregroundStyle(.secondary) + .monospacedDigit() + } + HStack { + Text("Data updated") + Spacer() + Text(dataUpdatedText) + .foregroundStyle(.secondary) + .monospacedDigit() + } + } header: { + Text("Data source") + } footer: { + Text("Connection shows whether prices come from the official Fuel Finder API or the CSV mirror. Data updated is the latest price change reported by the GOV.UK server itself.") + } } Section { @@ -192,33 +221,6 @@ struct SettingsView: View { Text("A small tip helps keep the data relay and app development going. Thank you!") } - Section { - HStack { - Text("Connection") - Spacer() - Text(connectionText) - .foregroundStyle(.secondary) - } - HStack { - Text("Stations") - Spacer() - Text(stationCountText) - .foregroundStyle(.secondary) - .monospacedDigit() - } - HStack { - Text("Data updated") - Spacer() - Text(dataUpdatedText) - .foregroundStyle(.secondary) - .monospacedDigit() - } - } header: { - Text("Data source") - } footer: { - Text("Connection shows whether prices come from the official Fuel Finder API or the CSV mirror. Data updated is the latest price change reported by the GOV.UK server itself.") - } - Section { HStack { Text("Version")