Better reconnect than disconnect

This commit is contained in:
Davide De Rosa 2019-03-22 19:25:01 +01:00
parent c45e741750
commit 3b5207dc8f
3 changed files with 9 additions and 9 deletions

View File

@ -409,12 +409,12 @@ class ServiceViewController: UIViewController, TableModelHost {
guard vpn.status == .disconnected else {
let alert = Macros.alert(
L10n.Service.Cells.MasksPrivateData.caption,
L10n.Service.Alerts.MasksPrivateData.Messages.mustDisconnect
L10n.Service.Alerts.MasksPrivateData.Messages.mustReconnect
)
alert.addDestructiveAction(L10n.Service.Alerts.Buttons.disconnect) {
alert.addDestructiveAction(L10n.Service.Alerts.Buttons.reconnect) {
handler()
self.shouldDeleteLogOnDisconnection = true
self.vpn.disconnect(completionHandler: nil)
self.vpn.reconnect(completionHandler: nil)
}
alert.addCancelAction(L10n.Global.cancel) {
cell.setOn(!cell.isOn, animated: true)

View File

@ -121,8 +121,8 @@
"service.alerts.test_connectivity.messages.failure" = "Your device has no Internet connectivity, please review your profile parameters.";
"service.alerts.data_count.messages.current" = "Received: %llu\nSent: %llu";
"service.alerts.data_count.messages.not_available" = "Information not available, are you connected?";
"service.alerts.masks_private_data.messages.must_disconnect" = "In order to safely reset the current debug log and apply the new masking preference, you must disconnect from the VPN now.";
"service.alerts.buttons.disconnect" = "Disconnect";
"service.alerts.masks_private_data.messages.must_reconnect" = "In order to safely reset the current debug log and apply the new masking preference, you must reconnect to the VPN now.";
"service.alerts.buttons.reconnect" = "Reconnect";
"account.cells.username.caption" = "Username";
"account.cells.username.placeholder" = "username";

View File

@ -455,8 +455,8 @@ public enum L10n {
public enum Service {
public enum Alerts {
public enum Buttons {
/// Disconnect
public static let disconnect = L10n.tr("Localizable", "service.alerts.buttons.disconnect")
/// Reconnect
public static let reconnect = L10n.tr("Localizable", "service.alerts.buttons.reconnect")
}
public enum CredentialsNeeded {
/// You need to enter account credentials first.
@ -474,8 +474,8 @@ public enum L10n {
}
public enum MasksPrivateData {
public enum Messages {
/// In order to safely reset the current debug log and apply the new masking preference, you must disconnect from the VPN now.
public static let mustDisconnect = L10n.tr("Localizable", "service.alerts.masks_private_data.messages.must_disconnect")
/// In order to safely reset the current debug log and apply the new masking preference, you must reconnect to the VPN now.
public static let mustReconnect = L10n.tr("Localizable", "service.alerts.masks_private_data.messages.must_reconnect")
}
}
public enum ReconnectVpn {