Merge pull request #6240 from nextcloud/12-6239

[stable12] Show "Uploading..." in web UI for long uploads
This commit is contained in:
Roeland Jago Douma 2017-08-23 19:16:50 +02:00 committed by GitHub
commit 81acf70bca
1 changed files with 4 additions and 0 deletions

View File

@ -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',