Merge pull request #1252 from RCGV1/Expose-public-key

Added copying public key button
This commit is contained in:
Garth Vander Houwen 2025-06-12 09:08:13 -07:00 committed by GitHub
commit 193512ee78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {