mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #778 from meshtastic/node-detail-role
Add device role to node details
This commit is contained in:
commit
ff903d58f3
1 changed files with 13 additions and 0 deletions
|
|
@ -82,6 +82,19 @@ struct NodeDetail: View {
|
|||
}
|
||||
}
|
||||
|
||||
if let role = node.user?.role, let deviceRole = DeviceRoles(rawValue: Int(role)) {
|
||||
HStack {
|
||||
Label {
|
||||
Text("Role")
|
||||
} icon: {
|
||||
Image(systemName: deviceRole.systemName)
|
||||
.symbolRenderingMode(.multicolor)
|
||||
}
|
||||
Spacer()
|
||||
Text(deviceRole.name)
|
||||
}
|
||||
}
|
||||
|
||||
if let dm = node.telemetries?.filtered(using: NSPredicate(format: "metricsType == 0")).lastObject as? TelemetryEntity, dm.uptimeSeconds > 0 {
|
||||
HStack {
|
||||
Label {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue