1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

Download tips (#3242)

* Download out of limit prompt

* Canonical format

* Remove gettext

* delete wrap
This commit is contained in:
zxj96
2019-04-11 18:02:39 +08:00
committed by Daniel Pan
parent 0e0d38952b
commit d055eb7a4f
2 changed files with 12 additions and 1 deletions

View File

@@ -82,6 +82,11 @@ class MutipleDirOperationToolbar extends React.Component {
this.zipToken = res.data['zip_token'];
this.addDownloadAnimation();
this.interval = setInterval(this.addDownloadAnimation, 1000);
}).catch((error) => {
clearInterval(this.interval);
this.setState({isProgressDialogShow: false});
let errorMessage = error.response.data.error_msg;
toaster.danger(errorMessage);
});
}
}
@@ -110,6 +115,7 @@ class MutipleDirOperationToolbar extends React.Component {
onCancelDownload = () => {
seafileAPI.cancelZipTask(this.zipToken).then(() => {
clearInterval(this.interval);
this.setState({isProgressDialogShow: false});
});
}