hostsview: add plus button

add more stuff to Host
prevent host from changin in debug
prettify the list - show uuid if no address set
save changes to Host when closing connectionView
fix connectionView button being disabled sometimes
use a different button to add a host instead of the toolbar one when its empty bc of ! unwrap crash
animations on adding/removing hosts
This commit is contained in:
neon443
2025-06-20 15:33:01 +01:00
parent be37c4efb9
commit 690d7ff95a
4 changed files with 77 additions and 31 deletions

View File

@@ -19,19 +19,16 @@ class SSHHandler: ObservableObject {
@Published var authorized: Bool = false
@Published var testSuceeded: Bool = false
@Published var host: HostPr
@Published var host: Host
@Published var terminal: String = ""
private let userDefaults = NSUbiquitousKeyValueStore.default
private let logger = Logger(subsystem: "xy", category: "sshHandler")
init(
host: HostPr
host: Host
) {
self.host = host
#if DEBUG
self.host = Host.debug
#endif
}
func getHostkey() -> Data? {