[fix] Postinstall

This commit is contained in:
root 2014-05-25 22:48:31 +00:00
parent b50562085b
commit d53f84c3d7

View file

@ -213,15 +213,16 @@ app = Sammy('#main', function (sam) {
} else {
if (uri === '/postinstall') {
if (installing) {
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'));
clearInterval(checkInstall);
document.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/#/login';
window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
}
});
}, 6000);
}, interval);
} else {
c.flash('fail', y18n.t('error_occured'));
}