VC runtime detection changes
This commit is contained in:
@@ -12,6 +12,7 @@ import {downloadItem} from '../../redux/actions/download_actions';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
AllowMount: state.common.AllowMount,
|
||||
AppPlatform: state.common.AppPlatform,
|
||||
DismissDependencies: state.install.DismissDependencies,
|
||||
DownloadActive: state.download.DownloadActive,
|
||||
@@ -35,6 +36,12 @@ const mapDispatchToProps = dispatch => {
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
const getSelectedVersion = () => {
|
||||
return (props.ReleaseVersion === -1) ?
|
||||
'unavailable' :
|
||||
props.VersionLookup[Constants.RELEASE_TYPES[props.Release]][props.ReleaseVersion];
|
||||
};
|
||||
|
||||
const handleDownloadRelease = () => {
|
||||
const fileName = props.version + '.zip';
|
||||
props.downloadItem(fileName, Constants.INSTALL_TYPES.Release, props.LocationsLookup[props.version].urls);
|
||||
@@ -52,7 +59,10 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
};
|
||||
|
||||
const text = props.InstalledVersion + ' [' + props.AppPlatform + ']';
|
||||
const disabled = props.DownloadActive || props.InstallActive || props.MountsBusy;
|
||||
const disabled = props.DownloadActive ||
|
||||
props.InstallActive ||
|
||||
props.MountsBusy ||
|
||||
(!props.AllowMount && (getSelectedVersion() !== 'unavailable')) ;
|
||||
const releaseExtracting = (props.InstallType === Constants.INSTALL_TYPES.Release);
|
||||
|
||||
let optionsDisplay = [];
|
||||
|
||||
Reference in New Issue
Block a user