diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-10-20 14:24:09 +0200 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-10-23 10:23:04 +0200 |
| commit | 7ac1d9da8909dc4214f37d8a2c596225bdde4833 (patch) | |
| tree | 0b0f1277b92ea5df404d845679b0eea69455dea1 | |
| parent | a0ffef71d4d9843f951353a4dc54ff82ec255782 (diff) | |
| parent | d7624835621c44624871dc996edbd11fe8a3ec06 (diff) | |
| download | mullvadvpn-7ac1d9da8909dc4214f37d8a2c596225bdde4833.tar.xz mullvadvpn-7ac1d9da8909dc4214f37d8a2c596225bdde4833.zip | |
Merge branch 'fix-link-to-app-update-appearing-on-linux-in-unsupported-des-2634' into prepare-2025.13
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/shared/notifications/unsupported-version.ts | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/desktop/packages/mullvad-vpn/src/shared/notifications/unsupported-version.ts b/desktop/packages/mullvad-vpn/src/shared/notifications/unsupported-version.ts index 6559e02a21..3054a4cf81 100644 --- a/desktop/packages/mullvad-vpn/src/shared/notifications/unsupported-version.ts +++ b/desktop/packages/mullvad-vpn/src/shared/notifications/unsupported-version.ts @@ -4,6 +4,7 @@ import { AppVersionInfoSuggestedUpgrade } from '../daemon-rpc-types'; import { getDownloadUrl } from '../version'; import { InAppNotification, + InAppNotificationAction, InAppNotificationProvider, SystemNotification, SystemNotificationCategory, @@ -69,24 +70,32 @@ export class UnsupportedVersionNotificationProvider // TRANSLATORS: A link in the in-app banner to encourage the user to update the app. // TRANSLATORS: The in-app banner is is displayed to the user when the running app becomes unsupported. messages.pgettext('notifications', 'Please click here to update now'), - action: this.context.suggestedUpgrade - ? { - type: 'navigate-internal', - link: { - to: RoutePath.appUpgrade, - }, - } - : { - type: 'navigate-external', - link: { - to: getDownloadUrl(this.context.suggestedIsBeta ?? false), - }, - }, + action: this.getInAppNotificationAction(), }, ], }; } + private getInAppNotificationAction(): InAppNotificationAction { + if (this.context.suggestedUpgrade) { + if (process.platform !== 'linux') { + return { + type: 'navigate-internal', + link: { + to: RoutePath.appUpgrade, + }, + }; + } + } + + return { + type: 'navigate-external', + link: { + to: getDownloadUrl(this.context.suggestedIsBeta ?? false), + }, + }; + } + private getMessage(): string { // TRANSLATORS: The system notification which is displayed to the user when the running app becomes unsupported. return messages.pgettext( |
