File tree Expand file tree Collapse file tree
Coder-Desktop/Coder-Desktop/Views/VPN Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,20 @@ struct VPNMenu<VPN: VPNService, FS: FileSyncDaemon>: View {
99 @Environment ( \. openWindow) private var openWindow
1010
1111 let inspection = Inspection < Self > ( )
12+ var statusText : String {
13+ switch vpn. state {
14+ case . connected:
15+ return " Connected "
16+ case . connecting:
17+ return " Connecting "
18+ case . disabled:
19+ return " Disconnected "
20+ case . disconnecting:
21+ return " Disconnecting "
22+ default :
23+ return " Unknown "
24+ }
25+ }
1226
1327 var body : some View {
1428 // Main stack
@@ -38,6 +52,7 @@ struct VPNMenu<VPN: VPNService, FS: FileSyncDaemon>: View {
3852 . frame ( maxWidth: . infinity, alignment: . leading)
3953 . font ( . body. bold ( ) )
4054 . foregroundColor ( . primary)
55+ Text ( statusText)
4156 } . toggleStyle ( . switch)
4257 . disabled ( vpnDisabled)
4358 }
You can’t perform that action at this time.
0 commit comments