diff --git a/Meshtastic Client.xcodeproj/project.pbxproj b/Meshtastic Client.xcodeproj/project.pbxproj index f3659f33..aece033e 100644 --- a/Meshtastic Client.xcodeproj/project.pbxproj +++ b/Meshtastic Client.xcodeproj/project.pbxproj @@ -659,7 +659,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.25.1; + MARKETING_VERSION = 1.25.12; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = NO; @@ -686,7 +686,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.25.1; + MARKETING_VERSION = 1.25.12; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = NO; diff --git a/MeshtasticClient/Views/Bluetooth/Connect.swift b/MeshtasticClient/Views/Bluetooth/Connect.swift index 9aa1c980..8d7f615c 100644 --- a/MeshtasticClient/Views/Bluetooth/Connect.swift +++ b/MeshtasticClient/Views/Bluetooth/Connect.swift @@ -133,9 +133,9 @@ struct Connect: View { .navigationTitle("Bluetooth Radios") .navigationBarItems(trailing: - ZStack { + VStack(alignment: .trailing) { - ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedNode != nil) ? bleManager.connectedNode.user.longName : ((bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.name : "Unknown") ?? "Unknown") + ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedNode != nil) ? bleManager.connectedNode.user.shortName : ((bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.name : "Unknown") ?? "Unknown") } ) diff --git a/MeshtasticClient/Views/Helpers/ConnectedDevice.swift b/MeshtasticClient/Views/Helpers/ConnectedDevice.swift index e9814467..352d6e29 100644 --- a/MeshtasticClient/Views/Helpers/ConnectedDevice.swift +++ b/MeshtasticClient/Views/Helpers/ConnectedDevice.swift @@ -13,31 +13,29 @@ struct ConnectedDevice: View { var body: some View { HStack { - VStack { - - if bluetoothOn { - if deviceConnected { - Image(systemName: "antenna.radiowaves.left.and.right") - .imageScale(.medium) - .foregroundColor(.green) - .symbolRenderingMode(.hierarchical) - Text(name!).font(.caption2).foregroundColor(.gray) - } - else { - - Image(systemName: "antenna.radiowaves.left.and.right.slash") - .imageScale(.medium) - .foregroundColor(.red) - .symbolRenderingMode(.hierarchical) - Text("Disconnected").font(.caption2).foregroundColor(.gray) - - } + + if bluetoothOn { + if deviceConnected { + Image(systemName: "antenna.radiowaves.left.and.right.circle.fill") + .imageScale(.large) + .foregroundColor(.green) + .symbolRenderingMode(.hierarchical) + Text(name!).font(.subheadline).foregroundColor(.gray) } else { - Text("Bluetooth Off").font(.caption).foregroundColor(.red) + + Image(systemName: "antenna.radiowaves.left.and.right.slash") + .imageScale(.medium) + .foregroundColor(.red) + .symbolRenderingMode(.hierarchical) + Text("Disconnected").font(.subheadline).foregroundColor(.gray) + } } - }.offset(x: 5, y: -7) + else { + Text("Bluetooth Off").font(.subheadline).foregroundColor(.red) + } + } } } diff --git a/MeshtasticClient/Views/Messages/Messages.swift b/MeshtasticClient/Views/Messages/Messages.swift index ada8c0ac..7ec0ff9a 100644 --- a/MeshtasticClient/Views/Messages/Messages.swift +++ b/MeshtasticClient/Views/Messages/Messages.swift @@ -135,7 +135,7 @@ struct Messages: View { ZStack { - ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedNode != nil) ? bleManager.connectedNode.user.longName : ((bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.name : "Unknown") ?? "Unknown") + ConnectedDevice(bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, name: (bleManager.connectedNode != nil) ? bleManager.connectedNode.user.shortName : ((bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.name : "Unknown") ?? "Unknown") } ) diff --git a/MeshtasticClient/Views/Nodes/NodeList.swift b/MeshtasticClient/Views/Nodes/NodeList.swift index 50f15c80..2f5df8f8 100644 --- a/MeshtasticClient/Views/Nodes/NodeList.swift +++ b/MeshtasticClient/Views/Nodes/NodeList.swift @@ -58,10 +58,12 @@ struct NodeList: View { } .swipeActions { Button { + let nodeIndex = meshData.nodes.firstIndex(where: { $0.id == node.id }) meshData.nodes.remove(at: nodeIndex!) meshData.save() } label: { + Label("Delete from app", systemImage: "trash") } .tint(.red)