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 4fb637eb11
No known key found for this signature in database
GPG Key ID: 8F315EDD6F62C73B

View File

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