mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
simplified the red&yellow traffic lights
removed the green one idk what to do w it improved teh lights themselves, they have equal spacing on all sides, including padding fixed background of the titlebar/trafffic light header hide the session title in the tab if its active if not active show it ANIMATIONS!
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user