aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/Devices/DeviceRow.swift
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-02-16 00:22:05 -0600
committerIván Ávalos <avalos@disroot.org>2022-02-16 00:22:05 -0600
commitde9eb9dc2b932066e8ef1668d71170230edd1d38 (patch)
tree050066a09cd85d598655309ea6b2d61059c26da8 /iosApp/iosApp/Devices/DeviceRow.swift
parentfe30451d02b541a51f35e8ea68100c9b04f046ba (diff)
downloadetbsa-trackermap-mobile-de9eb9dc2b932066e8ef1668d71170230edd1d38.tar.gz
etbsa-trackermap-mobile-de9eb9dc2b932066e8ef1668d71170230edd1d38.tar.bz2
etbsa-trackermap-mobile-de9eb9dc2b932066e8ef1668d71170230edd1d38.zip
- Localized strings.
- Implemented account details, about and sign out. - Map shows first on startup now. - Save server URL on preferences. - More improvements and fixes!
Diffstat (limited to 'iosApp/iosApp/Devices/DeviceRow.swift')
-rw-r--r--iosApp/iosApp/Devices/DeviceRow.swift11
1 files changed, 11 insertions, 0 deletions
diff --git a/iosApp/iosApp/Devices/DeviceRow.swift b/iosApp/iosApp/Devices/DeviceRow.swift
index 2c2cf3b..42ef0dc 100644
--- a/iosApp/iosApp/Devices/DeviceRow.swift
+++ b/iosApp/iosApp/Devices/DeviceRow.swift
@@ -25,6 +25,7 @@ struct DeviceRow: View {
case details
case reports
case commands
+ case close
}
var callback: (Action) -> ()
var isCell: Bool = true
@@ -98,6 +99,16 @@ struct DeviceRow: View {
/* MARK: - Device name */
Text(unit.device.name)
Spacer()
+
+ /* MARK: - Close button */
+ if !isCell {
+ Button {
+ callback(.close)
+ } label: {
+ Image(systemName: "xmark")
+ .foregroundColor(.secondary)
+ }
+ }
}
.padding(.bottom, 5.0)