mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Added copying public key button
This commit is contained in:
parent
6e5c045226
commit
5da837701b
1 changed files with 25 additions and 0 deletions
|
|
@ -122,6 +122,31 @@ struct NodeDetail: View {
|
|||
.textSelection(.enabled)
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
|
||||
if node.user?.keyMatch ?? false {
|
||||
if let publicKey = node.user?.publicKey {
|
||||
HStack {
|
||||
Label {
|
||||
Text("Public Key")
|
||||
} icon: {
|
||||
Image(systemName: "lock.fill")
|
||||
.foregroundColor(.green)
|
||||
}
|
||||
Spacer()
|
||||
Button(action: {
|
||||
context.perform{
|
||||
UIPasteboard.general.string = publicKey.base64EncodedString()
|
||||
}
|
||||
}) {
|
||||
HStack {
|
||||
Image(systemName: "key.horizontal.fill")
|
||||
Text("Copy")
|
||||
}
|
||||
}
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
}
|
||||
}
|
||||
|
||||
if let metadata = node.metadata {
|
||||
HStack {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue