mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix crash when opensshpubkey cant be made
fix expand button not enabled sometimes
This commit is contained in:
@@ -52,7 +52,12 @@ struct Keypair: KeypairProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var base64Pubkey: String {
|
var base64Pubkey: String {
|
||||||
String(openSshPubkey.split(separator: " ")[1])
|
let split = openSshPubkey.split(separator: " ")
|
||||||
|
if split.count >= 2 {
|
||||||
|
return String(split[1])
|
||||||
|
} else {
|
||||||
|
return "Error creating OpenSSH Publickey"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var base64Privkey: String {
|
var base64Privkey: String {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ struct RecentsView: View {
|
|||||||
.foregroundStyle(hostsManager.tint)
|
.foregroundStyle(hostsManager.tint)
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.disabled(historyLimit != 0)
|
.disabled(historyLimit >= hostsManager.history.count)
|
||||||
.padding(.trailing, 10)
|
.padding(.trailing, 10)
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
|||||||
Reference in New Issue
Block a user