Revert "[fix] Reload the page after postinstall anyway"

This reverts commit c03423a6ff.
This commit is contained in:
Kload 2014-05-27 16:38:41 +02:00
parent c03423a6ff
commit 779fb1adfa

View file

@ -213,10 +213,16 @@ app = Sammy('#main', function (sam) {
} else { } else {
if (uri === '/postinstall') { if (uri === '/postinstall') {
if (installing) { if (installing) {
setTimeout(function () { interval = window.location.hostname === args.domain ? 20000 : 5000;
checkInstall = setInterval(function () {
c.checkInstall(function(isInstalled) {
if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) {
c.flash('success', y18n.t('installation_complete')); c.flash('success', y18n.t('installation_complete'));
clearInterval(checkInstall);
window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/'; window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
}, 10000); }
});
}, interval);
} else { } else {
c.flash('fail', y18n.t('error_occured')); c.flash('fail', y18n.t('error_occured'));
} }