mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix visibility
Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
This commit is contained in:
parent
3f9348e36f
commit
104cdd58f9
2 changed files with 14 additions and 6 deletions
|
|
@ -30,15 +30,20 @@ struct TAKModuleConfig: View {
|
|||
return DeviceRoles(rawValue: Int(role))
|
||||
}
|
||||
|
||||
private var isConnectedNode: Bool {
|
||||
guard let node else { return false }
|
||||
return node.num == accessoryManager.activeDeviceNum
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
ConfigHeader(title: "TAK", config: \.takConfig, node: node, onAppear: setTAKValues)
|
||||
|
||||
if accessoryManager.isConnected, node?.takConfig == nil {
|
||||
Section {
|
||||
HStack(spacing: 12) {
|
||||
ProgressView()
|
||||
Text("Loading TAK config from the node.")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let deviceRole, deviceRole != .tak && deviceRole != .takTracker {
|
||||
Section {
|
||||
Text("These settings only apply when the device role is TAK or TAK Tracker.")
|
||||
|
|
@ -79,7 +84,7 @@ struct TAKModuleConfig: View {
|
|||
.font(.callout)
|
||||
}
|
||||
}
|
||||
.disabled(!accessoryManager.isConnected || (!isConnectedNode && node?.takConfig == nil))
|
||||
.disabled(!accessoryManager.isConnected || node?.takConfig == nil)
|
||||
.safeAreaInset(edge: .bottom, alignment: .center) {
|
||||
HStack(spacing: 0) {
|
||||
SaveConfigButton(node: node, hasChanges: $hasChanges) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue