#40: Support for remote Windows mounts - partial

This commit is contained in:
2019-10-01 17:11:07 -05:00
parent 686774741f
commit 6a7c471f46
11 changed files with 82 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
import React from 'react';
import AddRemoteMount from '../../components/AddRemoteMount/AddRemoteMount';
import Box from '../../components/UI/Box/Box';
import Button from '../../components/UI/Button/Button';
import {connect} from 'react-redux';
@@ -298,16 +299,35 @@ class MountItems extends IPCContainer {
for (const provider of Constants.PROVIDER_LIST) {
items.push((
<MountItem allowConfig={this.props.allowConfig}
allowRemove={false}
browseClicked={this.handleBrowseLocation}
changed={e => this.handleMountLocationChanged(provider, e.target.value)}
clicked={this.handleMountUnMount}
key={'mi_' + items.length}
provider={provider}/>
));
if (items.length !== this.state.length) {
items.push(<div key={'di_' + items.length}
style={{paddingTop: '4px'}} />)
}
if (this.props.remoteSupported) {
for (const provider of this.props.RemoteMounts) {
items.push((
<MountItem allowConfig={this.props.allowConfig}
allowRemove={true}
browseClicked={this.handleBrowseLocation}
changed={e => this.handleMountLocationChanged(provider, e.target.value)}
clicked={this.handleMountUnMount}
key={'mi_' + items.length}
provider={provider}/>
));
items.push(<div key={'di_' + items.length}
style={{paddingTop: '12px'}} />)
style={{paddingTop: '4px'}}/>)
}
items.push(<AddRemoteMount key={'mia_' + items.length + 1}/>);
} else {
items.splice(items.length - 1, 1)
}
return (
@@ -326,6 +346,7 @@ const mapStateToProps = state => {
MountsBusy: state.mounts.MountsBusy,
Platform: state.common.Platform,
ProviderState: state.mounts.ProviderState,
RemoteMounts: state.mounts.RemoteMounts,
}
};