diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-12-29 12:07:21 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-01-26 09:06:54 +0100 |
| commit | 2dcefcc1bfefacda59f647769b0dd751977d2c62 (patch) | |
| tree | 1d9bfb3e4b2be69c147dabca194aae0616d4b477 /gui/src/shared/notifications | |
| parent | f055d887eba76100033176512129ede48523a7d3 (diff) | |
| download | mullvadvpn-2dcefcc1bfefacda59f647769b0dd751977d2c62.tar.xz mullvadvpn-2dcefcc1bfefacda59f647769b0dd751977d2c62.zip | |
Pass env and platform from process API over IPC to renderer
Diffstat (limited to 'gui/src/shared/notifications')
| -rw-r--r-- | gui/src/shared/notifications/error.ts | 4 | ||||
| -rw-r--r-- | gui/src/shared/notifications/no-valid-key.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/src/shared/notifications/error.ts b/gui/src/shared/notifications/error.ts index d580bf1f1e..c5f15482dc 100644 --- a/gui/src/shared/notifications/error.ts +++ b/gui/src/shared/notifications/error.ts @@ -45,7 +45,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) { + switch (process.platform ?? window.platform) { case 'win32': return messages.pgettext( 'notifications', @@ -86,7 +86,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) { + switch (process.platform ?? window.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 d1b90095e2..8da145a1f0 100644 --- a/gui/src/shared/notifications/no-valid-key.ts +++ b/gui/src/shared/notifications/no-valid-key.ts @@ -14,7 +14,7 @@ export class NoValidKeyNotificationProvider implements InAppNotificationProvider public mayDisplay() { const usingWireGuard = this.context.tunnelProtocol === 'wireguard' || - (this.context.tunnelProtocol === 'any' && process.platform !== 'win32'); + (this.context.tunnelProtocol === 'any' && (process.platform ?? window.platform) !== 'win32'); const keyInvalid = this.context.wireGuardKey.type === 'key-not-set' || this.context.wireGuardKey.type === 'too-many-keys' || |
