diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-06-04 13:11:56 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-06-04 13:11:56 +0200 |
| commit | 76a75a268abb1ac8daeffd39087c96cc6fe688c0 (patch) | |
| tree | f4cad3474bf4dbaceff0f8e36483fffee6bfea30 | |
| parent | 37f9da7e45995d0f78539c800a399c22e7e5f135 (diff) | |
| parent | 99373dfac5020562f85765464523acccad62faaf (diff) | |
| download | mullvadvpn-76a75a268abb1ac8daeffd39087c96cc6fe688c0.tar.xz mullvadvpn-76a75a268abb1ac8daeffd39087c96cc6fe688c0.zip | |
Merge branch 'fix-current-is-supported'
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 6 | ||||
| -rw-r--r-- | gui/src/renderer/app.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/components/NotificationArea.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/containers/PreferencesPage.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/redux/version/actions.ts | 6 | ||||
| -rw-r--r-- | gui/src/renderer/redux/version/reducers.ts | 10 | ||||
| -rw-r--r-- | gui/test/components/NotificationArea.spec.tsx | 6 |
8 files changed, 18 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 804b6b48f4..c32e700b83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Line wrap the file at 100 chars. Th ### Fixed - Show both WireGuard and OpenVPN servers in location list when protocol is set to automatic on Linux and macOS. +- Fix missing in app notification about unsupported version. #### Android - Fix crash when that happened sometimes when the app tried to start the daemon service on recent diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index e905159bfb..d64ff7cf93 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -65,7 +65,7 @@ export interface ICurrentAppVersionInfo { gui: string; daemon: string; isConsistent: boolean; - currentIsBeta: boolean; + isBeta: boolean; } export interface IAppUpgradeInfo extends IAppVersionInfo { @@ -138,7 +138,7 @@ class ApplicationMain { daemon: '', gui: '', isConsistent: true, - currentIsBeta: false, + isBeta: false, }; private upgradeVersion: IAppUpgradeInfo = { @@ -744,7 +744,7 @@ class ApplicationMain { daemon: daemonVersion, gui: guiVersion, isConsistent: daemonVersion === guiVersion, - currentIsBeta: guiVersion.includes('beta'), + isBeta: guiVersion.includes('beta'), }; this.currentVersion = versionInfo; diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index f9d4130419..5c1623b67e 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -734,7 +734,7 @@ export default class AppRenderer { this.reduxActions.version.updateVersion( versionInfo.gui, versionInfo.isConsistent, - versionInfo.currentIsBeta, + versionInfo.isBeta, ); } diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx index 5187130a56..01607c3840 100644 --- a/gui/src/renderer/components/NotificationArea.tsx +++ b/gui/src/renderer/components/NotificationArea.tsx @@ -167,7 +167,7 @@ export default class NotificationArea extends Component<IProps, State> { }; } - if (!version.currentIsSupported && version.nextUpgrade) { + if (!version.supported && version.nextUpgrade) { return { visible: true, type: 'unsupported-version', diff --git a/gui/src/renderer/containers/PreferencesPage.tsx b/gui/src/renderer/containers/PreferencesPage.tsx index 538c44dcfa..64799ed59b 100644 --- a/gui/src/renderer/containers/PreferencesPage.tsx +++ b/gui/src/renderer/containers/PreferencesPage.tsx @@ -11,7 +11,7 @@ const mapStateToProps = (state: IReduxState) => ({ autoStart: state.settings.autoStart, allowLan: state.settings.allowLan, showBetaReleases: state.settings.showBetaReleases, - isBeta: state.version.currentIsBeta, + isBeta: state.version.isBeta, autoConnect: state.settings.guiSettings.autoConnect, enableSystemNotifications: state.settings.guiSettings.enableSystemNotifications, monochromaticIcon: state.settings.guiSettings.monochromaticIcon, diff --git a/gui/src/renderer/redux/version/actions.ts b/gui/src/renderer/redux/version/actions.ts index 628bc2c39a..e2bb4a6513 100644 --- a/gui/src/renderer/redux/version/actions.ts +++ b/gui/src/renderer/redux/version/actions.ts @@ -13,7 +13,7 @@ export interface IUpdateVersionAction { type: 'UPDATE_VERSION'; version: string; consistent: boolean; - currentIsBeta: boolean; + isBeta: boolean; } export type VersionAction = IUpdateLatestAction | IUpdateVersionAction; @@ -28,13 +28,13 @@ function updateLatest(latestInfo: IUpdateLatestActionPayload): IUpdateLatestActi function updateVersion( version: string, consistent: boolean, - currentIsBeta: boolean, + isBeta: boolean, ): IUpdateVersionAction { return { type: 'UPDATE_VERSION', version, consistent, - currentIsBeta, + isBeta, }; } diff --git a/gui/src/renderer/redux/version/reducers.ts b/gui/src/renderer/redux/version/reducers.ts index 279b4ed6f4..c0ecd22a8e 100644 --- a/gui/src/renderer/redux/version/reducers.ts +++ b/gui/src/renderer/redux/version/reducers.ts @@ -2,8 +2,8 @@ import { ReduxAction } from '../store'; export interface IVersionReduxState { current: string; - currentIsSupported: boolean; - currentIsBeta: boolean; + supported: boolean; + isBeta: boolean; latest?: string; latestStable?: string; nextUpgrade: string | null; @@ -12,8 +12,8 @@ export interface IVersionReduxState { const initialState: IVersionReduxState = { current: '', - currentIsSupported: true, - currentIsBeta: false, + supported: true, + isBeta: false, latest: undefined, latestStable: undefined, nextUpgrade: null, @@ -36,7 +36,7 @@ export default function ( ...state, current: action.version, consistent: action.consistent, - currentIsBeta: action.currentIsBeta, + isBeta: action.isBeta, }; default: diff --git a/gui/test/components/NotificationArea.spec.tsx b/gui/test/components/NotificationArea.spec.tsx index 95801dfa6d..6b4378f469 100644 --- a/gui/test/components/NotificationArea.spec.tsx +++ b/gui/test/components/NotificationArea.spec.tsx @@ -9,9 +9,9 @@ import { expect } from 'chai'; describe('components/NotificationArea', () => { const defaultVersion = { consistent: true, - currentIsSupported: true, + supported: true, current: '2018.2', - currentIsBeta: false, + isBeta: false, latest: '2018.2-beta1', latestStable: '2018.2', nextUpgrade: null, @@ -191,7 +191,7 @@ describe('components/NotificationArea', () => { }} version={{ ...defaultVersion, - currentIsSupported: false, + supported: false, current: '2018.1', nextUpgrade: '2018.2', }} |
