2026-01-08 19:16:32 +00:00
|
|
|
//
|
|
|
|
|
// 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") }
|
2026-01-10 20:20:32 +00:00
|
|
|
TodosView()
|
|
|
|
|
.tabItem { Label("Todos", systemImage: "checklist") }
|
2026-01-08 19:16:32 +00:00
|
|
|
}
|
|
|
|
|
.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()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|