[partial] #30: Add uninstall feature with reboot to handle WinFSP upgrades/downgrades

This commit is contained in:
2019-08-13 14:06:50 -05:00
parent 9f45b0f03f
commit fa130c7dd1
10 changed files with 98 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ import Loading from './components/UI/Loading/Loading';
import Modal from './components/UI/Modal/Modal';
import MountItems from './containers/MountItems/MountItems';
import {notifyError} from './redux/actions/error_actions';
import Reboot from './components/Reboot/Reboot';
import ReleaseVersionDisplay from './components/ReleaseVersionDisplay/ReleaseVersionDisplay';
import {saveState} from './redux/actions/common_actions';
import Text from './components/UI/Text/Text';
@@ -93,6 +94,7 @@ class App extends IPCContainer {
const showConfig = !missingDependencies &&
this.props.DisplayConfiguration &&
!this.props.RebootRequired &&
allowConfig;
const showUpgrade = this.props.UpgradeAvailable &&
@@ -100,12 +102,15 @@ class App extends IPCContainer {
!showConfig &&
!this.props.DownloadActive &&
!this.props.UpgradeDismissed &&
!this.props.InstallActive;
!this.props.InstallActive &&
!this.props.RebootRequired;
const showDependencies = !showUpgrade &&
missingDependencies &&
!this.props.DownloadActive;
!this.props.DownloadActive &&
!this.props.RebootRequired;
const rebootDisplay = this.createModalConditionally(this.props.RebootRequired, <Reboot />);
const configDisplay = this.createModalConditionally(showConfig, <Configuration version={selectedVersion} />);
const dependencyDisplay = this.createModalConditionally(showDependencies, <DependencyList/>);
const downloadDisplay = this.createModalConditionally(this.props.DownloadActive, <DownloadProgress/>);
@@ -143,6 +148,7 @@ class App extends IPCContainer {
{upgradeDisplay}
{downloadDisplay}
{configDisplay}
{rebootDisplay}
<div className={'AppContainer'}>
<div className={'AppHeader'}>
<Box>
@@ -189,6 +195,7 @@ const mapStateToProps = state => {
MissingDependencies: state.install.MissingDependencies,
MountsBusy: state.mounts.MountsBusy,
ProviderState: state.mounts.ProviderState,
RebootRequired: state.common.RebootRequired,
Release: state.relver.Release,
ReleaseVersion: state.relver.Version,
UpgradeAvailable: state.relver.UpgradeAvailable,