aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix confusing indentationJason A. Donenfeld2018-12-151-3/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* KeyValueCells now share codeEric Kuck2018-12-148-374/+192
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Reorganized project structureEric Kuck2018-12-1417-0/+1
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Most similar views now shared between ViewControllersEric Kuck2018-12-1422-380/+172
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Simplify logging tagsJason A. Donenfeld2018-12-142-2/+2
| | | | | | | This was roop's initial idea, and it turns out to be the better one, now that we can pass cstrings more easily. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fix status switch weird state after an error occursRoopesh Chander2018-12-142-2/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Deduplicate functionsJason A. Donenfeld2018-12-141-9/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Reorganized ViewControllers (split out UIViews and UITableViewCells into their own classes)Eric Kuck2018-12-1321-645/+1207
| | | | | | All swiftlint warnings except one fixed up Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelsManager: Reintroduce waiting for another tunnel to deactivateRoopesh Chander2018-12-131-0/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Rewrite LoggerJason A. Donenfeld2018-12-132-14/+4
| | | | | | | This reverts all of Roop's changes to the C code, and then rewrites the logger logic to be cleaner. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* More reliable logo sizingEric Kuck2018-12-131-33/+34
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* TunnelsManager: Report activation errors through the activationDelegateRoopesh Chander2018-12-133-19/+15
| | | | | | Don't report activation errors through completion handlers Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Write versions from both app and extensionRoopesh Chander2018-12-131-0/+1
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Tag the entries in the merged logRoopesh Chander2018-12-131-1/+1
| | | | | | | So we know which entry is from the app and which is from the network extension. Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Use ringlogger for logging from the appRoopesh Chander2018-12-131-0/+2
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Logging: Use ringlogger for logging from the extensionRoopesh Chander2018-12-132-11/+15
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Remove useless whitespaceJason A. Donenfeld2018-12-133-16/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Settings: better padding calculationJason A. Donenfeld2018-12-131-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Fixed hacky logo display for settingsEric Kuck2018-12-121-3/+9
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More formatting nits and cyclomatic complexity fixesEric Kuck2018-12-125-61/+52
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* More linter warnings fixed, enabled more swiftlint rules, project cleanupEric Kuck2018-12-1210-397/+439
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Tons more swiftlint warnings fixed. Still a few remaining.Eric Kuck2018-12-127-108/+106
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* Added swiftlint and fixed all errors (and a bunch, but not all, warnings)Eric Kuck2018-12-128-315/+299
| | | | Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
* 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>
* Model: Declare keyLength constant and use that wherever applicableRoopesh Chander2018-12-091-4/+4
| | | | 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-082-4/+4
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* On-Demand: Move detail text to TunnelViewModelRoopesh Chander2018-12-082-20/+13
| | | | Signed-off-by: Roopesh Chander <roop@roopc.net>
* Make strings consistentJason A. Donenfeld2018-12-073-8/+8
| | | | 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>