mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
improve move copy code (#4522)
This commit is contained in:
@@ -76,7 +76,7 @@ class DirentListItem extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
if (!nextProps.isItemFreezed) {
|
if (nextProps.isItemFreezed !== this.props.isItemFreezed && !nextProps.isItemFreezed) {
|
||||||
this.setState({
|
this.setState({
|
||||||
highlight: false,
|
highlight: false,
|
||||||
isOperationShow: false,
|
isOperationShow: false,
|
||||||
|
@@ -607,6 +607,8 @@ class LibContentView extends React.Component {
|
|||||||
this.deleteTreeNode(this.currentMoveItemPath);
|
this.deleteTreeNode(this.currentMoveItemPath);
|
||||||
}
|
}
|
||||||
this.moveDirent(this.currentMoveItemName);
|
this.moveDirent(this.currentMoveItemName);
|
||||||
|
this.currentMoveItemName = '';
|
||||||
|
this.currentMoveItemPath = '';
|
||||||
} else {
|
} else {
|
||||||
if (this.state.currentMode === 'column') {
|
if (this.state.currentMode === 'column') {
|
||||||
let direntPaths = this.getSelectedDirentPaths();
|
let direntPaths = this.getSelectedDirentPaths();
|
||||||
@@ -639,8 +641,9 @@ class LibContentView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cancelCopyMoveDirent = () => {
|
cancelCopyMoveDirent = () => {
|
||||||
let taskId = this.state.asyncCopyMoveTaskId;
|
let { taskId, direntList } = this.state.asyncCopyMoveTaskId;
|
||||||
seafileAPI.cancelCopyMoveOperation(taskId);
|
seafileAPI.cancelCopyMoveOperation(taskId);
|
||||||
|
this.setState({direntList: direntList.slice(0)});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMoveProgressDialogToggle = () => {
|
onMoveProgressDialogToggle = () => {
|
||||||
|
Reference in New Issue
Block a user