aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/Devices/DevicesView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'iosApp/iosApp/Devices/DevicesView.swift')
-rw-r--r--iosApp/iosApp/Devices/DevicesView.swift32
1 files changed, 32 insertions, 0 deletions
diff --git a/iosApp/iosApp/Devices/DevicesView.swift b/iosApp/iosApp/Devices/DevicesView.swift
new file mode 100644
index 0000000..7271a70
--- /dev/null
+++ b/iosApp/iosApp/Devices/DevicesView.swift
@@ -0,0 +1,32 @@
+//
+// DevicesView.swift
+// iosApp
+//
+// Created by Iván on 28/01/22.
+// Copyright © 2022 orgName. All rights reserved.
+//
+
+import SwiftUI
+
+struct DevicesView: View {
+ @StateObject var unitsViewModel: UnitsViewModel
+
+ var body: some View {
+ List(unitsViewModel.units, id: \.device.id) { unit in
+ DeviceRow(unit: unit)
+ }
+ .navigationTitle("devices")
+ .toolbar {
+ ToolbarItem(placement: .navigationBarLeading) {
+ Button(action: unitsViewModel.toggleDisplayMode) {
+ Image(systemName: "map")
+ }
+ }
+ ToolbarItem(placement: .navigationBarTrailing) {
+ Button(action: {}) {
+ Image(systemName: "person")
+ }
+ }
+ }
+ }
+}