Admin drop down updates to redice the number of nodes.

This commit is contained in:
Garth Vander Houwen 2024-08-19 15:06:53 -07:00
parent 396d2e8495
commit 5852aa31f5
2 changed files with 20 additions and 7 deletions

View file

@ -17261,7 +17261,10 @@
"Remote administration for: %@" : {
},
"Remote: %@" : {
"Remote Legacy Admin: %@" : {
},
"Remote PKI Admin: %@" : {
},
"Remove" : {
@ -17331,7 +17334,10 @@
}
}
},
"Request Admin: %@" : {
"Request Legacy Admin: %@" : {
},
"Request PKI Admin: %@" : {
},
"Requires that there be an accelerometer on your device." : {

View file

@ -364,21 +364,28 @@ struct Settings: View {
.tag(Int(node.num))
} else if node.canRemoteAdmin && UserDefaults.enableAdministration && node.sessionPasskey != nil { /// Nodes using the new PKI system
Label {
Text("Remote: \(node.user?.longName ?? "unknown".localized)")
Text("Remote PKI Admin: \(node.user?.longName ?? "unknown".localized)")
} icon: {
Image(systemName: "av.remote")
}
.tag(Int(node.num))
} else if node.metadata != nil { /// Nodes using the old admin system
} else if !UserDefaults.enableAdministration && node.metadata != nil { /// Nodes using the old admin system
Label {
Text("Remote: \(node.user?.longName ?? "unknown".localized)")
Text("Remote Legacy Admin: \(node.user?.longName ?? "unknown".localized)")
} icon: {
Image(systemName: "av.remote")
}
.tag(Int(node.num))
} else {
} else if UserDefaults.enableAdministration && node.user?.pkiEncrypted ?? false {
Label {
Text("Request Admin: \(node.user?.longName ?? "unknown".localized)")
Text("Request PKI Admin: \(node.user?.longName ?? "unknown".localized)")
} icon: {
Image(systemName: "rectangle.and.hand.point.up.left")
}
.tag(Int(node.num))
} else if !UserDefaults.enableAdministration {
Label {
Text("Request Legacy Admin: \(node.user?.longName ?? "unknown".localized)")
} icon: {
Image(systemName: "rectangle.and.hand.point.up.left")
}