fix app upgrades?

This commit is contained in:
Jeremy Kauffman 2017-05-25 16:07:32 -04:00
parent 24759b3ab9
commit 260980ff38
2 changed files with 4 additions and 10 deletions

View file

@ -17,7 +17,7 @@ class DownloadingModal extends React.Component {
return (
<Modal isOpen={true} contentLabel="Downloading Update" type="custom">
Downloading Update{downloadProgress ? `: ${downloadProgress}%` : null}
<Line percent={downloadProgress} strokeWidth="4"/>
<Line percent={downloadProgress ? downloadProgress : 0} strokeWidth="4"/>
{downloadComplete ? (
<div>
<br />

View file

@ -27,7 +27,7 @@ reducers[types.CHANGE_PATH] = function(state, action) {
reducers[types.UPGRADE_CANCELLED] = function(state, action) {
return Object.assign({}, state, {
downloadProgress: null,
downloadComplete: false,
upgradeDownloadComplete: false,
modal: null,
})
}
@ -35,7 +35,8 @@ reducers[types.UPGRADE_CANCELLED] = function(state, action) {
reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) {
return Object.assign({}, state, {
downloadDir: action.data.dir,
downloadComplete: true,
upgradeDownloading: false,
upgradeDownloadCompleted: true
})
}
@ -45,13 +46,6 @@ reducers[types.UPGRADE_DOWNLOAD_STARTED] = function(state, action) {
})
}
reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) {
return Object.assign({}, state, {
upgradeDownloading: false,
upgradeDownloadCompleted: true
})
}
reducers[types.SKIP_UPGRADE] = function(state, action) {
sessionStorage.setItem('upgradeSkipped', true);