aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Zip importing: importFromFile should take a completionHandlerRoopesh Chander2018-12-122-7/+13
| | | | | | | Deletion of the being-imported file should be done in the completionHandler. Signed-off-by: Roopesh Chander <roop@roopc.net>
* ErrorPresenter: Support onPresented for showErrorAlert(title:,message:)Roopesh Chander2018-12-121-3/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* State restoration: Don't create duplicate mainVC and tunnelsListVCRoopesh Chander2018-12-111-6/+1
| | | | | | | | | | | | | | | | | | | This creates a duplicate tunnels manager, leading to problems tracking tunnel statuses. To reproduce the bug that this commit fixes, you can do the following: 1. Remove all tunnels 2. Run in Xcode 3. Import zip with ~10 tunnels 4. Stop app in Xcode 5. Run in Xcode 6. Turn on 1st tunnel, after it's on, turn off Turn on 2nd tunnel, after it's on, turn off ... After 6-8 tunnels, the spinner doesn't show up, indicating that the status is not being tracked. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove the feature of waiting for another tunnel to deactivateRoopesh Chander2018-12-112-4/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Allow turning off the status switch of a waiting tunnelRoopesh Chander2018-12-112-2/+2
| | | | | | It just means the waiting should be cancelled Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: alertText() can be nilRoopesh Chander2018-12-111-1/+1
| | | | | | Indicating that no alert is to be shown for that error. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels list: Fix AutoLayout error during deletion of a tunnelRoopesh Chander2018-12-101-2/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Dynamic Type supportRoopesh Chander2018-12-101-2/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: Dynamic Type supportRoopesh Chander2018-12-101-6/+56
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel detail: Dynamic Type supportRoopesh Chander2018-12-102-6/+57
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels list: Dynamic Type support for the add button at the centerRoopesh Chander2018-12-091-0/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels list: Dynamic Type support for the table viewRoopesh Chander2018-12-091-6/+12
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Export log: Perform file operations in a background threadRoopesh Chander2018-12-081-26/+31
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* On-Demand: TunnelViewModel: Make activate-on-demand methods staticRoopesh Chander2018-12-081-2/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* On-Demand: Move detail text to TunnelViewModelRoopesh Chander2018-12-081-20/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Make strings consistentJason A. Donenfeld2018-12-072-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* State restoration: Restore tunnel detail viewRoopesh Chander2018-12-074-1/+72
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Main VC: No need to refresh statuses if the tunnelsManager isn't initialized yetRoopesh Chander2018-12-071-4/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels list: Deselect rows correctlyRoopesh Chander2018-12-071-1/+7
| | | | | | Do it like UITableViewController.clearsSelectionOnViewWillAppear would. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Exporting configs as zip should open document pickerRoopesh Chander2018-12-071-5/+3
| | | | | | | | Because: - Exporting UI should be consistent with importing UI - UIActivityVC takes a long time to open Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Use ErrorPresenter.showErrorAlert() instead of per-VC showErrorAlert() methodsRoopesh Chander2018-12-074-38/+9
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Use WireGuardAppError and WireGuardResult throughout the appRoopesh Chander2018-12-072-31/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Introduce a WireGuardAppError protocol to manage errorsRoopesh Chander2018-12-071-28/+2
| | | | | | The alert strings shall be located next to where the errors are declared. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error handling: Cleanup Tunnels Manager errorsRoopesh Chander2018-12-074-31/+45
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Error presenter: Always handle the passed errorRoopesh Chander2018-12-071-4/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel detail: Cell status switch should be toggled only after the alert presentation completesRoopesh Chander2018-12-071-4/+5
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Refactoring: Consolidate file deletion into a separate functionRoopesh Chander2018-12-072-17/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Add timestamp to exported logRoopesh Chander2018-12-041-1/+8
| | | | | | And remove the exported log afterwards. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Refactor out VPN-handling stuff from tunnels list VC to the main VCRoopesh Chander2018-12-033-64/+86
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: Error out when tunnel activation fails because there's no internetRoopesh Chander2018-12-032-1/+14
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Settings: Export log fileRoopesh Chander2018-12-021-3/+52
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* It's 'WiFi', not 'Wifi'Roopesh Chander2018-11-282-6/+6
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Exporting: Export to zip in a background threadRoopesh Chander2018-11-151-10/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Exporting: Refactor out zip exporting into a separate classRoopesh Chander2018-11-152-21/+17
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Exporting: No need to check for duplicate names - we disallow it at creation time itselfRoopesh Chander2018-11-151-9/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Importing: Import from zip in a background threadRoopesh Chander2018-11-151-12/+10
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Importing: Refactor out zip importing into a separate classRoopesh Chander2018-11-142-43/+17
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel detail: Show VPN-on-demand informationRoopesh Chander2018-11-121-2/+67
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnels manager: Keep track of NETunnelProviderManager's isOnDemandEnabled propertyRoopesh Chander2018-11-121-2/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: Update for VPN-on-demand changesRoopesh Chander2018-11-121-14/+26
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit, Tunnel view model: UI for providing On-Demand activation optionsRoopesh Chander2018-11-111-6/+109
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: When activating while another tunnel is active, deactivate the other tunnelRoopesh Chander2018-11-102-15/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* TunnelsManager: startDeactivation() need not take a completion handlerRoopesh Chander2018-11-102-6/+2
| | | | | | Because the completion handler pattern doesn't fit in this case. Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: There are no DNS errors to handle in the app nowRoopesh Chander2018-11-101-2/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* VPN: Refresh tunnel statuses when app gets to the foregroundRoopesh Chander2018-11-092-0/+14
| | | | | | Because the tunnel could've be activated from iOS Settings now Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove unused codeRoopesh Chander2018-11-092-24/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* NE: When there's an error starting the tunnel, show it to the user using displayMessage()Roopesh Chander2018-11-091-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Move logic to extension: .resolvingEndpointDomains is not longer a valid statusRoopesh Chander2018-11-082-4/+0
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Tunnel edit: While preparing for reuse, should make onValueBeingEdited nil as wellRoopesh Chander2018-11-081-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* iPad: Ensure we set sourceRect for all cases where we use sourceViewRoopesh Chander2018-11-073-1/+3
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>