From 511a95861088771c3b83120e7f85429009bcdf7c Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 1 Jul 2022 19:01:29 -0700 Subject: [PATCH] Clean up module config preview --- .../Views/Settings/Config/Module/InputBrokerConfig.swift | 8 -------- .../Views/Settings/Config/Module/RangeTestConfig.swift | 3 ++- Meshtastic/Views/Settings/Settings.swift | 6 +++--- 3 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 Meshtastic/Views/Settings/Config/Module/InputBrokerConfig.swift diff --git a/Meshtastic/Views/Settings/Config/Module/InputBrokerConfig.swift b/Meshtastic/Views/Settings/Config/Module/InputBrokerConfig.swift deleted file mode 100644 index c57dc7c9..00000000 --- a/Meshtastic/Views/Settings/Config/Module/InputBrokerConfig.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// InputBrokerConfig.swift -// Meshtastic -// -// Created by Garth Vander Houwen on 6/28/22. -// - -import Foundation diff --git a/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift b/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift index 0f3d4a83..309c00c4 100644 --- a/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/RangeTestConfig.swift @@ -80,8 +80,9 @@ struct RangeTestConfig: View { Label("Save", systemImage: "square.and.arrow.down.fill") } .toggleStyle(SwitchToggleStyle(tint: .accentColor)) + .disabled(!(node.myInfo?.hasWifi ?? false)) - Text("Saves a CSV with the range test message details, only available on ESP32 devices with a web server.") + Text("Saves a CSV with the range test message details, currently only available on ESP32 devices with a web server.") .font(.caption) } } diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index b7cde110..a89df691 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -144,7 +144,7 @@ struct Settings: View { Image(systemName: "point.3.connected.trianglepath.dotted") .symbolRenderingMode(.hierarchical) - Text("Range Test (ESP32 Only)") + Text("Range Test") } .disabled(bleManager.connectedPeripheral == nil) //nodes.first(where: { $0.num == connectedNodeNum })?.myInfo?.hasWifi ?? true)//|| @@ -159,7 +159,7 @@ struct Settings: View { Text("Serial") } - .disabled(false) + .disabled(bleManager.connectedPeripheral == nil) NavigationLink { @@ -171,7 +171,7 @@ struct Settings: View { Text("Telemetry (Sensors)") } - .disabled(false) + .disabled(bleManager.connectedPeripheral == nil) } // Not Implemented: // Store Forward Config - Not Working, TBEAM Only