summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-04-28 15:59:37 +0200
committerOskar Nyberg <oskar@mullvad.net>2020-04-29 16:01:42 +0200
commit4cb4be56a7ad8e548e7aa4bcde59fb602ed94928 (patch)
treed126a757ddcbd4bdda6330738052866c06ded0d9 /gui/src
parent0367f4244d4f8d98d3fa9da77138867233838698 (diff)
downloadmullvadvpn-4cb4be56a7ad8e548e7aa4bcde59fb602ed94928.tar.xz
mullvadvpn-4cb4be56a7ad8e548e7aa4bcde59fb602ed94928.zip
Add message when connection failed due to missing WireGuard key
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/notification-controller.ts18
-rw-r--r--gui/src/renderer/components/NotificationArea.tsx2
2 files changed, 16 insertions, 4 deletions
diff --git a/gui/src/main/notification-controller.ts b/gui/src/main/notification-controller.ts
index c0371114e5..41aca7ffea 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)'),
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(