mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/07fad82b-9a10-4db0-a0b0-445d8ef28e50 Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
41 lines
831 B
Swift
41 lines
831 B
Swift
//
|
||
// ContentView.swift
|
||
// Meshtastic Watch App
|
||
//
|
||
// Copyright(c) Meshtastic 2025.
|
||
//
|
||
|
||
import SwiftUI
|
||
|
||
/// Root view of the Meshtastic Watch App.
|
||
///
|
||
/// Uses a tab-based layout:
|
||
/// 1. **Foxhunt** – nearby nodes list → compass
|
||
/// 2. **Radio** – BLE device connection
|
||
struct ContentView: View {
|
||
|
||
@StateObject private var bleManager = WatchBLEManager()
|
||
@StateObject private var locationManager = WatchLocationManager()
|
||
|
||
var body: some View {
|
||
TabView {
|
||
// Tab 1: Foxhunt
|
||
NavigationStack {
|
||
NearbyNodesListView(bleManager: bleManager, locationManager: locationManager)
|
||
}
|
||
|
||
// Tab 2: Radio connection
|
||
NavigationStack {
|
||
DeviceConnectionView(bleManager: bleManager)
|
||
}
|
||
}
|
||
.tabViewStyle(.verticalPage)
|
||
.onAppear {
|
||
locationManager.requestAuthorization()
|
||
}
|
||
}
|
||
}
|
||
|
||
#Preview {
|
||
ContentView()
|
||
}
|