Phase 3.5: Pause/Resume, SwiftData-Persistenz, Kamera-Capture, Fotos zu bestehender Tour
LocationTracker: - isPaused, pausedAt, accumulatedPausedSeconds - pause()/resume()/restore() Methoden - effectiveElapsedSeconds rechnet Pausen raus - restore() für nach App-Crash: Offline-Lücke wird als Pause gezählt ActiveWalk @Model (SwiftData): - startedAt, lastUpdate, pausedAt, accumulatedPausedSeconds, pointsData - Container in BanYaroGoApp registriert TrackingView: - Persistenz alle 5s via Timer - confirmationDialog beim Erscheinen wenn ActiveWalk vorhanden: Fortsetzen / Jetzt speichern / Verwerfen - Pause/Resume-Button + Stop-Button - Floating Kamera-Button rechts unten - Foto-Counter in der Stats-Karte - Pause-Badge oben links bei Pause CameraPicker: UIImagePickerController-Wrapper (Fallback auf Library im Simulator). FinishWalkSheet: initialPhotos: [Data] für Kamera-Fotos während Tour. RouteDetailView: PhotosPicker zum Hinzufügen von Fotos zu bestehender Tour, sequentieller Upload mit Progress, Detail wird nach Upload refreshed. NSCameraUsageDescription in BanYaroGo-Info.plist.
This commit is contained in:
parent
e27fa39620
commit
5473bbf41f
9 changed files with 445 additions and 61 deletions
|
|
@ -5,6 +5,7 @@ struct FinishWalkSheet: View {
|
|||
let points: [GPSPoint]
|
||||
let durationSeconds: Int
|
||||
let distanceMeters: Double
|
||||
let initialPhotos: [Data]
|
||||
let onDiscard: () -> Void
|
||||
let onSaved: () -> Void
|
||||
|
||||
|
|
@ -34,12 +35,14 @@ struct FinishWalkSheet: View {
|
|||
points: [GPSPoint],
|
||||
durationSeconds: Int,
|
||||
distanceMeters: Double,
|
||||
initialPhotos: [Data] = [],
|
||||
onDiscard: @escaping () -> Void,
|
||||
onSaved: @escaping () -> Void
|
||||
) {
|
||||
self.points = points
|
||||
self.durationSeconds = durationSeconds
|
||||
self.distanceMeters = distanceMeters
|
||||
self.initialPhotos = initialPhotos
|
||||
self.onDiscard = onDiscard
|
||||
self.onSaved = onSaved
|
||||
|
||||
|
|
@ -47,6 +50,7 @@ struct FinishWalkSheet: View {
|
|||
formatter.locale = Locale(identifier: "de_DE")
|
||||
formatter.dateStyle = .medium
|
||||
_name = State(initialValue: "Gassi am \(formatter.string(from: .now))")
|
||||
_photoData = State(initialValue: initialPhotos)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue