Skip to content

Commit 4016f2a

Browse files
committed
Fix loading of plugins upon add/delete
1 parent 88c76e3 commit 4016f2a

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

src/views/Explorer/FilesView/FileComponent.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function confirmDelete(deleteHandle, item) {
103103
}
104104
}
105105

106-
function Actions({downloadHandle, pluginHandle, deleteHandle, item, linkShareHandle, containerID}) {
106+
function Actions({downloadHandle, deleteHandle, item, linkShareHandle, containerID}) {
107107

108108
const {IsDir} = item;
109109
// let {ID, Name} = item;
@@ -148,6 +148,8 @@ function Actions({downloadHandle, pluginHandle, deleteHandle, item, linkShareHan
148148
return (
149149
<React.Fragment>
150150

151+
<PluginsHandler containerID={containerID} item={item}/>
152+
151153
<UncontrolledButtonDropdown>
152154
<DropdownToggle color="link">
153155
<i className="fa fa-ellipsis-v"/>
@@ -281,7 +283,7 @@ FileComponent.propTypes = {
281283
deleteHandle: PropTypes.func.isRequired,
282284

283285
/**
284-
* Function to delete a file.
286+
* Used for handling the plugins click
285287
*/
286288
pluginHandle: PropTypes.func.isRequired,
287289
/**

src/views/Explorer/RemoteExplorerLayout/RemoteExplorerLayout.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {connect} from "react-redux";
55
import {createPath} from "../../../actions/explorerStateActions";
66
import * as PropTypes from 'prop-types';
77
import {addRemoteContainer, changeDistractionFreeMode, changeNumCols} from "../../../actions/explorerActions";
8-
import {loadTestPlugins} from "../../../actions/pluginActions";
8+
import {getPlugins} from "../../../actions/pluginActions";
99
import ErrorBoundary from "../../../ErrorHandling/ErrorBoundary";
1010

1111
import singlePaneImg from '../../../assets/img/single-pane.png';
@@ -28,14 +28,14 @@ class RemoteExplorerLayout extends React.Component {
2828

2929
componentDidMount() {
3030
//Load one explorer layout
31-
const {numContainers, addRemoteContainer} = this.props;
31+
const {numContainers, addRemoteContainer, getPlugins} = this.props;
3232

3333
if (numContainers < 1) {
3434
addRemoteContainer(0)
3535
}
3636

3737
// Load the test plugins
38-
loadTestPlugins();
38+
getPlugins();
3939

4040
}
4141

@@ -93,14 +93,14 @@ class RemoteExplorerLayout extends React.Component {
9393
}
9494
</Row>
9595

96-
<Row>
97-
<TabbedPanes
98-
numCols={numCols}
99-
distractionFreeMode={distractionFreeMode}
100-
activeRemoteContainerID={activeRemoteContainerID}
101-
containers={containers}
102-
/>
103-
</Row>
96+
<Row>
97+
<TabbedPanes
98+
numCols={numCols}
99+
distractionFreeMode={distractionFreeMode}
100+
activeRemoteContainerID={activeRemoteContainerID}
101+
containers={containers}
102+
/>
103+
</Row>
104104
</DndProvider>
105105
</ErrorBoundary>
106106
);
@@ -124,7 +124,7 @@ RemoteExplorerLayout.propTypes = {
124124
createPath: PropTypes.func.isRequired,
125125
changeNumCols: PropTypes.func.isRequired,
126126
distractionFreeMode: PropTypes.bool.isRequired,
127-
loadTestPlugins: PropTypes.func.isRequired,
127+
getPlugins: PropTypes.func.isRequired,
128128

129129
loadedTestPlugins: PropTypes.object.isRequired,
130130
loadedPlugins: PropTypes.object.isRequired,
@@ -135,6 +135,7 @@ export default connect(mapStateToProps, {
135135
createPath,
136136
changeNumCols,
137137
changeDistractionFreeMode,
138-
addRemoteContainer
138+
addRemoteContainer,
139+
getPlugins
139140
})
140141
(RemoteExplorerLayout);

0 commit comments

Comments
 (0)