summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--desktop/packages/mullvad-vpn/src/shared/notifications/unsupported-version.ts35
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(