mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 21:36:17 +00:00
bump version
remove send Ax256 change powerplug.portrait to power reduce time from 10_000 to 1_000 remove sending print add shellview
This commit is contained in:
41
ShhShell/Views/Terminal/ShellView.swift
Normal file
41
ShhShell/Views/Terminal/ShellView.swift
Normal file
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ShellView.swift
|
||||
// ShhShell
|
||||
//
|
||||
// Created by neon443 on 22/06/2025.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ShellView: View {
|
||||
@ObservedObject var handler: SSHHandler
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
ZStack {
|
||||
TerminalController(handler: handler)
|
||||
}
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
Button() {
|
||||
if handler.connected {
|
||||
handler.disconnect()
|
||||
} else {
|
||||
handler.connect()
|
||||
}
|
||||
} label: {
|
||||
if handler.connected {
|
||||
Label("Disconnect", image: "xmark.square.fill")
|
||||
} else {
|
||||
Label("Connect", image: "power")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ShellView(handler: SSHHandler(host: Host.debug))
|
||||
}
|
||||
Reference in New Issue
Block a user