diff options
Diffstat (limited to 'gui/src/shared')
| -rw-r--r-- | gui/src/shared/notifications/account-expired.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/notifications/block-when-disconnected.ts | 1 | ||||
| -rw-r--r-- | gui/src/shared/notifications/close-to-account-expiry.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/notifications/connected.ts | 3 | ||||
| -rw-r--r-- | gui/src/shared/notifications/connecting.ts | 4 | ||||
| -rw-r--r-- | gui/src/shared/notifications/disconnected.ts | 1 | ||||
| -rw-r--r-- | gui/src/shared/notifications/error.ts | 1 | ||||
| -rw-r--r-- | gui/src/shared/notifications/inconsistent-version.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/notifications/notification.ts | 6 | ||||
| -rw-r--r-- | gui/src/shared/notifications/reconnecting.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/notifications/unsupported-version.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/notifications/update-available.ts | 2 |
12 files changed, 18 insertions, 10 deletions
diff --git a/gui/src/shared/notifications/account-expired.ts b/gui/src/shared/notifications/account-expired.ts index 42e40aa491..a7af4f2c8b 100644 --- a/gui/src/shared/notifications/account-expired.ts +++ b/gui/src/shared/notifications/account-expired.ts @@ -4,6 +4,7 @@ import { TunnelState } from '../daemon-rpc-types'; import { messages } from '../gettext'; import { SystemNotification, + SystemNotificationCategory, SystemNotificationProvider, SystemNotificationSeverityType, } from './notification'; @@ -27,6 +28,7 @@ export class AccountExpiredNotificationProvider implements SystemNotificationPro public getSystemNotification(): SystemNotification { return { message: messages.pgettext('notifications', 'Account is out of time'), + category: SystemNotificationCategory.expiry, severity: SystemNotificationSeverityType.high, presentOnce: { value: true, name: this.constructor.name }, action: { diff --git a/gui/src/shared/notifications/block-when-disconnected.ts b/gui/src/shared/notifications/block-when-disconnected.ts index 3d7ec1e509..c0b2f4e0f1 100644 --- a/gui/src/shared/notifications/block-when-disconnected.ts +++ b/gui/src/shared/notifications/block-when-disconnected.ts @@ -37,7 +37,6 @@ export class BlockWhenDisconnectedNotificationProvider message, severity: SystemNotificationSeverityType.info, category: SystemNotificationCategory.tunnelState, - replaceByCategory: true, }; } diff --git a/gui/src/shared/notifications/close-to-account-expiry.ts b/gui/src/shared/notifications/close-to-account-expiry.ts index 2a9fc1a384..a3f5e749ad 100644 --- a/gui/src/shared/notifications/close-to-account-expiry.ts +++ b/gui/src/shared/notifications/close-to-account-expiry.ts @@ -8,6 +8,7 @@ import { InAppNotification, InAppNotificationProvider, SystemNotification, + SystemNotificationCategory, SystemNotificationProvider, SystemNotificationSeverityType, } from './notification'; @@ -39,6 +40,7 @@ export class CloseToAccountExpiryNotificationProvider return { message, + category: SystemNotificationCategory.expiry, severity: SystemNotificationSeverityType.medium, action: { type: 'open-url', diff --git a/gui/src/shared/notifications/connected.ts b/gui/src/shared/notifications/connected.ts index d695df1c95..c66339fe9e 100644 --- a/gui/src/shared/notifications/connected.ts +++ b/gui/src/shared/notifications/connected.ts @@ -32,9 +32,8 @@ export class ConnectedNotificationProvider implements SystemNotificationProvider return { message, - severity: SystemNotificationSeverityType.low, + severity: SystemNotificationSeverityType.info, category: SystemNotificationCategory.tunnelState, - replaceByCategory: true, }; } else { return undefined; diff --git a/gui/src/shared/notifications/connecting.ts b/gui/src/shared/notifications/connecting.ts index e722e7fb95..214e015e10 100644 --- a/gui/src/shared/notifications/connecting.ts +++ b/gui/src/shared/notifications/connecting.ts @@ -42,9 +42,9 @@ export class ConnectingNotificationProvider return { message, - severity: SystemNotificationSeverityType.low, + severity: SystemNotificationSeverityType.info, category: SystemNotificationCategory.tunnelState, - replaceByCategory: true, + throttle: true, }; } else { return undefined; diff --git a/gui/src/shared/notifications/disconnected.ts b/gui/src/shared/notifications/disconnected.ts index 531c95d015..874cb11b3e 100644 --- a/gui/src/shared/notifications/disconnected.ts +++ b/gui/src/shared/notifications/disconnected.ts @@ -23,7 +23,6 @@ export class DisconnectedNotificationProvider implements SystemNotificationProvi message: messages.pgettext('notifications', 'Disconnected and unsecure'), severity: SystemNotificationSeverityType.info, category: SystemNotificationCategory.tunnelState, - replaceByCategory: true, }; } } diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts index e878f5ef19..67267a494e 100644 --- a/gui/src/shared/notifications/error.ts +++ b/gui/src/shared/notifications/error.ts @@ -49,7 +49,6 @@ export class ErrorNotificationProvider ? SystemNotificationSeverityType.low : SystemNotificationSeverityType.high, category: SystemNotificationCategory.tunnelState, - replaceByCategory: false, }; } else { return undefined; diff --git a/gui/src/shared/notifications/inconsistent-version.ts b/gui/src/shared/notifications/inconsistent-version.ts index 3334f9e99c..f6f3cf4166 100644 --- a/gui/src/shared/notifications/inconsistent-version.ts +++ b/gui/src/shared/notifications/inconsistent-version.ts @@ -3,6 +3,7 @@ import { InAppNotification, InAppNotificationProvider, SystemNotification, + SystemNotificationCategory, SystemNotificationProvider, SystemNotificationSeverityType, } from './notification'; @@ -20,6 +21,7 @@ export class InconsistentVersionNotificationProvider public getSystemNotification(): SystemNotification { return { message: messages.pgettext('notifications', 'App is out of sync. Please quit and restart.'), + category: SystemNotificationCategory.version, severity: SystemNotificationSeverityType.high, presentOnce: { value: true, name: this.constructor.name }, suppressInDevelopment: true, diff --git a/gui/src/shared/notifications/notification.ts b/gui/src/shared/notifications/notification.ts index 873f7b2f4a..2fd0a47a37 100644 --- a/gui/src/shared/notifications/notification.ts +++ b/gui/src/shared/notifications/notification.ts @@ -16,6 +16,8 @@ export enum SystemNotificationSeverityType { export enum SystemNotificationCategory { tunnelState, + expiry, + version, } interface NotificationProvider { @@ -25,8 +27,8 @@ interface NotificationProvider { export interface SystemNotification { message: string; severity: SystemNotificationSeverityType; - category?: SystemNotificationCategory; - replaceByCategory?: boolean; + category: SystemNotificationCategory; + throttle?: boolean; presentOnce?: { value: boolean; name: string }; suppressInDevelopment?: boolean; action?: NotificationAction; diff --git a/gui/src/shared/notifications/reconnecting.ts b/gui/src/shared/notifications/reconnecting.ts index 08eb36b18d..43491322f0 100644 --- a/gui/src/shared/notifications/reconnecting.ts +++ b/gui/src/shared/notifications/reconnecting.ts @@ -22,7 +22,7 @@ export class ReconnectingNotificationProvider message: messages.pgettext('notifications', 'Reconnecting'), severity: SystemNotificationSeverityType.info, category: SystemNotificationCategory.tunnelState, - replaceByCategory: true, + throttle: true, }; } diff --git a/gui/src/shared/notifications/unsupported-version.ts b/gui/src/shared/notifications/unsupported-version.ts index 3a012e1aad..6c9c380595 100644 --- a/gui/src/shared/notifications/unsupported-version.ts +++ b/gui/src/shared/notifications/unsupported-version.ts @@ -4,6 +4,7 @@ import { InAppNotification, InAppNotificationProvider, SystemNotification, + SystemNotificationCategory, SystemNotificationProvider, SystemNotificationSeverityType, } from './notification'; @@ -26,6 +27,7 @@ export class UnsupportedVersionNotificationProvider public getSystemNotification(): SystemNotification { return { message: this.getMessage(), + category: SystemNotificationCategory.version, severity: SystemNotificationSeverityType.high, action: { type: 'open-url', diff --git a/gui/src/shared/notifications/update-available.ts b/gui/src/shared/notifications/update-available.ts index 2205274cc6..8e6bd7e76e 100644 --- a/gui/src/shared/notifications/update-available.ts +++ b/gui/src/shared/notifications/update-available.ts @@ -6,6 +6,7 @@ import { InAppNotification, InAppNotificationProvider, SystemNotification, + SystemNotificationCategory, SystemNotificationProvider, SystemNotificationSeverityType, } from './notification'; @@ -40,6 +41,7 @@ export class UpdateAvailableNotificationProvider public getSystemNotification(): SystemNotification { return { message: this.systemMessage(), + category: SystemNotificationCategory.version, severity: SystemNotificationSeverityType.medium, action: { type: 'open-url', |
