feat: add iOS support and harden receipt scanning

This commit is contained in:
Timo
2026-08-20 23:48:26 +02:00
parent f5e06c32b0
commit cf1b799e1b
107 changed files with 11755 additions and 122 deletions

View File

@@ -0,0 +1,34 @@
import SwiftUI
/// Shown for `AppState.phase == .signedOut` (see `App/RootView.swift`, which
/// depends on this exact type name and its zero-argument initializer). Owns
/// simple in-feature navigation between "Anmelden", "Registrieren", and the
/// post-signup "bitte bestätige deine E-Mail" screen none of that belongs
/// in `AppState` since none of it affects whether the user is actually
/// signed in; `AppState.phase` only changes once a real session exists.
struct AuthFlowView: View {
private enum Screen: Equatable {
case login
case signup
case verificationPending(email: String)
}
@State private var screen: Screen = .login
var body: some View {
Group {
switch screen {
case .login:
LoginView(onSwitchToSignup: { screen = .signup })
case .signup:
SignupView(
onSignupSucceeded: { email in screen = .verificationPending(email: email) },
onSwitchToLogin: { screen = .login }
)
case .verificationPending(let email):
VerificationPendingView(email: email, onGoToLogin: { screen = .login })
}
}
.animation(.default, value: screen)
}
}