mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-07 11:35:53 +00:00
Add manual kill button
This commit is contained in:
parent
6974e57f15
commit
d20b7e6656
1 changed files with 36 additions and 16 deletions
|
|
@ -689,28 +689,48 @@ private struct PortConfigurationView: View {
|
|||
.foregroundColor(.orange)
|
||||
}
|
||||
|
||||
if !conflict.alternativePorts.isEmpty {
|
||||
HStack(spacing: 4) {
|
||||
Text("Try port:")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
HStack(spacing: 8) {
|
||||
if !conflict.alternativePorts.isEmpty {
|
||||
HStack(spacing: 4) {
|
||||
Text("Try port:")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
ForEach(conflict.alternativePorts.prefix(3), id: \.self) { port in
|
||||
Button(String(port)) {
|
||||
serverPort = String(port)
|
||||
portNumber = port
|
||||
restartServerWithNewPort(port)
|
||||
ForEach(conflict.alternativePorts.prefix(3), id: \.self) { port in
|
||||
Button(String(port)) {
|
||||
serverPort = String(port)
|
||||
portNumber = port
|
||||
restartServerWithNewPort(port)
|
||||
}
|
||||
.buttonStyle(.link)
|
||||
.font(.caption)
|
||||
}
|
||||
|
||||
Button("Choose...") {
|
||||
showPortPicker()
|
||||
}
|
||||
.buttonStyle(.link)
|
||||
.font(.caption)
|
||||
}
|
||||
|
||||
Button("Choose...") {
|
||||
showPortPicker()
|
||||
}
|
||||
.buttonStyle(.link)
|
||||
.font(.caption)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button {
|
||||
Task {
|
||||
await forceQuitConflictingProcess(conflict)
|
||||
}
|
||||
} label: {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.font(.caption)
|
||||
Text("Kill Process")
|
||||
.font(.caption)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.controlSize(.small)
|
||||
.tint(.red)
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
|
|
|
|||
Loading…
Reference in a new issue