Added unmount
This commit is contained in:
@@ -60,7 +60,7 @@ export default CSSModules((props) => {
|
||||
width='19px'/>;
|
||||
|
||||
const actionsDisplay = (
|
||||
<Button clicked={()=>props.clicked(props.title, !props.mounted, props.location, props.pid)}
|
||||
<Button clicked={()=>props.clicked(props.title, !props.mounted, props.location)}
|
||||
col={inputColumnSpan + 2}
|
||||
colSpan={21}
|
||||
disabled={!props.allowMount || props.disabled}
|
||||
|
||||
@@ -19,7 +19,6 @@ class MountItems extends Component {
|
||||
AllowMount: false,
|
||||
DriveLetters: [],
|
||||
Mounted: false,
|
||||
PID: -1,
|
||||
};
|
||||
}
|
||||
if (ipcRenderer) {
|
||||
@@ -58,7 +57,7 @@ class MountItems extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
handleMountUnMount = (storageType, mount, location, pid) => {
|
||||
handleMountUnMount = (storageType, mount, location) => {
|
||||
if (ipcRenderer) {
|
||||
const state = {
|
||||
...this.state[storageType],
|
||||
@@ -82,7 +81,6 @@ class MountItems extends Component {
|
||||
ipcRenderer.send(Constants.IPC_Unmount_Drive, {
|
||||
Directory: this.props.directory,
|
||||
Location: location,
|
||||
PID: pid,
|
||||
StorageType: storageType,
|
||||
Version: this.props.version,
|
||||
});
|
||||
@@ -101,7 +99,6 @@ class MountItems extends Component {
|
||||
AllowMount: true,
|
||||
DriveLetters: (arg.data.DriveLetters[provider]),
|
||||
Mounted: (arg.data.Locations[provider].length > 0),
|
||||
PID: arg.data.PIDS[provider],
|
||||
};
|
||||
mountsBusy = mountsBusy || state[provider].Mounted;
|
||||
}
|
||||
@@ -135,7 +132,6 @@ class MountItems extends Component {
|
||||
onMountDriveReply = (event, arg) => {
|
||||
const state = {
|
||||
...this.state[arg.data.StorageType],
|
||||
PID: arg.data.PID,
|
||||
Mounted: arg.data.Success,
|
||||
};
|
||||
this.setState({
|
||||
@@ -188,7 +184,6 @@ class MountItems extends Component {
|
||||
key={'mi_' + items.length}
|
||||
location={this.props[providerLower].MountLocation}
|
||||
mounted={this.state[provider].Mounted}
|
||||
pid={this.state[provider].PID}
|
||||
platform={this.props.platform}
|
||||
title={provider} />
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user