Merge remote-tracking branch 'origin/1.1.x_branch' into 1.2.x_branch

This commit is contained in:
2020-02-13 14:08:39 -06:00
5 changed files with 24 additions and 45 deletions

View File

@@ -89,22 +89,12 @@ class App extends IPCContainer {
!missingDependencies && !missingDependencies &&
!this.props.InstallActive; !this.props.InstallActive;
const allowConfig = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].config_support;
const allowSiaPrime = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].siaprime_support;
const noConsoleSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].no_console_supported;
const remoteSupported = this.props.LocationsLookup[selectedVersion] && const remoteSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].supports_remote; this.props.LocationsLookup[selectedVersion].supports_remote;
const showConfig = !missingDependencies && const showConfig = !missingDependencies &&
this.props.DisplayConfiguration && this.props.DisplayConfiguration &&
!this.props.RebootRequired && !this.props.RebootRequired;
allowConfig;
const showUpgrade = this.props.UpgradeAvailable && const showUpgrade = this.props.UpgradeAvailable &&
!this.props.DisplayError && !this.props.DisplayError &&
@@ -152,10 +142,7 @@ class App extends IPCContainer {
mainContent.push(( mainContent.push((
<Box dxStyle={{padding: 'var(--default_spacing)', height: 'auto'}} <Box dxStyle={{padding: 'var(--default_spacing)', height: 'auto'}}
key={'md_' + key++}> key={'md_' + key++}>
<MountItems allowConfig={allowConfig} <MountItems remoteSupported={remoteSupported}/>
allowSiaPrime={allowSiaPrime}
noConsoleSupported={noConsoleSupported}
remoteSupported={remoteSupported}/>
</Box> </Box>
)); ));
} }

View File

@@ -46,11 +46,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
props.setProviderState(props.provider, state); props.setProviderState(props.provider, state);
}; };
let configButton = null;
let secondRow = 6; let secondRow = 6;
if (props.allowConfig) {
const pointer = {cursor: props.MState.AllowMount ? 'pointer' : 'no-drop'}; const pointer = {cursor: props.MState.AllowMount ? 'pointer' : 'no-drop'};
configButton = ( const configButton = (
<RootElem colSpan={4} <RootElem colSpan={4}
rowSpan={6}> rowSpan={6}>
<img alt='' <img alt=''
@@ -61,10 +59,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => {
width={'16px'}/> width={'16px'}/>
</RootElem> </RootElem>
); );
}
let inputColumnSpan; let inputColumnSpan;
let inputControls = null; let inputControls;
if (props.Platform === 'win32') { if (props.Platform === 'win32') {
inputColumnSpan = 20; inputColumnSpan = 20;
const index = props.MState.DriveLetters.indexOf(props.PState.MountLocation); const index = props.MState.DriveLetters.indexOf(props.PState.MountLocation);

View File

@@ -203,7 +203,6 @@ class MountItems extends IPCContainer {
if (mount) { if (mount) {
this.sendRequest(Constants.IPC_Mount_Drive, { this.sendRequest(Constants.IPC_Mount_Drive, {
Location: location, Location: location,
NoConsoleSupported: this.props.noConsoleSupported,
Provider: provider, Provider: provider,
Remote: remote, Remote: remote,
Version: this.props.InstalledVersion, Version: this.props.InstalledVersion,
@@ -344,8 +343,7 @@ class MountItems extends IPCContainer {
let items = []; let items = [];
for (const provider of Constants.PROVIDER_LIST) { for (const provider of Constants.PROVIDER_LIST) {
items.push(( items.push((
<MountItem allowConfig={this.props.allowConfig} <MountItem allowRemove={false}
allowRemove={false}
browseClicked={this.handleBrowseLocation} browseClicked={this.handleBrowseLocation}
changed={e => this.handleMountLocationChanged(provider, e.target.value)} changed={e => this.handleMountLocationChanged(provider, e.target.value)}
clicked={this.handleMountUnMount} clicked={this.handleMountUnMount}
@@ -359,8 +357,7 @@ class MountItems extends IPCContainer {
if (this.props.remoteSupported) { if (this.props.remoteSupported) {
for (const provider of this.props.RemoteMounts) { for (const provider of this.props.RemoteMounts) {
items.push(( items.push((
<MountItem allowConfig={this.props.allowConfig} <MountItem allowRemove={true}
allowRemove={true}
browseClicked={this.handleBrowseLocation} browseClicked={this.handleBrowseLocation}
changed={e => this.handleMountLocationChanged(provider, e.target.value)} changed={e => this.handleMountLocationChanged(provider, e.target.value)}
clicked={this.handleMountUnMount} clicked={this.handleMountUnMount}

View File

@@ -408,7 +408,7 @@ module.exports.executeScript = script => {
}); });
}; };
module.exports.executeMount = (version, provider, remote, location, noConsoleSupported, exitCallback) => { module.exports.executeMount = (version, provider, remote, location, exitCallback) => {
return new Promise((resolve) => { return new Promise((resolve) => {
const repertoryExec = _getRepertoryExec(version); const repertoryExec = _getRepertoryExec(version);
const processOptions = { const processOptions = {
@@ -424,9 +424,7 @@ module.exports.executeMount = (version, provider, remote, location, noConsoleSup
args.push('-o'); args.push('-o');
args.push('big_writes'); args.push('big_writes');
args.push('-f'); args.push('-f');
if (noConsoleSupported) {
args.push('-nc'); args.push('-nc');
}
} else if (os.platform() === 'win32') { } else if (os.platform() === 'win32') {
args.push('-hidden'); args.push('-hidden');
} }

View File

@@ -222,7 +222,7 @@ const addListeners = (ipcMain, setTrayImage, standardIPCReply) => {
}, error || Error(data.Provider + ' Unmounted')); }, error || Error(data.Provider + ' Unmounted'));
}; };
helpers helpers
.executeMount(data.Version, data.Provider, data.Remote, data.Location, data.NoConsoleSupported, (error, pid) => { .executeMount(data.Version, data.Provider, data.Remote, data.Location, (error, pid) => {
errorHandler(pid, error); errorHandler(pid, error);
}) })
.then(() => { .then(() => {