From ca32a09a4cd0ba0303a0b62e40ac250fed01def4 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 26 Mar 2026 18:27:50 +1100 Subject: [PATCH] feat: implement connection status indicator text --- .../Coder-Desktop/Views/VPN/VPNMenu.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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) }