diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-02-25 20:44:31 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-02-27 09:29:26 -0300 |
| commit | f1aacabc534eff81a8d666a9f2df16c7294fa9e4 (patch) | |
| tree | 35ab4d7958474c01f5de81939938a13dd50d786d /gui | |
| parent | 333f3a88cce108f77432a1aa6b0a3e87cdb822d9 (diff) | |
| download | mullvadvpn-f1aacabc534eff81a8d666a9f2df16c7294fa9e4.tar.xz mullvadvpn-f1aacabc534eff81a8d666a9f2df16c7294fa9e4.zip | |
Add app title to notifications on Linux
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/packages/desktop/src/main/notification-controller.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gui/packages/desktop/src/main/notification-controller.ts b/gui/packages/desktop/src/main/notification-controller.ts index 86f23a8b4f..44ed5d2482 100644 --- a/gui/packages/desktop/src/main/notification-controller.ts +++ b/gui/packages/desktop/src/main/notification-controller.ts @@ -1,4 +1,4 @@ -import { Notification, shell } from 'electron'; +import { app, Notification, shell } from 'electron'; import config from '../config.json'; import { TunnelStateTransition } from '../shared/daemon-rpc-types'; @@ -8,6 +8,7 @@ export default class NotificationController { private reconnecting = false; private presentedNotifications: { [key: string]: boolean } = {}; private pendingNotifications: Notification[] = []; + private notificationTitle = process.platform === 'linux' ? app.getName() : ''; public notifyTunnelState(tunnelState: TunnelStateTransition) { switch (tunnelState.state) { @@ -52,7 +53,7 @@ export default class NotificationController { public notifyInconsistentVersion() { this.presentNotificationOnce('inconsistent-version', () => { const notification = new Notification({ - title: '', + title: this.notificationTitle, body: 'Inconsistent internal version information, please restart the app', silent: true, }); @@ -63,7 +64,7 @@ export default class NotificationController { public notifyUnsupportedVersion(upgradeVersion: string) { this.presentNotificationOnce('unsupported-version', () => { const notification = new Notification({ - title: '', + title: this.notificationTitle, body: `You are running an unsupported app version. Please upgrade to ${upgradeVersion} now to ensure your security`, silent: true, }); @@ -91,7 +92,7 @@ export default class NotificationController { } const newNotification = new Notification({ - title: '', + title: this.notificationTitle, body: message, silent: true, }); |
