diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-04-29 16:43:33 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-04-29 16:43:33 +0200 |
| commit | ffc2c7f10ead032d7b2d27e1a353e3ad7ece25a7 (patch) | |
| tree | 7a7a6b640a76240d3a75e67396d57e8f27224c8f | |
| parent | 0367f4244d4f8d98d3fa9da77138867233838698 (diff) | |
| parent | 9e4ec286a9a26bc91018f1d7b3d3dc2e85635637 (diff) | |
| download | mullvadvpn-ffc2c7f10ead032d7b2d27e1a353e3ad7ece25a7.tar.xz mullvadvpn-ffc2c7f10ead032d7b2d27e1a353e3ad7ece25a7.zip | |
Merge branch 'remove-wireguard-key-generation-error'
| -rw-r--r-- | gui/src/main/index.ts | 1 | ||||
| -rw-r--r-- | gui/src/main/notification-controller.ts | 28 | ||||
| -rw-r--r-- | gui/src/renderer/components/NotificationArea.tsx | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index c0dd326429..b8c49d6a21 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -583,7 +583,6 @@ class ApplicationMain { switch (event) { case 'too_many_keys': case 'generation_failure': - this.notificationController.notifyKeyGenerationFailed(); this.wireguardPublicKey = undefined; break; default: diff --git a/gui/src/main/notification-controller.ts b/gui/src/main/notification-controller.ts index c0371114e5..9c3cf2193c 100644 --- a/gui/src/main/notification-controller.ts +++ b/gui/src/main/notification-controller.ts @@ -79,9 +79,21 @@ export default class NotificationController { break; case 'error': if (tunnelState.details.isBlocking) { - this.showTunnelStateNotification( - messages.pgettext('notifications', 'Blocked all connections'), - ); + if ( + tunnelState.details.cause.reason === 'tunnel_parameter_error' && + tunnelState.details.cause.details === 'no_wireguard_key' + ) { + this.showTunnelStateNotification( + messages.pgettext( + 'notifications', + 'Blocking internet: Valid WireGuard key is missing', + ), + ); + } else { + this.showTunnelStateNotification( + messages.pgettext('notifications', 'Blocking internet'), + ); + } } else { this.showTunnelStateNotification( messages.pgettext('notifications', 'Critical error (your attention is required)'), @@ -148,16 +160,6 @@ export default class NotificationController { }); } - public notifyKeyGenerationFailed() { - const notification = new Notification({ - title: this.notificationTitle, - body: messages.pgettext('notifications', 'Wireguard key generation failed'), - silent: true, - icon: this.notificationIcon, - }); - this.scheduleNotification(notification); - } - public closeToExpiryNotification(accountExpiry: AccountExpiry) { const duration = accountExpiry.durationUntilExpiry(); const notification = new Notification({ diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx index 4709a5100d..d9ddcfb498 100644 --- a/gui/src/renderer/components/NotificationArea.tsx +++ b/gui/src/renderer/components/NotificationArea.tsx @@ -52,7 +52,7 @@ function getTunnelParameterMessage(err: TunnelParameterError): string { case 'no_wireguard_key': return messages.pgettext( 'in-app-notifications', - 'WireGuard key not published to our servers. You can manage your key in Advanced settings.', + 'Valid WireGuard key is missing. Manage keys under Advanced settings.', ); case 'custom_tunnel_host_resultion_error': return messages.pgettext( |
