Settings: move Data source section behind debug flag (debug-only)
This commit is contained in:
@@ -9,7 +9,9 @@ import WidgetKit
|
|||||||
/// times to toggle it — no user-facing switch). The first test button uses
|
/// 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
|
/// REAL data (the actual cheapest station for the monitored fuel within the
|
||||||
/// radius, exactly like a live alert) via `onTestAlert`; the second fires
|
/// 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 {
|
struct SettingsView: View {
|
||||||
@Binding var distanceUnit: DistanceUnit
|
@Binding var distanceUnit: DistanceUnit
|
||||||
/// The fuel + radius currently configured for alerts (mirrors the Alerts
|
/// 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.")
|
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() }
|
.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 {
|
Section {
|
||||||
@@ -192,33 +221,6 @@ struct SettingsView: View {
|
|||||||
Text("A small tip helps keep the data relay and app development going. Thank you!")
|
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 {
|
Section {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Version")
|
Text("Version")
|
||||||
|
|||||||
Reference in New Issue
Block a user