From 27e75285fe99e41bfa9acb4af641142dfb8460e7 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Fri, 4 Jul 2025 15:56:16 +0100 Subject: [PATCH] re add the fallback thing,its what adds it to container lol --- ShhShell/Views/Terminal/SSHTerminalDelegate.swift | 2 -- ShhShell/Views/Terminal/ShellTabView.swift | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift index 4bdee37..acbe0b9 100644 --- a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift +++ b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift @@ -37,7 +37,6 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina await MainActor.run { self.getTerminal().resetToInitialState() for line in scrollback { - print("scrollbak \(line)") self.feed(text: line) } self.setNeedsLayout() @@ -50,7 +49,6 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina while handler.connected { if let read = handler.readFromChannel() { await MainActor.run { - print("live \(read)F") self.feed(text: read) } } else { diff --git a/ShhShell/Views/Terminal/ShellTabView.swift b/ShhShell/Views/Terminal/ShellTabView.swift index e35f6e1..06423d3 100644 --- a/ShhShell/Views/Terminal/ShellTabView.swift +++ b/ShhShell/Views/Terminal/ShellTabView.swift @@ -147,12 +147,19 @@ struct ShellTabView: View { .id(selectedID) .transition(.opacity) } else { - Text("No Session") + if let handler { + ShellView( + handler: handler, + hostsManager: hostsManager + ) .onAppear { if selectedID == nil { - selectedID = handler?.sessionID + selectedID = handler.sessionID } } + } else { + Text("No Session") + } } } }