mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
Merge branch '7.0'
This commit is contained in:
@@ -78,6 +78,7 @@ class LibContentView extends React.Component {
|
||||
isCopyMoveProgressDialogShow: false,
|
||||
asyncCopyMoveTaskId: '',
|
||||
asyncOperationProgress: 0,
|
||||
asyncOperatedFilesLength: 0,
|
||||
};
|
||||
|
||||
this.oldonpopstate = window.onpopstate;
|
||||
@@ -578,9 +579,9 @@ class LibContentView extends React.Component {
|
||||
let res = await seafileAPI.queryAsyncOperationProgress(asyncCopyMoveTaskId);
|
||||
let data = res.data;
|
||||
if (data.failed) {
|
||||
let message = gettext('Files moved to another repository failed.')
|
||||
let message = gettext('Failed to move files to another library.');
|
||||
if (asyncOperationType === 'copy') {
|
||||
message = gettext('Files copyed to another repository failed.')
|
||||
message = gettext('Failed to copy files to another library.');
|
||||
}
|
||||
toaster.danger(message);
|
||||
this.setState({
|
||||
@@ -592,9 +593,9 @@ class LibContentView extends React.Component {
|
||||
|
||||
if (data.successful) {
|
||||
this.setState({isCopyMoveProgressDialogShow: false});
|
||||
let message = gettext('Files moved to another repository successfully.')
|
||||
let message = gettext('Successfully moved files to another library.');
|
||||
if (asyncOperationType === 'copy') {
|
||||
message = gettext('Files copyed to another repository successfully.')
|
||||
message = gettext('Successfully copyed files to another library.');
|
||||
}
|
||||
toaster.success(message);
|
||||
return;
|
||||
@@ -636,6 +637,7 @@ class LibContentView extends React.Component {
|
||||
|
||||
if (repoID !== destRepo.repo_id) {
|
||||
this.setState({
|
||||
asyncOperatedFilesLength: dirNames.length,
|
||||
asyncOperationProgress: 0,
|
||||
asyncOperationType: 'move',
|
||||
isCopyMoveProgressDialogShow: true
|
||||
@@ -684,6 +686,7 @@ class LibContentView extends React.Component {
|
||||
|
||||
if (repoID !== destRepo.repo_id) {
|
||||
this.setState({
|
||||
asyncOperatedFilesLength: dirNames.length,
|
||||
asyncOperationProgress: 0,
|
||||
asyncOperationType: 'copy',
|
||||
isCopyMoveProgressDialogShow: true
|
||||
@@ -1003,6 +1006,7 @@ class LibContentView extends React.Component {
|
||||
|
||||
if (repoID !== destRepo.repo_id) {
|
||||
this.setState({
|
||||
asyncOperatedFilesLength: 1,
|
||||
asyncOperationProgress: 0,
|
||||
asyncOperationType: 'move',
|
||||
isCopyMoveProgressDialogShow: true,
|
||||
@@ -1056,6 +1060,7 @@ class LibContentView extends React.Component {
|
||||
|
||||
if (repoID !== destRepo.repo_id) {
|
||||
this.setState({
|
||||
asyncOperatedFilesLength: 1,
|
||||
asyncOperationProgress: 0,
|
||||
asyncOperationType: 'copy',
|
||||
isCopyMoveProgressDialogShow: true
|
||||
@@ -1858,6 +1863,7 @@ class LibContentView extends React.Component {
|
||||
{this.state.isCopyMoveProgressDialogShow && (
|
||||
<CopyMoveDirentProgressDialog
|
||||
type={this.state.asyncOperationType}
|
||||
asyncOperatedFilesLength={this.state.asyncOperatedFilesLength}
|
||||
asyncOperationProgress={this.state.asyncOperationProgress}
|
||||
toggleDialog={this.onMoveProgressDialogToggle}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user