f065218ff4
* Prevent .deb packages from being opened with archive manager. * Allow to properly cancel download upgrade and prevent multiple downloads. * Fix missing app-update.yml file for .deb builds. * Small fix for allowPrerelease prop in autoUpdater. * Use release/tags endpoint to get the release details. * Handle error case for auto updater. * Make install now button display the upgrade modal. * Use GitHub as provider for manual update url. * Small fixes in updater. * Fix small lint errors. * Properly handle auto download on/off.
28 lines
886 B
JavaScript
28 lines
886 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doStartUpgrade, doCancelUpgrade, doHideModal } from 'redux/actions/app';
|
|
import {
|
|
selectDownloadProgress,
|
|
selectDownloadComplete,
|
|
selectUpgradeDownloadPath,
|
|
selectUpgradeInitialized,
|
|
selectUpgradeFailedInstallation,
|
|
} from 'redux/selectors/app';
|
|
import ModalDownloading from './view';
|
|
|
|
const select = (state) => ({
|
|
downloadProgress: selectDownloadProgress(state),
|
|
downloadComplete: selectDownloadComplete(state),
|
|
downloadItem: selectUpgradeDownloadPath(state),
|
|
upgradeInitialized: selectUpgradeInitialized(state),
|
|
failedInstallation: selectUpgradeFailedInstallation(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
startUpgrade: () => dispatch(doStartUpgrade()),
|
|
cancelUpgrade: () => {
|
|
dispatch(doHideModal());
|
|
dispatch(doCancelUpgrade());
|
|
},
|
|
});
|
|
|
|
export default connect(select, perform)(ModalDownloading);
|