mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
made disconnct async rewrote async reading from ssh usleep -> Task.sleep() to prevent blocking
37 lines
611 B
Swift
37 lines
611 B
Swift
//
|
|
// ContentView.swift
|
|
// ShhShell
|
|
//
|
|
// Created by neon443 on 02/06/2025.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@ObservedObject var handler: SSHHandler
|
|
@ObservedObject var keyManager: KeyManager
|
|
|
|
var body: some View {
|
|
TabView {
|
|
HostsView(
|
|
handler: handler,
|
|
keyManager: keyManager
|
|
)
|
|
.tabItem {
|
|
Label("Hosts", systemImage: "server.rack")
|
|
}
|
|
KeyManagerView(keyManager: keyManager)
|
|
.tabItem {
|
|
Label("Keys", systemImage: "key.2.on.ring")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
ContentView(
|
|
handler: SSHHandler(host: Host.debug),
|
|
keyManager: KeyManager()
|
|
)
|
|
}
|