diff --git a/Secretive/Views/SecretDetailView.swift b/Secretive/Views/SecretDetailView.swift index 32411a4..f8c7d12 100644 --- a/Secretive/Views/SecretDetailView.swift +++ b/Secretive/Views/SecretDetailView.swift @@ -24,8 +24,8 @@ struct SecretDetailView: View { .frame(minHeight: 200, maxHeight: .infinity) } - var dashedUserName: String { - NSUserName().replacingOccurrences(of: " ", with: "-") + var dashedKeyName: String { + secret.name.replacingOccurrences(of: " ", with: "-") } var dashedHostName: String { @@ -36,7 +36,7 @@ struct SecretDetailView: View { } var keyString: String { - keyWriter.openSSHString(secret: secret, comment: "\(dashedUserName)@\(dashedHostName)") + keyWriter.openSSHString(secret: secret, comment: "\(dashedKeyName)@\(dashedHostName)") } func copy() {