SiaPrime changes
This commit is contained in:
@@ -254,6 +254,13 @@ ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => {
|
|||||||
.then((results) => {
|
.then((results) => {
|
||||||
let hsLocation = results.Hyperspace.Location;
|
let hsLocation = results.Hyperspace.Location;
|
||||||
let siaLocation = results.Sia.Location;
|
let siaLocation = results.Sia.Location;
|
||||||
|
if (!results.SiaPrime) {
|
||||||
|
results.SiaPrime = {
|
||||||
|
Active: false,
|
||||||
|
Location: '',
|
||||||
|
PID: -1,
|
||||||
|
};
|
||||||
|
}
|
||||||
let siaPrimeLocation = results.SiaPrime.Location;
|
let siaPrimeLocation = results.SiaPrime.Location;
|
||||||
if (os.platform() === 'win32') {
|
if (os.platform() === 'win32') {
|
||||||
hsLocation = hsLocation.toUpperCase();
|
hsLocation = hsLocation.toUpperCase();
|
||||||
|
|||||||
@@ -175,8 +175,8 @@ module.exports.executeMount = (directory, version, storageType, location, exitCa
|
|||||||
args.push('-sp');
|
args.push('-sp');
|
||||||
}
|
}
|
||||||
if (os.platform() === 'linux') {
|
if (os.platform() === 'linux') {
|
||||||
args.push("-o");
|
args.push('-o');
|
||||||
args.push("big_writes");
|
args.push('big_writes');
|
||||||
}
|
}
|
||||||
if (os.platform() === 'win32') {
|
if (os.platform() === 'win32') {
|
||||||
args.push('-hidden');
|
args.push('-hidden');
|
||||||
|
|||||||
@@ -643,6 +643,9 @@ class App extends Component {
|
|||||||
const allowConfig = this.state.LocationsLookup[selectedVersion] &&
|
const allowConfig = this.state.LocationsLookup[selectedVersion] &&
|
||||||
this.state.LocationsLookup[selectedVersion].config_support;
|
this.state.LocationsLookup[selectedVersion].config_support;
|
||||||
|
|
||||||
|
const allowSiaPrime = this.state.LocationsLookup[selectedVersion] &&
|
||||||
|
this.state.LocationsLookup[selectedVersion].siaprime_support;
|
||||||
|
|
||||||
const showDependencies = missingDependencies &&
|
const showDependencies = missingDependencies &&
|
||||||
!this.state.DownloadActive;
|
!this.state.DownloadActive;
|
||||||
|
|
||||||
@@ -738,6 +741,7 @@ class App extends Component {
|
|||||||
<div key={'md_' + key++}
|
<div key={'md_' + key++}
|
||||||
style={{height: '66%'}}>
|
style={{height: '66%'}}>
|
||||||
<MountItems allowConfig={allowConfig}
|
<MountItems allowConfig={allowConfig}
|
||||||
|
allowSiaPrime={allowSiaPrime}
|
||||||
autoMountChanged={this.handleAutoMountChanged}
|
autoMountChanged={this.handleAutoMountChanged}
|
||||||
autoMountProcessed={this.notifyAutoMountProcessed}
|
autoMountProcessed={this.notifyAutoMountProcessed}
|
||||||
autoRestartChanged={this.handleAutoRestartChanged}
|
autoRestartChanged={this.handleAutoRestartChanged}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export default CSSModules((props) => {
|
|||||||
rowSpan={6}>
|
rowSpan={6}>
|
||||||
<img alt=''
|
<img alt=''
|
||||||
height={'16px'}
|
height={'16px'}
|
||||||
onClick={props.configClicked}
|
onClick={props.disabled ? (e)=>{e.preventDefault();} : props.configClicked}
|
||||||
src={configureImage}
|
src={configureImage}
|
||||||
style={{padding: 0, border: 0, margin: 0, cursor: 'pointer'}}
|
style={{padding: 0, border: 0, margin: 0, cursor: 'pointer'}}
|
||||||
width={'16px'}/>
|
width={'16px'}/>
|
||||||
@@ -32,7 +32,7 @@ export default CSSModules((props) => {
|
|||||||
inputColumnSpan = 20;
|
inputColumnSpan = 20;
|
||||||
inputControl = <DropDown changed={props.changed}
|
inputControl = <DropDown changed={props.changed}
|
||||||
colSpan={inputColumnSpan}
|
colSpan={inputColumnSpan}
|
||||||
disabled={!props.allowMount || props.mounted}
|
disabled={!props.allowMount || props.mounted || props.disabled}
|
||||||
items={props.items}
|
items={props.items}
|
||||||
row={secondRow}
|
row={secondRow}
|
||||||
rowSpan={7}
|
rowSpan={7}
|
||||||
@@ -44,14 +44,14 @@ export default CSSModules((props) => {
|
|||||||
<RootElem colSpan={inputColumnSpan}
|
<RootElem colSpan={inputColumnSpan}
|
||||||
row={secondRow}
|
row={secondRow}
|
||||||
rowSpan={7}>
|
rowSpan={7}>
|
||||||
<input disabled={!props.allowMount || props.mounted}
|
<input disabled={!props.allowMount || props.mounted || props.disabled}
|
||||||
onChange={props.changed}
|
onChange={props.changed}
|
||||||
type={'text'}
|
type={'text'}
|
||||||
value={props.location}/>
|
value={props.location}/>
|
||||||
</RootElem>);
|
</RootElem>);
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttonDisplay = props.allowMount ?
|
const buttonDisplay = props.allowMount || props.disabled ?
|
||||||
(props.mounted ? 'Unmount' : 'Mount') :
|
(props.mounted ? 'Unmount' : 'Mount') :
|
||||||
<Loader color={'var(--heading_text_color)'}
|
<Loader color={'var(--heading_text_color)'}
|
||||||
height='19px'
|
height='19px'
|
||||||
@@ -62,7 +62,7 @@ export default CSSModules((props) => {
|
|||||||
<Button clicked={()=>props.clicked(props.title, !props.mounted, props.location, props.pid)}
|
<Button clicked={()=>props.clicked(props.title, !props.mounted, props.location, props.pid)}
|
||||||
col={inputColumnSpan + 2}
|
col={inputColumnSpan + 2}
|
||||||
colSpan={20}
|
colSpan={20}
|
||||||
disabled={!props.allowMount}
|
disabled={!props.allowMount || props.disabled}
|
||||||
row={secondRow}
|
row={secondRow}
|
||||||
rowSpan={7}>
|
rowSpan={7}>
|
||||||
{buttonDisplay}
|
{buttonDisplay}
|
||||||
@@ -74,6 +74,7 @@ export default CSSModules((props) => {
|
|||||||
row={secondRow}
|
row={secondRow}
|
||||||
rowSpan={7}>
|
rowSpan={7}>
|
||||||
<input checked={props.autoMount}
|
<input checked={props.autoMount}
|
||||||
|
disabled={props.disabled}
|
||||||
onChange={props.autoMountChanged}
|
onChange={props.autoMountChanged}
|
||||||
type='checkbox'/>Auto-mount
|
type='checkbox'/>Auto-mount
|
||||||
</RootElem>
|
</RootElem>
|
||||||
@@ -85,6 +86,7 @@ export default CSSModules((props) => {
|
|||||||
row={secondRow}
|
row={secondRow}
|
||||||
rowSpan={7}>
|
rowSpan={7}>
|
||||||
<input checked={props.autoRestart}
|
<input checked={props.autoRestart}
|
||||||
|
disabled={props.disabled}
|
||||||
onChange={props.autoRestartChanged}
|
onChange={props.autoRestartChanged}
|
||||||
type='checkbox'/>Restart
|
type='checkbox'/>Restart
|
||||||
</RootElem>
|
</RootElem>
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ class MountItems extends Component {
|
|||||||
(this.props.sia.MountLocation.length > 0)) {
|
(this.props.sia.MountLocation.length > 0)) {
|
||||||
this.handleMountUnMount('Sia', true, this.props.sia.MountLocation);
|
this.handleMountUnMount('Sia', true, this.props.sia.MountLocation);
|
||||||
}
|
}
|
||||||
if (this.props.siaprime.AutoMount &&
|
if (this.props.allowSiaPrime && this.props.siaprime.AutoMount &&
|
||||||
!this.state.SiaPrime.Mounted &&
|
!this.state.SiaPrime.Mounted &&
|
||||||
(this.props.siaprime.MountLocation.length > 0)) {
|
(this.props.siaprime.MountLocation.length > 0)) {
|
||||||
this.handleMountUnMount('SiaPrime', true, this.props.siaprime.MountLocation);
|
this.handleMountUnMount('SiaPrime', true, this.props.siaprime.MountLocation);
|
||||||
@@ -250,6 +250,7 @@ class MountItems extends Component {
|
|||||||
changed={(e) => this.handleMountLocationChanged('SiaPrime', e.target.value)}
|
changed={(e) => this.handleMountLocationChanged('SiaPrime', e.target.value)}
|
||||||
clicked={this.handleMountUnMount}
|
clicked={this.handleMountUnMount}
|
||||||
configClicked={()=>this.props.configClicked('SiaPrime')}
|
configClicked={()=>this.props.configClicked('SiaPrime')}
|
||||||
|
disabled={!this.props.allowSiaPrime}
|
||||||
items={this.state.SiaPrime.DriveLetters}
|
items={this.state.SiaPrime.DriveLetters}
|
||||||
location={this.props.siaprime.MountLocation}
|
location={this.props.siaprime.MountLocation}
|
||||||
mounted={this.state.SiaPrime.Mounted}
|
mounted={this.state.SiaPrime.Mounted}
|
||||||
|
|||||||
Reference in New Issue
Block a user