mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Fixes ngrok
This commit is contained in:
parent
45fd5c476e
commit
60baba5b75
1 changed files with 10 additions and 38 deletions
|
|
@ -533,20 +533,12 @@ private struct NgrokIntegrationSection: View {
|
||||||
if isStartingNgrok {
|
if isStartingNgrok {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
.scaleEffect(0.7)
|
.scaleEffect(0.7)
|
||||||
} else if let status = ngrokStatus {
|
} else if ngrokStatus != nil {
|
||||||
switch status {
|
|
||||||
case .connected(let url):
|
|
||||||
Image(systemName: "checkmark.circle.fill")
|
Image(systemName: "checkmark.circle.fill")
|
||||||
.foregroundColor(.green)
|
.foregroundColor(.green)
|
||||||
Text("Connected")
|
Text("Connected")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
case .disconnected:
|
|
||||||
EmptyView()
|
|
||||||
case .error:
|
|
||||||
Image(systemName: "exclamationmark.triangle.fill")
|
|
||||||
.foregroundColor(.red)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -562,8 +554,8 @@ private struct NgrokIntegrationSection: View {
|
||||||
)
|
)
|
||||||
|
|
||||||
// Public URL display
|
// Public URL display
|
||||||
if let status = ngrokStatus, case .connected(let url) = status {
|
if let status = ngrokStatus {
|
||||||
PublicURLView(url: url)
|
PublicURLView(url: status.publicUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error display
|
// Error display
|
||||||
|
|
@ -650,7 +642,8 @@ private struct AuthTokenField: View {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ngrokService.saveAuthToken(ngrokAuthToken) {
|
ngrokService.authToken = ngrokAuthToken
|
||||||
|
if ngrokService.authToken != nil {
|
||||||
ngrokTokenPresent = true
|
ngrokTokenPresent = true
|
||||||
tokenSaveError = nil
|
tokenSaveError = nil
|
||||||
isTokenRevealed = false
|
isTokenRevealed = false
|
||||||
|
|
@ -717,27 +710,6 @@ private struct ErrorView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Dashboard Access Mode
|
|
||||||
|
|
||||||
enum DashboardAccessMode: String, CaseIterable {
|
|
||||||
case localhost = "localhost"
|
|
||||||
case network = "network"
|
|
||||||
|
|
||||||
var displayName: String {
|
|
||||||
switch self {
|
|
||||||
case .localhost: "Localhost Only"
|
|
||||||
case .network: "Network"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var bindAddress: String {
|
|
||||||
switch self {
|
|
||||||
case .localhost: "127.0.0.1"
|
|
||||||
case .network: "0.0.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Previews
|
// MARK: - Previews
|
||||||
|
|
||||||
struct DashboardSettingsView_Previews: PreviewProvider {
|
struct DashboardSettingsView_Previews: PreviewProvider {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue