summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-23 15:43:52 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-08-23 15:59:05 +0200
commit591dda2fedcaa73f605bb336e2aece19229ec43c (patch)
tree970564d0b286f70eb53026ce50e75c1819998b8e
parent08b71ca682e677e9404b439f19ca4f991f6e07d4 (diff)
downloadnextcloud-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.js4
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',