[partial] #30: Add uninstall feature with reboot to handle WinFSP upgrades/downgrades
This commit is contained in:
@@ -15,7 +15,7 @@ const mapStateToProps = state => {
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
downloadItem: (name, type, url) => dispatch(downloadItem(name, type, url))
|
||||
downloadItem: (name, type, url, isWinFSP) => dispatch(downloadItem(name, type, url, isWinFSP))
|
||||
};
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
|
||||
return (
|
||||
<Dependency key={i}
|
||||
name={k.display}
|
||||
onDownload={()=>props.downloadItem(extractFileNameFromURL(k.download), Constants.INSTALL_TYPES.Dependency, k.download)}/>
|
||||
onDownload={()=>props.downloadItem(extractFileNameFromURL(k.download), Constants.INSTALL_TYPES.Dependency, k.download, k.is_winfsp)}/>
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
11
src/components/Reboot/Reboot.css
Normal file
11
src/components/Reboot/Reboot.css
Normal file
@@ -0,0 +1,11 @@
|
||||
.RebootHeading {
|
||||
color: var(--text_color_error);
|
||||
text-align: center;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.RebootContent {
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
24
src/components/Reboot/Reboot.js
Normal file
24
src/components/Reboot/Reboot.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import './Reboot.css';
|
||||
import {connect} from 'react-redux';
|
||||
import Box from '../UI/Box/Box';
|
||||
import Button from '../UI/Button/Button';
|
||||
import {rebootSystem} from '../../redux/actions/common_actions';
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
rebootSystem: () => dispatch(rebootSystem()),
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(null, mapDispatchToProps)(props => {
|
||||
return (
|
||||
<Box dxDark dxStyle={{padding: '8px'}}>
|
||||
<h1 className={'RebootHeading'}>Reboot System</h1>
|
||||
<div className={'RebootContent'}>
|
||||
<p>Repertory requires a system reboot to continue.</p>
|
||||
</div>
|
||||
<Button clicked={()=>props.rebootSystem()}>Reboot Now</Button>
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user