diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-06-15 20:17:27 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-06-24 11:23:12 +0200 |
| commit | 0db07414743e8dbd5c00f810a138ff276fbf92f6 (patch) | |
| tree | 9957b5fdde83938bb1b2b3ff0ba0810a6c90812d /gui/src/main | |
| parent | e66685fc8024d9ce8b6448199b2109e9123bd3b6 (diff) | |
| download | mullvadvpn-0db07414743e8dbd5c00f810a138ff276fbf92f6.tar.xz mullvadvpn-0db07414743e8dbd5c00f810a138ff276fbf92f6.zip | |
Add account expiry case to error notification
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 6 | ||||
| -rw-r--r-- | gui/src/main/notification-controller.ts | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 407a348ca9..a0e17fd9be 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -623,7 +623,11 @@ class ApplicationMain { this.updateTrayIcon(newState, this.settings.blockWhenDisconnected); consumePromise(this.updateLocation()); - this.notificationController.notifyTunnelState(newState, this.settings.blockWhenDisconnected); + this.notificationController.notifyTunnelState( + newState, + this.settings.blockWhenDisconnected, + this.accountData?.expiry, + ); if (this.windowController) { IpcMainEventChannel.tunnel.notify(this.windowController.webContents, newState); diff --git a/gui/src/main/notification-controller.ts b/gui/src/main/notification-controller.ts index 548c20e122..20c29d0a41 100644 --- a/gui/src/main/notification-controller.ts +++ b/gui/src/main/notification-controller.ts @@ -47,14 +47,18 @@ export default class NotificationController { } } - public notifyTunnelState(tunnelState: TunnelState, blockWhenDisconnected: boolean) { + public notifyTunnelState( + tunnelState: TunnelState, + blockWhenDisconnected: boolean, + accountExpiry?: string, + ) { const notificationProviders: SystemNotificationProvider[] = [ new ConnectingNotificationProvider({ tunnelState, reconnecting: this.reconnecting }), new ConnectedNotificationProvider(tunnelState), new ReconnectingNotificationProvider(tunnelState), new BlockWhenDisconnectedNotificationProvider({ tunnelState, blockWhenDisconnected }), new DisconnectedNotificationProvider(tunnelState), - new ErrorNotificationProvider(tunnelState), + new ErrorNotificationProvider({ tunnelState, accountExpiry }), ]; const notificationProvider = notificationProviders.find((notification) => |
