mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
better server switch animation
This commit is contained in:
parent
b5989d0196
commit
73b8d899e0
1 changed files with 11 additions and 8 deletions
|
|
@ -304,8 +304,8 @@ private struct ServerSection: View {
|
||||||
.fill(isServerHealthy ? .green : (isServerRunning ? .orange : .red))
|
.fill(isServerHealthy ? .green : (isServerRunning ? .orange : .red))
|
||||||
.frame(width: 8, height: 8)
|
.frame(width: 8, height: 8)
|
||||||
if isServerRunning && !isServerHealthy {
|
if isServerRunning && !isServerHealthy {
|
||||||
ProgressView()
|
TextShimmer(text: "...", font: .caption)
|
||||||
.scaleEffect(0.6)
|
.frame(width: 20, height: 8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text(isServerHealthy ? "Server is running on port \(serverPort)" :
|
Text(isServerHealthy ? "Server is running on port \(serverPort)" :
|
||||||
|
|
@ -369,15 +369,18 @@ private struct ServerSection: View {
|
||||||
.disabled(serverManager.isSwitching)
|
.disabled(serverManager.isSwitching)
|
||||||
}
|
}
|
||||||
|
|
||||||
if serverManager.isSwitching {
|
// Server mode switching status with consistent height
|
||||||
HStack {
|
HStack {
|
||||||
ProgressView()
|
if serverManager.isSwitching {
|
||||||
.scaleEffect(0.8)
|
TextShimmer(text: "Switching server mode...", font: .caption)
|
||||||
Text("Switching server mode...")
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
|
} else {
|
||||||
|
Text(" ") // Invisible spacer to maintain height
|
||||||
|
.font(.caption)
|
||||||
|
.opacity(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.frame(height: 16)
|
||||||
|
|
||||||
// Port conflict warning
|
// Port conflict warning
|
||||||
if let conflict = portConflict {
|
if let conflict = portConflict {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue