Added copying public key button

This commit is contained in:
Benjamin Faershtein 2025-06-11 10:37:50 -07:00
parent 6e5c045226
commit 5da837701b

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 {