From e35343a209a93a9cfb1580d59a2ff1641ad9ab10 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sat, 3 Sep 2022 08:50:22 -0700 Subject: [PATCH] Update node list text sizes and spacing, fix extra padding on node details for sats --- Meshtastic/Views/Helpers/LastHeardText.swift | 2 +- Meshtastic/Views/Nodes/NodeDetail.swift | 2 +- Meshtastic/Views/Nodes/NodeList.swift | 23 ++++++++++---------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Meshtastic/Views/Helpers/LastHeardText.swift b/Meshtastic/Views/Helpers/LastHeardText.swift index 3d688264..36bfaa9d 100644 --- a/Meshtastic/Views/Helpers/LastHeardText.swift +++ b/Meshtastic/Views/Helpers/LastHeardText.swift @@ -13,7 +13,7 @@ struct LastHeardText: View { var body: some View { if (lastHeard != nil && lastHeard! >= sixMonthsAgo!){ - Text("Last Heard: \(lastHeard!, style: .relative) ago") + Text("Heard: \(lastHeard!, style: .relative) ago") } else { diff --git a/Meshtastic/Views/Nodes/NodeDetail.swift b/Meshtastic/Views/Nodes/NodeDetail.swift index 7b52ebae..23d53eca 100644 --- a/Meshtastic/Views/Nodes/NodeDetail.swift +++ b/Meshtastic/Views/Nodes/NodeDetail.swift @@ -432,7 +432,7 @@ struct NodeDetail: View { .frame(minHeight:170) .padding(0) } - .offset( y:-40) + .offset( y: (node.myInfo!.hasGps ? 0 : -40)) } .edgesIgnoringSafeArea([.leading, .trailing]) } diff --git a/Meshtastic/Views/Nodes/NodeList.swift b/Meshtastic/Views/Nodes/NodeList.swift index 1f0b571f..62b2657c 100644 --- a/Meshtastic/Views/Nodes/NodeList.swift +++ b/Meshtastic/Views/Nodes/NodeList.swift @@ -65,7 +65,7 @@ struct NodeList: View { Text(node.user?.longName ?? "Unknown").font(.title2).offset(x: -15) } } - .padding(.bottom, 10) + .padding(.bottom, 5) if connected { @@ -81,20 +81,10 @@ struct NodeList: View { Text("Currently Connected").font(.title3).foregroundColor(Color.accentColor) } } + .padding(.bottom, 2) } - Spacer() - HStack(alignment: .bottom) { - - Image(systemName: "clock.badge.checkmark.fill").font(.title3) - .foregroundColor(.accentColor).symbolRenderingMode(.hierarchical) - - LastHeardText(lastHeard: node.lastHeard).font(.subheadline).foregroundColor(.gray) - - } - if node.positions?.count ?? 0 > 0 && (bleManager.connectedPeripheral != nil && bleManager.connectedPeripheral.num != node.num) { - Spacer() HStack(alignment: .bottom) { let lastPostion = node.positions!.reversed()[0] as! PositionEntity @@ -117,6 +107,15 @@ struct NodeList: View { DistanceText(meters: metersAway).font(.title3).foregroundColor(.gray) } } + .padding(.bottom, 2) + + } + HStack(alignment: .bottom) { + + Image(systemName: "clock.badge.checkmark.fill").font(.headline) + .foregroundColor(.accentColor).symbolRenderingMode(.hierarchical) + + LastHeardText(lastHeard: node.lastHeard).font(.subheadline).foregroundColor(.gray) } } .padding([.leading, .top, .bottom])