diff options
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift index 2c7f25a..adb32aa 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -201,6 +201,14 @@ class TunnelDetailTableViewController: NSViewController { presentAsSheet(tunnelEditVC) } + @objc func handleToggleActiveStatusAction() { + if tunnel.status == .inactive { + tunnelsManager.startActivation(of: tunnel) + } else if tunnel.status == .active { + tunnelsManager.startDeactivation(of: tunnel) + } + } + @objc func statusCheckboxToggled(sender: AnyObject?) { guard let statusCheckbox = sender as? NSButton else { return } if statusCheckbox.state == .on { |