diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-11-03 00:19:05 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-03-14 13:58:44 +0100 |
| commit | b43833503ba221d775e2f6196ad6e0dec0929756 (patch) | |
| tree | de0c68c2b049a0ea3f659aa73f10869ebd7e8230 /gui/src/shared/notifications | |
| parent | 6459ae7beefcc5f13eb54254dfe402dd807c62fe (diff) | |
| download | mullvadvpn-b43833503ba221d775e2f6196ad6e0dec0929756.tar.xz mullvadvpn-b43833503ba221d775e2f6196ad6e0dec0929756.zip | |
Remove everything related to WireGuard key handling
Diffstat (limited to 'gui/src/shared/notifications')
| -rw-r--r-- | gui/src/shared/notifications/no-valid-key.ts | 38 | ||||
| -rw-r--r-- | gui/src/shared/notifications/notification.ts | 1 |
2 files changed, 0 insertions, 39 deletions
diff --git a/gui/src/shared/notifications/no-valid-key.ts b/gui/src/shared/notifications/no-valid-key.ts deleted file mode 100644 index 6de28ab8df..0000000000 --- a/gui/src/shared/notifications/no-valid-key.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { WgKeyState } from '../../renderer/redux/settings/reducers'; -import { messages } from '../../shared/gettext'; -import { LiftedConstraint, TunnelProtocol } from '../daemon-rpc-types'; -import { InAppNotification, InAppNotificationProvider } from './notification'; - -interface NoValidKeyNotificationContext { - tunnelProtocol?: LiftedConstraint<TunnelProtocol>; - wireGuardKey: WgKeyState; -} - -export class NoValidKeyNotificationProvider implements InAppNotificationProvider { - public constructor(private context: NoValidKeyNotificationContext) {} - - public mayDisplay() { - const usingWireGuard = - this.context.tunnelProtocol === 'wireguard' || - (this.context.tunnelProtocol === 'any' && - (process.platform ?? window.env.platform) !== 'win32'); - const keyInvalid = - this.context.wireGuardKey.type === 'key-not-set' || - this.context.wireGuardKey.type === 'too-many-keys' || - this.context.wireGuardKey.type === 'generation-failure' || - (this.context.wireGuardKey.type === 'key-set' && - this.context.wireGuardKey.key.valid === false) || - (this.context.wireGuardKey.type === 'key-set' && - this.context.wireGuardKey.key.replacementFailure === 'too_many_keys'); - - return usingWireGuard && keyInvalid; - } - - public getInAppNotification(): InAppNotification { - return { - indicator: 'warning', - title: messages.pgettext('in-app-notifications', 'VALID WIREGUARD KEY IS MISSING'), - subtitle: messages.pgettext('in-app-notifications', 'Manage keys under Advanced settings.'), - }; - } -} diff --git a/gui/src/shared/notifications/notification.ts b/gui/src/shared/notifications/notification.ts index 570bf2f12b..2152da0e79 100644 --- a/gui/src/shared/notifications/notification.ts +++ b/gui/src/shared/notifications/notification.ts @@ -41,7 +41,6 @@ export * from './connected'; export * from './connecting'; export * from './disconnected'; export * from './error'; -export * from './no-valid-key'; export * from './inconsistent-version'; export * from './reconnecting'; export * from './unsupported-version'; |
