Merge fixes and new way to show IP on Connect view

This commit is contained in:
Jake-B 2025-10-27 13:18:31 -04:00
parent 9e44aeeb0e
commit 402f89b91e

View file

@ -63,22 +63,10 @@ struct Connect: View {
}
Text("Connection Name").font(.callout)+Text(": \(connectedDevice.name.addingVariationSelectors)")
.font(.callout).foregroundColor(Color.gray)
HStack {
HStack(alignment: .firstTextBaseline) {
TransportIcon(transportType: connectedDevice.transportType)
if connectedDevice.transportType == .ble {
// baseline aligned looks better for the signal meter
HStack(alignment: .firstTextBaseline) {
TransportIcon(transportType: connectedDevice.transportType)
connectedDevice.getSignalStrength().map { SignalStrengthIndicator(signalStrength: $0, width: 5, height: 20) }
}
} else if connectedDevice.transportType == .tcp {
// Not baseline aligned looks better for the connection string
HStack {
TransportIcon(transportType: connectedDevice.transportType)
Text("\(connectedDevice.connectionDetails ?? connectedDevice.identifier)")
.foregroundColor(.gray)
}
} else {
TransportIcon(transportType: connectedDevice.transportType)
connectedDevice.getSignalStrength().map { SignalStrengthIndicator(signalStrength: $0, width: 5, height: 20) }
}
Spacer()
}