diff options
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) => |
