Files
stackdex_neu/StackDex/ContentView.swift
Matthias a60a76b797 Add scan flow MVP and local Axiom skill workspace
This snapshot establishes the camera-to-result recognition flow and related tests while checking in the project skill/docs assets required for the configured local tooling.
2026-04-19 21:11:32 +02:00

40 lines
1.0 KiB
Swift

//
// ContentView.swift
// StackDex
//
// Created by Matthias Meister on 18.04.26.
//
import SwiftData
import SwiftUI
struct ContentView: View {
@StateObject private var flowModel = ScanFlowModel()
var body: some View {
NavigationStack(path: $flowModel.path) {
ScanView(flowModel: flowModel)
.navigationDestination(for: ScanRoute.self) { route in
switch route {
case .result:
ResultEditorView(flowModel: flowModel, mode: .recognized)
case .manual:
ResultEditorView(flowModel: flowModel, mode: .manual)
}
}
.task {
flowModel.startObservers()
await flowModel.prepareVisibleServices()
}
.onDisappear {
flowModel.stopObservers()
}
}
}
}
#Preview {
ContentView()
.modelContainer(for: ConfirmedScanRecord.self, inMemory: true)
}