initial commit
This commit is contained in:
36
IrisCompanion/iris/ContentView.swift
Normal file
36
IrisCompanion/iris/ContentView.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// iris
|
||||
//
|
||||
// Created by Kenneth on 06/01/2026.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
@EnvironmentObject private var orchestrator: ContextOrchestrator
|
||||
|
||||
var body: some View {
|
||||
TabView {
|
||||
BleStatusView()
|
||||
.tabItem { Label("BLE", systemImage: "dot.radiowaves.left.and.right") }
|
||||
OrchestratorView()
|
||||
.tabItem { Label("Orchestrator", systemImage: "bolt.horizontal.circle") }
|
||||
}
|
||||
.onAppear { orchestrator.start() }
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
if #available(iOS 16.0, *) {
|
||||
let ble = BlePeripheralManager()
|
||||
let orchestrator = ContextOrchestrator(ble: ble)
|
||||
ContentView()
|
||||
.environmentObject(ble)
|
||||
.environmentObject(orchestrator)
|
||||
} else {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user