Introduce initial UI for connecting to networks
This commit is contained in:
parent
51fd638b72
commit
0fe630878d
33 changed files with 1458 additions and 321 deletions
37
Apple/App/TunnelStatusView.swift
Normal file
37
Apple/App/TunnelStatusView.swift
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import SwiftUI
|
||||
|
||||
struct TunnelStatusView: View {
|
||||
@Environment(\.tunnel)
|
||||
var tunnel: any Tunnel
|
||||
|
||||
var body: some View {
|
||||
Text(tunnel.status.description)
|
||||
}
|
||||
}
|
||||
|
||||
extension TunnelStatus: CustomStringConvertible {
|
||||
var description: String {
|
||||
switch self {
|
||||
case .unknown:
|
||||
"Unknown"
|
||||
case .permissionRequired:
|
||||
"Permission Required"
|
||||
case .disconnected:
|
||||
"Disconnected"
|
||||
case .disabled:
|
||||
"Disabled"
|
||||
case .connecting:
|
||||
"Connecting…"
|
||||
case .connected:
|
||||
"Connected"
|
||||
case .disconnecting:
|
||||
"Disconnecting…"
|
||||
case .reasserting:
|
||||
"Reasserting…"
|
||||
case .invalid:
|
||||
"Invalid"
|
||||
case .configurationReadWriteFailed:
|
||||
"System Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue