20 lines
486 B
Swift
20 lines
486 B
Swift
// ContentView.swift — root view, switches on pairing state
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@EnvironmentObject var appState: AppState
|
|
|
|
var body: some View {
|
|
Group {
|
|
if let credential = appState.credential {
|
|
MainTerminalView(credential: credential)
|
|
} else {
|
|
PairingFlowView { credential in
|
|
appState.didPair(credential: credential)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|