diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2024-01-30 21:35:04 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-01-31 11:47:11 +0100 |
| commit | 76bf632eb552072db0f0c8a582a0d24f632f5bca (patch) | |
| tree | b25f77ff8371e31de453fee464f21cdacf25389b /gui/src/shared/notifications | |
| parent | 91da61996b0f42789983df924f71a7ead8a1af74 (diff) | |
| download | mullvadvpn-76bf632eb552072db0f0c8a582a0d24f632f5bca.tar.xz mullvadvpn-76bf632eb552072db0f0c8a582a0d24f632f5bca.zip | |
Update disconnected from daemon system notification
Diffstat (limited to 'gui/src/shared/notifications')
| -rw-r--r-- | gui/src/shared/notifications/daemon-disconnected.ts | 22 | ||||
| -rw-r--r-- | gui/src/shared/notifications/notification.ts | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gui/src/shared/notifications/daemon-disconnected.ts b/gui/src/shared/notifications/daemon-disconnected.ts new file mode 100644 index 0000000000..50a62266d0 --- /dev/null +++ b/gui/src/shared/notifications/daemon-disconnected.ts @@ -0,0 +1,22 @@ +import { messages } from '../../shared/gettext'; +import { + SystemNotification, + SystemNotificationCategory, + SystemNotificationProvider, + SystemNotificationSeverityType, +} from './notification'; + +export class DaemonDisconnectedNotificationProvider implements SystemNotificationProvider { + public mayDisplay = () => true; + + public getSystemNotification(): SystemNotification { + return { + message: messages.pgettext( + 'notifications', + 'Connection might be unsecured. App lost contact with system service, please troubleshoot.', + ), + severity: SystemNotificationSeverityType.high, + category: SystemNotificationCategory.tunnelState, + }; + } +} diff --git a/gui/src/shared/notifications/notification.ts b/gui/src/shared/notifications/notification.ts index b8727739ef..1957cc07fb 100644 --- a/gui/src/shared/notifications/notification.ts +++ b/gui/src/shared/notifications/notification.ts @@ -72,6 +72,7 @@ export * from './block-when-disconnected'; export * from './connected'; export * from './connecting'; export * from './disconnected'; +export * from './daemon-disconnected'; export * from './error'; export * from './inconsistent-version'; export * from './reconnecting'; |
