diff --git a/ShhShell/Views/Misc/TrafficLights.swift b/ShhShell/Views/Misc/TrafficLights.swift index 8faaaf9..f29e2c2 100644 --- a/ShhShell/Views/Misc/TrafficLights.swift +++ b/ShhShell/Views/Misc/TrafficLights.swift @@ -16,16 +16,10 @@ struct TrafficLightRed: View { ).stColor.suiColor var body: some View { - ZStack { - Image(systemName: "circle.fill") - .resizable().scaledToFit() - .foregroundStyle(background) - Image(systemName: "xmark") - .resizable().scaledToFit() - .bold() - .scaleEffect(0.6) - .foregroundStyle(foreground) - } + Image(systemName: "xmark.circle.fill") + .resizable().scaledToFit() + .symbolRenderingMode(.palette) + .foregroundStyle(foreground, background) } } @@ -38,16 +32,10 @@ struct TrafficLightYellow: View { ).stColor.suiColor var body: some View { - ZStack(alignment: .center) { - Image(systemName: "circle.fill") - .resizable().scaledToFit() - .foregroundStyle(background) - Image(systemName: "minus") - .resizable().scaledToFit() - .bold() - .scaleEffect(0.7) - .foregroundStyle(foreground) - } + Image(systemName: "minus.circle.fill") + .resizable().scaledToFit() + .symbolRenderingMode(.palette) + .foregroundStyle(foreground, background) } } diff --git a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift index 525ea67..a18d5be 100644 --- a/ShhShell/Views/Terminal/SSHTerminalDelegate.swift +++ b/ShhShell/Views/Terminal/SSHTerminalDelegate.swift @@ -30,6 +30,7 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina while handler.connected { if let read = handler.readFromChannel() { await MainActor.run { + print(read) self.feed(text: read) } } else { @@ -48,6 +49,7 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) { self.getTerminal().resetToInitialState() for line in scrollback { + print(line) self.feed(text: line) } self.setNeedsLayout() diff --git a/ShhShell/Views/Terminal/ShellTabView.swift b/ShhShell/Views/Terminal/ShellTabView.swift index 27afcd2..eac8970 100644 --- a/ShhShell/Views/Terminal/ShellTabView.swift +++ b/ShhShell/Views/Terminal/ShellTabView.swift @@ -25,7 +25,7 @@ struct ShellTabView: View { background .ignoresSafeArea(.all) GeometryReader { geo in - VStack { + VStack(spacing: 0) { let oneTabWidth = max(60, (geo.size.width)/CGFloat(container.sessionIDs.count)) HStack(alignment: .center, spacing: 10) { @@ -41,17 +41,16 @@ struct ShellTabView: View { } label: { TrafficLightYellow() } - Button() { - print("get out of fullscreen idk??") - } label: { - TrafficLightGreen() - } Spacer() Text(container.sessions[selectedID ?? UUID()]?.handler.title ?? "title") + .bold() + .monospaced() Spacer() } + .padding(.horizontal, 10) + .padding(.bottom, 10) + .background(ansi7, ignoresSafeAreaEdges: .all) .frame(height: 30) - .padding(.horizontal) HStack(alignment: .center, spacing: 0) { ScrollView(.horizontal, showsIndicators: false) { @@ -64,14 +63,18 @@ struct ShellTabView: View { HStack { Spacer() VStack { - Text(container.sessions[id]!.handler.title) - .monospaced() - .foregroundStyle(foreground) - .bold(selected) + if !selected { + Text(container.sessions[id]!.handler.title) + .monospaced() + .foregroundStyle(foreground) + .opacity(0.7) + .font(.caption) + } Text(container.sessions[id]!.handler.host.description) - .foregroundStyle(foreground.opacity(0.7)) + .foregroundStyle(foreground) + .opacity(selected ? 1 : 0.7) .monospaced() - .font(.caption) + .bold(selected) } Spacer() }