Remove unused code

This commit is contained in:
2020-02-13 14:08:11 -06:00
parent 19fcf896df
commit efc85c1759
5 changed files with 24 additions and 45 deletions

View File

@@ -46,25 +46,22 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
props.setProviderState(props.provider, state);
};
let configButton = null;
let secondRow = 6;
if (props.allowConfig) {
const pointer = {cursor: props.MState.AllowMount ? 'pointer' : 'no-drop'};
configButton = (
<RootElem colSpan={4}
rowSpan={6}>
<img alt=''
height={'16px'}
onClick={props.MState.AllowMount ? ()=>props.displayConfiguration(props.provider, props.remote) : e=>{e.preventDefault();}}
src={configureImage}
style={{padding: 0, border: 0, margin: 0, ...pointer}}
width={'16px'}/>
</RootElem>
);
}
const pointer = {cursor: props.MState.AllowMount ? 'pointer' : 'no-drop'};
const configButton = (
<RootElem colSpan={4}
rowSpan={6}>
<img alt=''
height={'16px'}
onClick={props.MState.AllowMount ? ()=>props.displayConfiguration(props.provider, props.remote) : e=>{e.preventDefault();}}
src={configureImage}
style={{padding: 0, border: 0, margin: 0, ...pointer}}
width={'16px'}/>
</RootElem>
);
let inputColumnSpan;
let inputControls = null;
let inputControls;
if (props.Platform === 'win32') {
inputColumnSpan = 20;
const index = props.MState.DriveLetters.indexOf(props.PState.MountLocation);
@@ -181,4 +178,4 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
</Grid>
</div>
);
});
});

View File

@@ -203,7 +203,6 @@ class MountItems extends IPCContainer {
if (mount) {
this.sendRequest(Constants.IPC_Mount_Drive, {
Location: location,
NoConsoleSupported: this.props.noConsoleSupported,
Provider: provider,
Remote: remote,
Version: this.props.InstalledVersion,
@@ -344,8 +343,7 @@ class MountItems extends IPCContainer {
let items = [];
for (const provider of Constants.PROVIDER_LIST) {
items.push((
<MountItem allowConfig={this.props.allowConfig}
allowRemove={false}
<MountItem allowRemove={false}
browseClicked={this.handleBrowseLocation}
changed={e => this.handleMountLocationChanged(provider, e.target.value)}
clicked={this.handleMountUnMount}
@@ -359,8 +357,7 @@ class MountItems extends IPCContainer {
if (this.props.remoteSupported) {
for (const provider of this.props.RemoteMounts) {
items.push((
<MountItem allowConfig={this.props.allowConfig}
allowRemove={true}
<MountItem allowRemove={true}
browseClicked={this.handleBrowseLocation}
changed={e => this.handleMountLocationChanged(provider, e.target.value)}
clicked={this.handleMountUnMount}
@@ -375,7 +372,7 @@ class MountItems extends IPCContainer {
} else {
items.splice(items.length - 1, 1)
}
return (
<div style={{margin: 0, padding: 0}}>
{retryDisplay}
@@ -413,4 +410,4 @@ const mapDispatchToProps = dispatch => {
}
};
export default connect(mapStateToProps, mapDispatchToProps)(MountItems);
export default connect(mapStateToProps, mapDispatchToProps)(MountItems);