Changed SSH key comment

Signed-off-by: Alex Lavallee <73203142+lavalleeale@users.noreply.github.com>
This commit is contained in:
Alex Lavallee 2020-11-29 15:40:52 -08:00
parent 6c3748b6bf
commit 3eaf155071
No known key found for this signature in database
GPG Key ID: FF636FB2C9E94B03
1 changed files with 4 additions and 4 deletions

View File

@ -21,19 +21,19 @@ struct SecretDetailView<SecretType: Secret>: View {
.frame(minHeight: 200, maxHeight: .infinity)
}
var dashedKeyName: String {
secret.name.replacingOccurrences(of: " ", with: "-")
var dashedUserName: String {
NSUserName().replacingOccurrences(of: " ", with: "-")
}
var dashedHostName: String {
["secretive", Host.current().localizedName, "local"]
[Host.current().localizedName, "local"]
.compactMap { $0 }
.joined(separator: ".")
.replacingOccurrences(of: " ", with: "-")
}
var keyString: String {
keyWriter.openSSHString(secret: secret, comment: "\(dashedKeyName)@\(dashedHostName)")
keyWriter.openSSHString(secret: secret, comment: "\(dashedUserName)@\(dashedHostName)")
}
func copy() {