mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-10 12:05:53 +00:00
ios fixes
This commit is contained in:
parent
e526d18959
commit
91eb87e3ff
3 changed files with 6 additions and 56 deletions
|
|
@ -39,8 +39,7 @@ struct TerminalView: View {
|
|||
.navigationTitle(session.displayName)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar(.visible, for: .bottomBar)
|
||||
.toolbarBackground(.visible, for: .bottomBar)
|
||||
.toolbarBackground(Theme.Colors.cardBackground, for: .bottomBar)
|
||||
.toolbarBackground(.automatic, for: .bottomBar)
|
||||
.toolbar {
|
||||
navigationToolbarItems
|
||||
bottomToolbarItems
|
||||
|
|
@ -205,9 +204,6 @@ struct TerminalView: View {
|
|||
ToolbarItemGroup(placement: .bottomBar) {
|
||||
terminalSizeIndicator
|
||||
Spacer()
|
||||
connectionStatusIndicator
|
||||
sessionStatusIndicator
|
||||
pidIndicator
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -387,60 +383,13 @@ struct TerminalView: View {
|
|||
@ViewBuilder
|
||||
private var terminalSizeIndicator: some View {
|
||||
if viewModel.terminalCols > 0 && viewModel.terminalRows > 0 {
|
||||
HStack(spacing: Theme.Spacing.extraSmall) {
|
||||
Image(systemName: "rectangle.split.3x1")
|
||||
.font(.caption)
|
||||
.foregroundColor(Theme.Colors.terminalForeground.opacity(0.5))
|
||||
Text("\(viewModel.terminalCols) × \(viewModel.terminalRows)")
|
||||
.font(Theme.Typography.terminalSystem(size: 12))
|
||||
.foregroundColor(Theme.Colors.terminalForeground.opacity(0.7))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var connectionStatusIndicator: some View {
|
||||
HStack(spacing: 4) {
|
||||
if viewModel.isConnecting {
|
||||
ProgressView()
|
||||
.progressViewStyle(CircularProgressViewStyle())
|
||||
.scaleEffect(0.5)
|
||||
.frame(width: 12, height: 12)
|
||||
} else {
|
||||
Image(systemName: viewModel.isConnected ? "wifi" : "wifi.slash")
|
||||
.font(.system(size: 10))
|
||||
.foregroundColor(viewModel.isConnected ? Theme.Colors.successAccent : Theme.Colors.errorAccent)
|
||||
}
|
||||
Text(viewModel.isConnecting ? "Connecting" : (viewModel.isConnected ? "Connected" : "Disconnected"))
|
||||
.font(Theme.Typography.terminalSystem(size: 10))
|
||||
.foregroundColor(viewModel.isConnected ? Theme.Colors.successAccent : Theme.Colors.errorAccent)
|
||||
}
|
||||
}
|
||||
|
||||
private var sessionStatusIndicator: some View {
|
||||
HStack(spacing: 4) {
|
||||
Circle()
|
||||
.fill(session.isRunning ? Theme.Colors.successAccent : Theme.Colors.terminalForeground.opacity(0.3))
|
||||
.frame(width: 6, height: 6)
|
||||
Text(session.isRunning ? "Running" : "Exited")
|
||||
.font(Theme.Typography.terminalSystem(size: 12))
|
||||
.foregroundColor(session.isRunning ? Theme.Colors.successAccent : Theme.Colors.terminalForeground.opacity(0.5))
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var pidIndicator: some View {
|
||||
if let pid = session.pid {
|
||||
Spacer()
|
||||
Text("PID: \(pid)")
|
||||
.font(Theme.Typography.terminalSystem(size: 12))
|
||||
Text("\(viewModel.terminalCols)×\(viewModel.terminalRows)")
|
||||
.font(Theme.Typography.terminalSystem(size: 11))
|
||||
.foregroundColor(Theme.Colors.terminalForeground.opacity(0.5))
|
||||
.onTapGesture {
|
||||
UIPasteboard.general.string = String(pid)
|
||||
HapticFeedback.notification(.success)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private var recordingView: some View {
|
||||
HStack(spacing: 4) {
|
||||
Circle()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ struct SessionTests {
|
|||
|
||||
// Assert
|
||||
#expect(session.id == "test-123")
|
||||
#expect(session.command == "/bin/bash")
|
||||
#expect(session.command == ["/bin/bash"])
|
||||
#expect(session.workingDir == "/Users/test")
|
||||
#expect(session.name == "Test Session")
|
||||
#expect(session.status == .running)
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ struct APIClientTests {
|
|||
}
|
||||
|
||||
@Test("Handles 401 unauthorized error")
|
||||
@MainActor
|
||||
func handle401Error() async throws {
|
||||
// Arrange
|
||||
MockURLProtocol.requestHandler = { request in
|
||||
|
|
|
|||
Loading…
Reference in a new issue