diff --git a/Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift b/Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift index a48be35..dc26bf0 100644 --- a/Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift +++ b/Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift @@ -9,6 +9,20 @@ struct VPNMenu: View { @Environment(\.openWindow) private var openWindow let inspection = Inspection() + var statusText: String { + switch vpn.state { + case .connected: + return "Connected" + case .connecting: + return "Connecting" + case .disabled: + return "Disconnected" + case .disconnecting: + return "Disconnecting" + default: + return "Unknown" + } + } var body: some View { // Main stack @@ -38,6 +52,7 @@ struct VPNMenu: View { .frame(maxWidth: .infinity, alignment: .leading) .font(.body.bold()) .foregroundColor(.primary) + Text(statusText) }.toggleStyle(.switch) .disabled(vpnDisabled) }