diff --git a/src/redux/actions/error_actions.js b/src/redux/actions/error_actions.js index 00da4a4..f46c8cc 100644 --- a/src/redux/actions/error_actions.js +++ b/src/redux/actions/error_actions.js @@ -1,4 +1,7 @@ -import {showWindow, shutdownApplication} from './common_actions'; +import { + showWindow, + shutdownApplication +} from './common_actions'; let ErrorActions = []; @@ -27,7 +30,7 @@ export const dismissError = () => { export const notifyError = (msg, critical, callback) => { return dispatch => { ErrorActions = [callback, ...ErrorActions]; - msg = msg.toString(); + msg = msg ? msg.toString() : 'Unknown Error'; dispatch(setErrorInfo(msg, critical)); dispatch(showWindow()); }; diff --git a/src/redux/actions/release_version_actions.js b/src/redux/actions/release_version_actions.js index 263c4f4..3856cec 100644 --- a/src/redux/actions/release_version_actions.js +++ b/src/redux/actions/release_version_actions.js @@ -1,8 +1,8 @@ import axios from 'axios'; import * as Constants from '../../constants'; import {createAction} from 'redux-starter-kit'; -import {setApplicationReady} from './common_actions'; import {notifyError} from './error_actions'; +import {setApplicationReady} from './common_actions'; export const CLEAR_UI_UPGRADE = 'relver/clearUIUpgrade'; export const clearUIUpgrade = () => { @@ -75,7 +75,7 @@ export const loadReleases = () => { })); dispatchActions(locationsLookup, versionLookup); }).catch(error => { - const releases = window.localStorage.getItem('releases'); + const releases = localStorage.getItem('releases'); if (releases && (releases.length > 0)) { const obj = JSON.parse(releases); const locationsLookup = obj.LocationsLookup; diff --git a/src/redux/reducers/common_reducer.js b/src/redux/reducers/common_reducer.js index 91f4294..25ffde9 100644 --- a/src/redux/reducers/common_reducer.js +++ b/src/redux/reducers/common_reducer.js @@ -1,10 +1,10 @@ -import {createReducer} from "redux-starter-kit"; -import {setApplicationReady} from "../actions/common_actions"; +import {createReducer} from 'redux-starter-kit'; +import {setApplicationReady} from '../actions/common_actions'; export const createCommonReducer = (platform, appPlatform, version) => { return createReducer({ - AppReady: false, AppPlatform: appPlatform, + AppReady: false, Platform: platform, Version: version, }, { diff --git a/src/redux/reducers/download_reducer.js b/src/redux/reducers/download_reducer.js index 8f4a983..29c41a6 100644 --- a/src/redux/reducers/download_reducer.js +++ b/src/redux/reducers/download_reducer.js @@ -1,15 +1,20 @@ import {createReducer} from 'redux-starter-kit'; -import {setAllowDownload, SET_DOWNLOAD_BEGIN, setDownloadEnd, setDownloadProgress} from '../actions/download_actions'; +import { + setAllowDownload, + SET_DOWNLOAD_BEGIN, + setDownloadEnd, + setDownloadProgress +} from '../actions/download_actions'; const defaultDownloadState = { DownloadActive: false, - DownloadProgress: 0.0, DownloadingDependency: false, - DownloadName: '', - DownloadType: null, DownloadingRelease: false, + DownloadingUpgrade: false, + DownloadName: '', + DownloadProgress: 0.0, DownloadResult: null, - DownloadingUpgrade: false + DownloadType: null, }; export const downloadReducer = createReducer({ diff --git a/src/redux/reducers/error_reducer.js b/src/redux/reducers/error_reducer.js index f091548..8a25120 100644 --- a/src/redux/reducers/error_reducer.js +++ b/src/redux/reducers/error_reducer.js @@ -1,5 +1,8 @@ import {createReducer} from 'redux-starter-kit'; -import {CLEAR_ERROR, SET_ERROR_INFO} from '../actions/error_actions'; +import { + CLEAR_ERROR, + SET_ERROR_INFO +} from '../actions/error_actions'; export const errorReducer = createReducer({ DisplayError: false, diff --git a/src/redux/reducers/install_reducer.js b/src/redux/reducers/install_reducer.js index 2e97f81..ed6326b 100644 --- a/src/redux/reducers/install_reducer.js +++ b/src/redux/reducers/install_reducer.js @@ -1,5 +1,9 @@ import {createReducer} from 'redux-starter-kit'; -import {setInstallActive, setInstallComplete, setMissingDependencies} from '../actions/install_actions'; +import { + setInstallActive, + setInstallComplete, + setMissingDependencies +} from '../actions/install_actions'; export const installReducer = createReducer({ InstallActive: false, diff --git a/src/redux/reducers/mount_reducer.js b/src/redux/reducers/mount_reducer.js index fe65ed5..dbbfbd2 100644 --- a/src/redux/reducers/mount_reducer.js +++ b/src/redux/reducers/mount_reducer.js @@ -1,6 +1,14 @@ import * as Constants from '../../constants'; import {createReducer} from 'redux-starter-kit'; -import {displayConfiguration, SET_ALLOW_MOUNT, setAutoMountProcessed, setBusy, SET_MOUNT_STATE, SET_MOUNTED, SET_PROVIDER_STATE} from '../actions/mount_actions'; +import { + displayConfiguration, + SET_ALLOW_MOUNT, + setAutoMountProcessed, + setBusy, + SET_MOUNT_STATE, + SET_MOUNTED, + SET_PROVIDER_STATE +} from '../actions/mount_actions'; const providerState = Constants.PROVIDER_LIST.map(provider=> { return { diff --git a/src/redux/reducers/release_version_reducer.js b/src/redux/reducers/release_version_reducer.js index ea2d827..1a681be 100644 --- a/src/redux/reducers/release_version_reducer.js +++ b/src/redux/reducers/release_version_reducer.js @@ -19,6 +19,7 @@ export const releaseVersionReducer = createReducer({ Release: 2, ReleaseUpgradeAvailable: false, UpgradeAvailable: false, + UpgradeData: null, UpgradeDismissed: false, Version: -1, VersionLookup: versionLookup,