summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared/notifications
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2023-09-28 13:10:32 +0200
committerOskar Nyberg <oskar@mullvad.net>2023-09-28 13:10:32 +0200
commitf5eaa62914c0353c7c6920b2881ada004fb76658 (patch)
treeaaae7dd7294bbde3ff3f9710b81777e142b3b5c7 /gui/src/shared/notifications
parent8943529291df32a7ed4a35304f972b1d66860d22 (diff)
parent11942b1d08285aad439fd40a4a4806815e740cad (diff)
downloadmullvadvpn-f5eaa62914c0353c7c6920b2881ada004fb76658.tar.xz
mullvadvpn-f5eaa62914c0353c7c6920b2881ada004fb76658.zip
Merge branch 'open-download-urls-for-correct-platform-des-372'
Diffstat (limited to 'gui/src/shared/notifications')
-rw-r--r--gui/src/shared/notifications/unsupported-version.ts6
-rw-r--r--gui/src/shared/notifications/update-available.ts6
2 files changed, 6 insertions, 6 deletions
diff --git a/gui/src/shared/notifications/unsupported-version.ts b/gui/src/shared/notifications/unsupported-version.ts
index 8c2f87460b..9d41bc268c 100644
--- a/gui/src/shared/notifications/unsupported-version.ts
+++ b/gui/src/shared/notifications/unsupported-version.ts
@@ -1,5 +1,5 @@
-import { links } from '../../config.json';
import { messages } from '../../shared/gettext';
+import { getDownloadUrl } from '../version';
import {
InAppNotification,
InAppNotificationProvider,
@@ -31,7 +31,7 @@ export class UnsupportedVersionNotificationProvider
severity: SystemNotificationSeverityType.high,
action: {
type: 'open-url',
- url: this.context.suggestedIsBeta ? links.betaDownload : links.download,
+ url: getDownloadUrl(this.context.suggestedIsBeta ?? false),
text: messages.pgettext('notifications', 'Upgrade'),
},
presentOnce: { value: true, name: this.constructor.name },
@@ -46,7 +46,7 @@ export class UnsupportedVersionNotificationProvider
subtitle: this.getMessage(),
action: {
type: 'open-url',
- url: this.context.suggestedIsBeta ? links.betaDownload : links.download,
+ url: getDownloadUrl(this.context.suggestedIsBeta ?? false),
},
};
}
diff --git a/gui/src/shared/notifications/update-available.ts b/gui/src/shared/notifications/update-available.ts
index 0394ef15a5..6f63bafd89 100644
--- a/gui/src/shared/notifications/update-available.ts
+++ b/gui/src/shared/notifications/update-available.ts
@@ -1,7 +1,7 @@
import { sprintf } from 'sprintf-js';
-import { links } from '../../config.json';
import { messages } from '../../shared/gettext';
+import { getDownloadUrl } from '../version';
import {
InAppNotification,
InAppNotificationProvider,
@@ -33,7 +33,7 @@ export class UpdateAvailableNotificationProvider
subtitle: this.inAppMessage(),
action: {
type: 'open-url',
- url: this.context.suggestedIsBeta ? links.betaDownload : links.download,
+ url: getDownloadUrl(this.context.suggestedIsBeta ?? false),
},
};
}
@@ -45,7 +45,7 @@ export class UpdateAvailableNotificationProvider
severity: SystemNotificationSeverityType.medium,
action: {
type: 'open-url',
- url: this.context.suggestedIsBeta ? links.betaDownload : links.download,
+ url: getDownloadUrl(this.context.suggestedIsBeta ?? false),
text: messages.pgettext('notifications', 'Upgrade'),
},
presentOnce: { value: true, name: this.constructor.name },