Settings: move Data source section behind debug flag (debug-only)

This commit is contained in:
FuelBoard Contributor
2026-08-14 10:01:36 +01:00
parent 3dd567a5cc
commit edf376d378
+24 -22
View File
@@ -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,27 +172,6 @@ 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 {
Button {
Task { await tipStore.purchase() }
} label: {
HStack {
Label("Leave a tip", systemImage: "heart.fill")
.foregroundStyle(.pink)
Spacer()
Text(tipStore.displayPrice)
.foregroundStyle(.secondary)
.monospacedDigit()
}
}
.disabled(tipStore.purchaseInProgress)
} header: {
Text("Support FuelBoard")
} footer: {
Text("A small tip helps keep the data relay and app development going. Thank you!")
}
Section {
HStack {
@@ -218,6 +199,27 @@ struct SettingsView: View {
} 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 {
Button {
Task { await tipStore.purchase() }
} label: {
HStack {
Label("Leave a tip", systemImage: "heart.fill")
.foregroundStyle(.pink)
Spacer()
Text(tipStore.displayPrice)
.foregroundStyle(.secondary)
.monospacedDigit()
}
}
.disabled(tipStore.purchaseInProgress)
} header: {
Text("Support FuelBoard")
} footer: {
Text("A small tip helps keep the data relay and app development going. Thank you!")
}
Section {
HStack {