SwiftUI/SwiftData iOS-Client, redet mit https://banyaro.app FastAPI-Backend. Bundle-ID app.banyaro.ios, Xcode-26-Projekt mit synchronisierten Ordnern. Drin: - APIClient (URLSession + Bearer + convertFromSnakeCase Decoder) - KeychainStore + AuthSession (@Observable) für persistenten Login - LoginView, MainTabView, SettingsView (mit Logout) - RoutesListView + RouteDetailView mit MapKit-Polyline aus preview_track - DogsListView mit Foto-Avatar - App-Icon (Pfote auf Banyaro-Amber)
27 lines
885 B
Swift
27 lines
885 B
Swift
import SwiftUI
|
|
|
|
struct SettingsView: View {
|
|
@Environment(AuthSession.self) private var auth
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
Form {
|
|
Section("Account") {
|
|
LabeledContent("Name", value: auth.userName ?? "—")
|
|
LabeledContent("Premium", value: auth.isPremium ? "Ja" : "Nein")
|
|
}
|
|
Section {
|
|
Button("Abmelden", role: .destructive) {
|
|
auth.logout()
|
|
}
|
|
}
|
|
Section("Über") {
|
|
Text("Ban Yaro Go ist die native iOS-Ergänzung zur banyaro.app PWA. Phase 1: deine Touren ansehen.")
|
|
.font(.footnote)
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
}
|
|
.navigationTitle("Mehr")
|
|
}
|
|
}
|
|
}
|