Increase text size on node details

This commit is contained in:
Garth Vander Houwen 2023-10-17 19:21:45 -07:00
parent 9799ed9330
commit c1668577cc
4 changed files with 16 additions and 14 deletions

View file

@ -21,7 +21,7 @@ struct CircleText: View {
.foregroundColor(color.isLight() ? .black : .white)
.font(.system(size: 500))
.minimumScaleFactor(0.001)
.frame(width: circleSize * 0.94, height: circleSize * 0.94, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
.frame(width: circleSize * 0.95, height: circleSize * 0.95, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
}
.aspectRatio(1, contentMode: .fit)
}

View file

@ -31,9 +31,9 @@ struct LoRaSignalStrengthMeter: View {
Gauge(value: Double(signalStrength.rawValue), in: 0...3) {
} currentValueLabel: {
Image(systemName: "dot.radiowaves.left.and.right")
.font(.caption)
.font(.callout)
Text("Signal \(signalStrength.description)")
.font(.caption)
.font(.callout)
}
.gaugeStyle(.accessoryLinear)
.tint(gradient)

View file

@ -26,14 +26,14 @@ struct NodeListItem: View {
let deviceMetrics = node.telemetries?.filtered(using: NSPredicate(format: "metricsType == 0"))
if deviceMetrics?.count ?? 0 >= 1 {
let mostRecent = deviceMetrics?.lastObject as? TelemetryEntity
BatteryLevelCompact(batteryLevel: mostRecent?.batteryLevel, font: .caption2, iconFont: .callout, color: .accentColor)
BatteryLevelCompact(batteryLevel: mostRecent?.batteryLevel, font: .caption, iconFont: .callout, color: .accentColor)
}
}
VStack(alignment: .leading) {
HStack {
Text(node.user?.longName ?? "unknown".localized)
.fontWeight(.medium)
.font(.callout)
.font(.headline)
if node.user?.vip ?? false {
Spacer()
Image(systemName: "star.fill")
@ -43,19 +43,19 @@ struct NodeListItem: View {
if connected {
HStack {
Image(systemName: "antenna.radiowaves.left.and.right.circle.fill")
.font(.footnote)
.font(.callout)
.symbolRenderingMode(.hierarchical)
.foregroundColor(.green)
Text("connected").font(.caption)
Text("connected").font(.callout)
}
}
HStack {
Image(systemName: node.isOnline ? "checkmark.circle.fill" : "moon.circle.fill")
.font(.footnote)
.font(.callout)
.symbolRenderingMode(.hierarchical)
.foregroundColor(node.isOnline ? .green : .orange)
Text(node.lastHeard?.formatted() ?? "unknown".localized)
.font(.caption)
.font(.callout)
}
if node.positions?.count ?? 0 > 0 && connectedNode != node.num {
HStack {
@ -65,19 +65,19 @@ struct NodeListItem: View {
let nodeCoord = CLLocation(latitude: lastPostion.nodeCoordinate!.latitude, longitude: lastPostion.nodeCoordinate!.longitude)
let metersAway = nodeCoord.distance(from: myCoord)
Image(systemName: "lines.measurement.horizontal")
.font(.footnote)
.font(.callout)
.symbolRenderingMode(.hierarchical)
DistanceText(meters: metersAway).font(.caption)
DistanceText(meters: metersAway).font(.callout)
}
}
}
if node.channel > 0 {
HStack {
Image(systemName: "fibrechannel")
.font(.footnote)
.font(.callout)
.symbolRenderingMode(.hierarchical)
Text("Channel: \(node.channel)")
.font(.caption)
.font(.callout)
}
}

View file

@ -22,7 +22,9 @@ struct AdminMessageList: View {
var body: some View {
let localeDateFormat = DateFormatter.dateFormat(fromTemplate: "yyMMddjmmssa", options: 0, locale: Locale.current)
let localeTimeFormat = DateFormatter.dateFormat(fromTemplate: "h:mm:ss a", options: 0, locale: Locale.current)
let dateFormatString = (localeDateFormat ?? "MM/dd/YY j:mm:ss a")
let timeFormatString = (localeTimeFormat ?? "h:mm:ss a")
List {
if user != nil {
@ -55,7 +57,7 @@ struct AdminMessageList: View {
}
if am.receivedACK && am.ackTimestamp > 0 {
Text(" \(Date(timeIntervalSince1970: TimeInterval(am.ackTimestamp)).formattedDate(format: "h:mm:ss a"))")
Text(" \(Date(timeIntervalSince1970: TimeInterval(am.ackTimestamp)).formattedDate(format: timeFormatString))")
.foregroundColor(am.realACK ? .gray : .orange)
.font(.caption2)
}