diff options
author | Roopesh Chander <roop@roopc.net> | 2019-03-10 16:32:26 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-03-10 19:22:33 +0530 |
commit | db6f0729c69a580357e194a454de19eaa6f3bd39 (patch) | |
tree | 02e1a3f2228a40b4c71f10576ffa624a09311faf /WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift | |
parent | wireguard-go-bridge: use system go installation (diff) | |
download | wireguard-apple-db6f0729c69a580357e194a454de19eaa6f3bd39.tar.xz wireguard-apple-db6f0729c69a580357e194a454de19eaa6f3bd39.zip |
macOS: Generalize NoTunnelsDetailVC into a ButtonedDetailVC
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift index 8d28157..5806547 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift @@ -84,7 +84,12 @@ extension ManageTunnelsRootViewController: TunnelsListTableViewControllerDelegat } func tunnelsListEmpty() { - let noTunnelsVC = NoTunnelsDetailViewController(tunnelsManager: tunnelsManager) + let noTunnelsVC = ButtonedDetailViewController() + noTunnelsVC.setButtonTitle(tr("macButtonImportTunnels")) + noTunnelsVC.onButtonClicked = { [weak self] in + guard let self = self else { return } + ImportPanelPresenter.presentImportPanel(tunnelsManager: self.tunnelsManager, sourceVC: self) + } setTunnelDetailContentVC(noTunnelsVC) self.tunnelDetailVC = nil } |