mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
41 lines
901 B
Swift
41 lines
901 B
Swift
//
|
|
// DeviceHome.swift
|
|
// MeshtasticClient
|
|
//
|
|
// Created by Garth Vander Houwen on 8/7/21.
|
|
//
|
|
|
|
// Abstract:
|
|
// A view showing a list of devices that have been seen on the mesh network
|
|
|
|
import SwiftUI
|
|
|
|
struct NodeList: View {
|
|
@EnvironmentObject var modelData: ModelData
|
|
|
|
|
|
var body: some View {
|
|
NavigationView {
|
|
|
|
List {
|
|
|
|
|
|
ForEach(modelData.nodes) { node in
|
|
NavigationLink(destination: NodeDetail(node: node)) {
|
|
NodeRow(node: node)
|
|
}
|
|
}
|
|
}
|
|
.navigationTitle("All Nodes")
|
|
|
|
|
|
}.navigationViewStyle(StackNavigationViewStyle()) // Force Full screen master details
|
|
}
|
|
}
|
|
|
|
struct NodeList_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
NodeList()
|
|
.environmentObject(ModelData())
|
|
}
|
|
}
|