Files
aris-old/IrisCompanion/iris/ContentView.swift

43 lines
1.2 KiB
Swift
Raw Normal View History

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") }
SettingsView()
.tabItem { Label("Settings", systemImage: "gearshape") }
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 spotifyAuth = SpotifyAuthManager()
let orchestrator = ContextOrchestrator(ble: ble, spotifyAuth: spotifyAuth)
2026-01-08 19:16:32 +00:00
ContentView()
.environmentObject(ble)
.environmentObject(orchestrator)
.environmentObject(spotifyAuth)
2026-01-08 19:16:32 +00:00
} else {
ContentView()
}
}
}