Onboarding: Data page never dead-ends on Open Settings
- The Prices-ready page button stays 'Continue': tapping it fires the Local Network prompt + relay probe; on grant the page auto-advances to the final slide (existing onChange), on denial it still advances. - Removed the Open Settings branch from the Data page entirely (kept for Location page, where the user can still be sent to Settings). - Denied caption no longer suggests opening Settings. 35 tests pass.
This commit is contained in:
@@ -209,7 +209,7 @@ struct OnboardingView: View {
|
||||
Label("Connected — prices will load", systemImage: "checkmark.circle.fill")
|
||||
.foregroundStyle(.green)
|
||||
} else if prompter.dataDenied {
|
||||
Text("Local network access was denied — prices won't load until it's allowed. You can open Settings to change this.")
|
||||
Text("Local network access was denied — prices won't load until it's allowed, but you can keep using FuelBoard.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
.multilineTextAlignment(.center)
|
||||
@@ -282,13 +282,10 @@ struct OnboardingView: View {
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
VStack(spacing: 10) {
|
||||
primaryButton(
|
||||
prompter.dataDenied ? "Open Settings" : (prompter.dataGranted ? "Continue" : (prompter.dataLoading ? "Checking…" : "Continue"))
|
||||
) {
|
||||
if prompter.dataDenied {
|
||||
openSettings()
|
||||
} else if prompter.dataGranted {
|
||||
primaryButton(prompter.dataLoading ? "Checking…" : "Continue") {
|
||||
if prompter.dataGranted || prompter.dataDenied {
|
||||
// Prompt answered (allowed or denied) — move on to the
|
||||
// final slide. Never dead-end on an Open Settings button.
|
||||
page = 4
|
||||
} else if !prompter.dataLoading {
|
||||
// Fires the Local Network prompt + relay probe here,
|
||||
@@ -297,7 +294,6 @@ struct OnboardingView: View {
|
||||
}
|
||||
}
|
||||
.disabled(prompter.dataLoading)
|
||||
}
|
||||
default:
|
||||
primaryButton("Start Using FuelBoard") { finish() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user