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")
|
Label("Connected — prices will load", systemImage: "checkmark.circle.fill")
|
||||||
.foregroundStyle(.green)
|
.foregroundStyle(.green)
|
||||||
} else if prompter.dataDenied {
|
} 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)
|
.font(.footnote)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
@@ -282,22 +282,18 @@ struct OnboardingView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
VStack(spacing: 10) {
|
primaryButton(prompter.dataLoading ? "Checking…" : "Continue") {
|
||||||
primaryButton(
|
if prompter.dataGranted || prompter.dataDenied {
|
||||||
prompter.dataDenied ? "Open Settings" : (prompter.dataGranted ? "Continue" : (prompter.dataLoading ? "Checking…" : "Continue"))
|
// Prompt answered (allowed or denied) — move on to the
|
||||||
) {
|
// final slide. Never dead-end on an Open Settings button.
|
||||||
if prompter.dataDenied {
|
page = 4
|
||||||
openSettings()
|
} else if !prompter.dataLoading {
|
||||||
} else if prompter.dataGranted {
|
// Fires the Local Network prompt + relay probe here,
|
||||||
page = 4
|
// after the user has read the page and tapped Continue.
|
||||||
} else if !prompter.dataLoading {
|
prompter.requestDataAccess()
|
||||||
// Fires the Local Network prompt + relay probe here,
|
|
||||||
// after the user has read the page and tapped Continue.
|
|
||||||
prompter.requestDataAccess()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.disabled(prompter.dataLoading)
|
|
||||||
}
|
}
|
||||||
|
.disabled(prompter.dataLoading)
|
||||||
default:
|
default:
|
||||||
primaryButton("Start Using FuelBoard") { finish() }
|
primaryButton("Start Using FuelBoard") { finish() }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user