Clean up height of node list items

This commit is contained in:
Garth Vander Houwen 2024-02-16 16:42:17 -08:00
parent 3d14ca3364
commit f3d51d9fcc

View file

@ -43,7 +43,7 @@ struct NodeListItem: View {
.font(.callout)
.symbolRenderingMode(.hierarchical)
.foregroundColor(.green)
.frame(width: 30, height: 15)
.frame(width: 30)
Text("connected")
.font(UIDevice.current.userInterfaceIdiom == .phone ? .callout : .caption)
.foregroundColor(.gray)
@ -54,7 +54,7 @@ struct NodeListItem: View {
.font(.callout)
.symbolRenderingMode(.hierarchical)
.foregroundColor(node.isOnline ? .green : .orange)
.frame(width: 30, height: 20)
.frame(width: 30)
LastHeardText(lastHeard: node.lastHeard)
.font(UIDevice.current.userInterfaceIdiom == .phone ? .callout : .caption)
.foregroundColor(.gray)
@ -64,7 +64,7 @@ struct NodeListItem: View {
Image(systemName: role?.systemName ?? "figure")
.font(.callout)
.symbolRenderingMode(.hierarchical)
.frame(width: 30, height: 20)
.frame(width: 30)
Text("Role: \(role?.name ?? "unknown".localized)")
.font(UIDevice.current.userInterfaceIdiom == .phone ? .callout : .caption)
.foregroundColor(.gray)
@ -74,7 +74,7 @@ struct NodeListItem: View {
Image(systemName: "envelope.arrow.triangle.branch")
.font(.callout)
.symbolRenderingMode(.hierarchical)
.frame(width: 30, height: 20)
.frame(width: 30)
Text("storeforward".localized)
.font(UIDevice.current.userInterfaceIdiom == .phone ? .callout : .caption)
.foregroundColor(.gray)
@ -93,7 +93,7 @@ struct NodeListItem: View {
Image(systemName: "lines.measurement.horizontal")
.font(.callout)
.symbolRenderingMode(.hierarchical)
.frame(width: 30, height: 20)
.frame(width: 30)
DistanceText(meters: metersAway)
.font(UIDevice.current.userInterfaceIdiom == .phone ? .callout : .caption)
.foregroundColor(.gray)
@ -108,7 +108,7 @@ struct NodeListItem: View {
Image(systemName: "lines.measurement.horizontal")
.font(.callout)
.symbolRenderingMode(.hierarchical)
.frame(width: 30, height: 20)
.frame(width: 30)
DistanceText(meters: metersAway)
.font(UIDevice.current.userInterfaceIdiom == .phone ? .callout : .caption)
.foregroundColor(.gray)
@ -121,7 +121,7 @@ struct NodeListItem: View {
Image(systemName: "fibrechannel")
.font(.callout)
.symbolRenderingMode(.hierarchical)
.frame(width: 30, height: 20)
.frame(width: 30)
Text("Channel: \(node.channel)")
.foregroundColor(.gray)
.font(.caption)
@ -130,7 +130,7 @@ struct NodeListItem: View {
Image(systemName: "network")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
Text("Via MQTT")
.foregroundColor(.gray)
.font(.caption)
@ -141,7 +141,7 @@ struct NodeListItem: View {
Image(systemName: "scroll")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
Text("Logs:")
.foregroundColor(.gray)
.font(.callout)
@ -149,31 +149,31 @@ struct NodeListItem: View {
Image(systemName: "flipphone")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
}
if node.hasPositions {
Image(systemName: "mappin.and.ellipse")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
}
if node.hasEnvironmentMetrics {
Image(systemName: "cloud.sun.rain")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
}
if node.hasDetectionSensorMetrics {
Image(systemName: "sensor")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
}
if node.hasTraceRoutes {
Image(systemName: "signpost.right.and.left")
.symbolRenderingMode(.hierarchical)
.font(.callout)
.frame(width: 30, height: 20)
.frame(width: 30)
}
}
.padding(.top)