mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add store and forward router bool
This commit is contained in:
parent
a89490097f
commit
aba2c9bece
2 changed files with 14 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue