mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-11-22 05:27:28 +00:00
Better copy overlay
This commit is contained in:
parent
609c1c1bbb
commit
bf38890d09
@ -21,19 +21,22 @@ struct SecretDetailView<SecretType: Secret>: View {
|
|||||||
}
|
}
|
||||||
Spacer().frame(height: 10)
|
Spacer().frame(height: 10)
|
||||||
GroupBox(label: Text("Public Key")) {
|
GroupBox(label: Text("Public Key")) {
|
||||||
|
VStack {
|
||||||
Text(keyWriter.openSSHString(secret: secret))
|
Text(keyWriter.openSSHString(secret: secret))
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.frame(minWidth: 150, maxWidth: .infinity)
|
.frame(minWidth: 150, maxWidth: .infinity)
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Button(action: copy) {
|
||||||
|
Text("Copy")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
.onDrag {
|
.onDrag {
|
||||||
return NSItemProvider(item: NSData(data: self.keyString.data(using: .utf8)!), typeIdentifier: kUTTypeUTF8PlainText as String)
|
return NSItemProvider(item: NSData(data: self.keyString.data(using: .utf8)!), typeIdentifier: kUTTypeUTF8PlainText as String)
|
||||||
}
|
}
|
||||||
.overlay(
|
|
||||||
Button(action: copy) {
|
|
||||||
Text("Copy")
|
|
||||||
}.padding(),
|
|
||||||
alignment: .bottomTrailing)
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
}.padding()
|
}.padding()
|
||||||
|
Loading…
Reference in New Issue
Block a user