diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-07-06 13:17:46 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-07-12 10:09:19 +0200 |
| commit | 17d77726bffdebd4977ff9d39d5ef60acaf861f1 (patch) | |
| tree | 662dd298b064e994282dd33c5d0f229685e81663 /gui/src/shared | |
| parent | f3191b3d5d50b6aec641d0d0167f86085eba31c1 (diff) | |
| download | mullvadvpn-17d77726bffdebd4977ff9d39d5ef60acaf861f1.tar.xz mullvadvpn-17d77726bffdebd4977ff9d39d5ef60acaf861f1.zip | |
Update usages of platform and node env in renderer
Diffstat (limited to 'gui/src/shared')
| -rw-r--r-- | gui/src/shared/notifications/error.ts | 4 | ||||
| -rw-r--r-- | gui/src/shared/notifications/no-valid-key.ts | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts index 97e5e2ce93..066c9c333e 100644 --- a/gui/src/shared/notifications/error.ts +++ b/gui/src/shared/notifications/error.ts @@ -66,7 +66,7 @@ export class ErrorNotificationProvider function getMessage(errorDetails: IErrorState, accountExpiry?: string): string { if (errorDetails.blockFailure) { if (errorDetails.cause.reason === 'set_firewall_policy_error') { - switch (process.platform ?? window.platform) { + switch (process.platform ?? window.env.platform) { case 'win32': return messages.pgettext( 'notifications', @@ -107,7 +107,7 @@ function getMessage(errorDetails: IErrorState, accountExpiry?: string): string { 'Could not configure IPv6. Disable it in the app or enable it on your device.', ); case 'set_firewall_policy_error': - switch (process.platform ?? window.platform) { + switch (process.platform ?? window.env.platform) { case 'win32': return messages.pgettext( 'notifications', diff --git a/gui/src/shared/notifications/no-valid-key.ts b/gui/src/shared/notifications/no-valid-key.ts index 8da145a1f0..6de28ab8df 100644 --- a/gui/src/shared/notifications/no-valid-key.ts +++ b/gui/src/shared/notifications/no-valid-key.ts @@ -14,7 +14,8 @@ export class NoValidKeyNotificationProvider implements InAppNotificationProvider public mayDisplay() { const usingWireGuard = this.context.tunnelProtocol === 'wireguard' || - (this.context.tunnelProtocol === 'any' && (process.platform ?? window.platform) !== 'win32'); + (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' || |
