summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2024-01-31 11:48:04 +0100
committerOskar Nyberg <oskar@mullvad.net>2024-01-31 11:48:04 +0100
commit9b9da3ebbd90d52cec84c17edb4d99a472fd9a61 (patch)
tree8138cdc8856e0af7abc6ed6a61b932d00b03ceb1 /gui/src/shared
parent91da61996b0f42789983df924f71a7ead8a1af74 (diff)
parentd954ae0842ccd1f6411fbaa1aecb0bb1df574413 (diff)
downloadmullvadvpn-9b9da3ebbd90d52cec84c17edb4d99a472fd9a61.tar.xz
mullvadvpn-9b9da3ebbd90d52cec84c17edb4d99a472fd9a61.zip
Merge branch 'inform-the-user-when-gui-loses-contact-with-daemon-des-238'
Diffstat (limited to 'gui/src/shared')
-rw-r--r--gui/src/shared/notifications/daemon-disconnected.ts22
-rw-r--r--gui/src/shared/notifications/notification.ts1
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';