diff --git a/core/js/update.js b/core/js/update.js index e849d8a16c..cd5ee8b080 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -87,7 +87,7 @@ $('#update-progress-icon') .addClass('icon-checkmark-white') - .removeClass('icon-loading-dark'); + .removeClass('icon-loading-dark'); if (hasWarnings) { $el.find('.update-show-detailed').before( @@ -97,9 +97,16 @@ ); } else { // FIXME: use product name + + $el.find('.update-show-detailed').before( - $('
'+t('core', 'The update was successful. Redirecting you to Nextcloud now.')+'
') + $('') ); + + for(var i = 0; i <= 4; i++){ + self.updateCountdown(i, 4); + } + setTimeout(function () { OC.redirect(OC.webroot + '/'); }, 3000); @@ -107,6 +114,12 @@ }); }, + updateCountdown: function (i, total) { + setTimeout(function(){ + $("#redirect-countdown").text(n('core', 'The update was successful. Redirecting you to Nextcloud in %n second.', 'The update was successful. Redirecting you to Nextcloud in %n seconds.', i)); + }, (total - i) * 1000); + }, + setMessage: function(message) { $('#update-progress-message').html(message); $('#update-progress-detailed')