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>
This commit is contained in:
Morris Jobke 2017-08-23 15:43:52 +02:00
parent 8f20b4566a
commit 47f87bbf8c
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
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',