Add store and forward router bool

This commit is contained in:
Garth Vander Houwen 2024-02-10 17:43:01 -08:00
parent a89490097f
commit aba2c9bece
2 changed files with 14 additions and 0 deletions

View file

@ -31,6 +31,10 @@ extension NodeInfoEntity {
return traceRoutes?.count ?? 0 > 0
}
var isStoreForwardRouter: Bool {
return storeForwardConfig?.isRouter ?? false
}
var isOnline: Bool {
let fifteenMinutesAgo = Calendar.current.date(byAdding: .minute, value: -15, to: Date())
if lastHeard?.compare(fifteenMinutesAgo!) == .orderedDescending {

View file

@ -60,6 +60,16 @@ struct NodeListItem: View {
Text("Role: \(role?.name ?? "unknown".localized)")
.font(.callout)
}
if node.isStoreForwardRouter {
HStack {
Image(systemName: "envelope.arrow.triangle.branch")
.font(.callout)
.symbolRenderingMode(.hierarchical)
Text("storeforward".localized)
.font(.callout)
}
}
if node.positions?.count ?? 0 > 0 && connectedNode != node.num {
HStack {
let lastPostion = node.positions!.reversed()[0] as! PositionEntity