#34: Allow cancelling/closing dependency installation if version count > 1
This commit is contained in:
16
src/App.js
16
src/App.js
@@ -2,7 +2,6 @@ import React from 'react';
|
||||
import './App.css';
|
||||
import Box from './components/UI/Box/Box';
|
||||
import Configuration from './containers/Configuration/Configuration';
|
||||
import {checkVersionInstalled} from './redux/actions/install_actions';
|
||||
import {connect} from 'react-redux';
|
||||
import DependencyList from './components/DependencyList/DependencyList';
|
||||
import DownloadProgress from './components/DownloadProgress/DownloadProgress';
|
||||
@@ -45,7 +44,6 @@ class App extends IPCContainer {
|
||||
(prevProps.ReleaseVersion !== this.props.ReleaseVersion) ||
|
||||
(prevProps.VersionLookup !== this.props.VersionLookup)) {
|
||||
this.props.saveState();
|
||||
this.props.checkVersionInstalled();
|
||||
} else if (Object.keys(this.props.ProviderState).filter(k=> {
|
||||
return this.props.ProviderState[k] !== prevProps.ProviderState[k];
|
||||
}).length > 0) {
|
||||
@@ -78,8 +76,11 @@ class App extends IPCContainer {
|
||||
(selectedVersion !== 'unavailable') &&
|
||||
(selectedVersion !== this.props.InstalledVersion);
|
||||
|
||||
const missingDependencies = (this.props.MissingDependencies.length > 0);
|
||||
const allowMount = this.props.InstalledVersion !== 'none' &&
|
||||
const missingDependencies = (this.props.MissingDependencies.length > 0) &&
|
||||
this.props.AllowMount;
|
||||
|
||||
const allowMount = this.props.AllowMount &&
|
||||
this.props.InstalledVersion !== 'none' &&
|
||||
!missingDependencies &&
|
||||
!this.props.InstallActive;
|
||||
|
||||
@@ -108,7 +109,9 @@ class App extends IPCContainer {
|
||||
const showDependencies = !showUpgrade &&
|
||||
missingDependencies &&
|
||||
!this.props.DownloadActive &&
|
||||
!this.props.RebootRequired;
|
||||
!this.props.RebootRequired &&
|
||||
!this.props.DismissDependencies &&
|
||||
this.props.AllowMount;
|
||||
|
||||
const rebootDisplay = this.createModalConditionally(this.props.RebootRequired, <Reboot />);
|
||||
const configDisplay = this.createModalConditionally(showConfig, <Configuration version={selectedVersion} />);
|
||||
@@ -184,8 +187,10 @@ class App extends IPCContainer {
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
AllowDownload: state.download.AllowDownload,
|
||||
AllowMount: state.common.AllowMount,
|
||||
AppPlatform: state.common.AppPlatform,
|
||||
AppReady: state.common.AppReady,
|
||||
DismissDependencies: state.install.DismissDependencies,
|
||||
DisplayConfiguration: state.mounts.DisplayConfiguration,
|
||||
DisplayError: state.error.DisplayError,
|
||||
DownloadActive: state.download.DownloadActive,
|
||||
@@ -207,7 +212,6 @@ const mapStateToProps = state => {
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
checkVersionInstalled: () => dispatch(checkVersionInstalled()),
|
||||
loadReleases: ()=> dispatch(loadReleases()),
|
||||
notifyError: (msg, critical, callback) => dispatch(notifyError(msg, critical, callback)),
|
||||
saveState: () => dispatch(saveState()),
|
||||
|
||||
Reference in New Issue
Block a user