Update node list text sizes and spacing, fix extra padding on node details for sats

This commit is contained in:
Garth Vander Houwen 2022-09-03 08:50:22 -07:00
parent 7a3929793d
commit e35343a209
3 changed files with 13 additions and 14 deletions

View file

@ -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 {

View file

@ -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])
}

View file

@ -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])