Add first-launch onboarding with location + notification permission prompts

- OnboardingView: 4-page flow (welcome + features, location, notifications, done)
- Triggers system prompts in-context via OnboardingPermissionPrompter
- Shown at initial launch only (FuelStore.onboardingCompleted flag, app-group defaults)
- Test hook: 'Show onboarding (testing)' button at bottom of Alerts tab
This commit is contained in:
FuelBoard Contributor
2026-08-12 07:10:54 +01:00
parent 2ed18d81a3
commit fb79cf0788
4 changed files with 422 additions and 2 deletions
+14
View File
@@ -7,6 +7,7 @@ struct AlertsView: View {
@Binding var radius: Double
let monitoredCount: Int
let lastAlert: String?
var onShowOnboarding: () -> Void = {}
var body: some View {
NavigationStack {
@@ -54,6 +55,19 @@ struct AlertsView: View {
}
}
}
// Testing hook in production onboarding shows once at first
// launch; this button re-opens it to verify the flow.
Section {
Button {
onShowOnboarding()
} label: {
Label("Show onboarding (testing)", systemImage: "flag.fill")
.font(.footnote)
}
} footer: {
Text("Testing only — onboarding normally appears once on first launch.")
}
}
.navigationTitle("Alerts")
}