diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-23 15:43:52 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-23 15:59:05 +0200 |
commit | 591dda2fedcaa73f605bb336e2aece19229ec43c (patch) | |
tree | 970564d0b286f70eb53026ce50e75c1819998b8e | |
parent | 08b71ca682e677e9404b439f19ca4f991f6e07d4 (diff) | |
download | nextcloud-server-591dda2fedcaa73f605bb336e2aece19229ec43c.tar.gz nextcloud-server-591dda2fedcaa73f605bb336e2aece19229ec43c.zip |
Show "Uploading..." in web UI for long uploads
If the estimated upload time is bigger than 4 hours it shows the text
"Uploading..." because the time then doesn't give any good hint to the
user anyways.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | apps/files/js/file-upload.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 2fa3122a008..11365a310ed 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -1021,6 +1021,10 @@ OC.Uploader.prototype = _.extend({ } var h = moment.duration(smoothRemainingSeconds, "seconds").humanize(); + if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) { + // show "Uploading ..." for durations longer than 4 hours + h = t('files', 'Uploading...'); + } $('#uploadprogressbar .label .mobile').text(h); $('#uploadprogressbar .label .desktop').text(h); $('#uploadprogressbar').attr('original-title', |