Skip to content

Commit 1b6c949

Browse files
committed
fix: prompt for sign in when toggling coder connect on
1 parent ebcb698 commit 1b6c949

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,14 @@ struct VPNMenu<VPN: VPNService, FS: FileSyncDaemon>: View {
117117
}
118118

119119
private var vpnDisabled: Bool {
120+
// Always enabled if signed out, as that will open the sign in window
121+
state.hasSession && (
120122
vpn.state == .connecting ||
121123
vpn.state == .disconnecting ||
122124
// Prevent starting the VPN before the user has approved the system extension.
123125
vpn.state == .failed(.systemExtensionError(.needsUserApproval)) ||
124126
// Prevent starting the VPN without a VPN configuration.
125-
vpn.state == .failed(.networkExtensionError(.unconfigured))
127+
vpn.state == .failed(.networkExtensionError(.unconfigured)))
126128
}
127129
}
128130

0 commit comments

Comments
 (0)