diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-09-28 13:10:32 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-09-28 13:10:32 +0200 |
| commit | f5eaa62914c0353c7c6920b2881ada004fb76658 (patch) | |
| tree | aaae7dd7294bbde3ff3f9710b81777e142b3b5c7 /gui/src/renderer | |
| parent | 8943529291df32a7ed4a35304f972b1d66860d22 (diff) | |
| parent | 11942b1d08285aad439fd40a4a4806815e740cad (diff) | |
| download | mullvadvpn-f5eaa62914c0353c7c6920b2881ada004fb76658.tar.xz mullvadvpn-f5eaa62914c0353c7c6920b2881ada004fb76658.zip | |
Merge branch 'open-download-urls-for-correct-platform-des-372'
Diffstat (limited to 'gui/src/renderer')
| -rw-r--r-- | gui/src/renderer/components/ProblemReport.tsx | 4 | ||||
| -rw-r--r-- | gui/src/renderer/components/Settings.tsx | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/gui/src/renderer/components/ProblemReport.tsx b/gui/src/renderer/components/ProblemReport.tsx index 907f9cb9e4..3a0a9bbd0e 100644 --- a/gui/src/renderer/components/ProblemReport.tsx +++ b/gui/src/renderer/components/ProblemReport.tsx @@ -12,8 +12,8 @@ import { useState, } from 'react'; -import { links } from '../../config.json'; import { messages } from '../../shared/gettext'; +import { getDownloadUrl } from '../../shared/version'; import { useAppContext } from '../context'; import useActions from '../lib/actionsHook'; import { useHistory } from '../lib/history'; @@ -326,7 +326,7 @@ function OutdatedVersionWarningDialog() { }, []); const openDownloadLink = useCallback(async () => { - await openUrl(suggestedIsBeta ? links.betaDownload : links.download); + await openUrl(getDownloadUrl(suggestedIsBeta)); }, [suggestedIsBeta]); const onClose = useCallback(() => history.pop(), [history.pop]); diff --git a/gui/src/renderer/components/Settings.tsx b/gui/src/renderer/components/Settings.tsx index 01becd27b6..26d40fb134 100644 --- a/gui/src/renderer/components/Settings.tsx +++ b/gui/src/renderer/components/Settings.tsx @@ -1,7 +1,8 @@ import { useCallback } from 'react'; -import { colors, links } from '../../config.json'; +import { colors } from '../../config.json'; import { messages } from '../../shared/gettext'; +import { getDownloadUrl } from '../../shared/version'; import { useAppContext } from '../context'; import { useHistory } from '../lib/history'; import { RoutePath } from '../lib/routes'; @@ -148,10 +149,10 @@ function AppVersionButton() { const isOffline = useSelector((state) => state.connection.isBlocked); const { openUrl } = useAppContext(); - const openDownloadLink = useCallback( - () => openUrl(suggestedIsBeta ? links.betaDownload : links.download), - [openUrl, suggestedIsBeta], - ); + const openDownloadLink = useCallback(() => openUrl(getDownloadUrl(suggestedIsBeta)), [ + openUrl, + suggestedIsBeta, + ]); let icon; let footer; |
