[#52: Mount location is not set error on new install] [#49: Download progress is not visible if dependencies are missing] [#51: javascript error] [#53: Busy notification is still visible when 'Install' button is available]

This commit is contained in:
2021-03-08 16:25:06 -06:00
parent ef5ae37656
commit 721a08c33f
5 changed files with 34 additions and 12 deletions

View File

@@ -9,6 +9,12 @@ import {
} from '../../../redux/actions/error_actions';
import {installReleaseByVersion} from '../../../redux/actions/install_actions';
const mapStateToProps = state => {
return {
AllowInstall: state.install.MissingDependencies.length === 0,
};
};
const mapDispatchToProps = dispatch => {
return {
installReleaseByVersion: (release, version) => dispatch(installReleaseByVersion(release, version)),
@@ -17,7 +23,15 @@ const mapDispatchToProps = dispatch => {
};
};
export default connect(null, mapDispatchToProps)(({dismiss, release, lastItem, notifyError, notifyInfo, installReleaseByVersion}) => {
export default connect(mapStateToProps, mapDispatchToProps)(({
AllowInstall,
dismiss,
release,
lastItem,
notifyError,
notifyInfo,
installReleaseByVersion
}) => {
const title = '[' + Constants.RELEASE_TYPES[release.Release] + '] ' + release.Display;
const installReleaseVersion = () => {
dismiss();
@@ -46,7 +60,9 @@ export default connect(null, mapDispatchToProps)(({dismiss, release, lastItem, n
<div style={{width: 'var(--default_spacing)'}}/>
</td>
<td width="50%">
<Button buttonStyles={{width: '100%'}} clicked={installReleaseVersion}>Install</Button>
{AllowInstall ?
<Button buttonStyles={{width: '100%'}}
clicked={installReleaseVersion}>Install</Button> : null}
</td>
</tr>
{lastItem ? null : <tr style={{height: 'var(--default_spacing)'}}/>}