mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Postinstall
This commit is contained in:
parent
c45adca02f
commit
83199e1a9a
1 changed files with 4 additions and 8 deletions
12
js/app.js
12
js/app.js
|
@ -104,7 +104,7 @@ app = Sammy('#main', function (sam) {
|
||||||
callback(data.installed);
|
callback(data.installed);
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
callback(false);
|
callback(undefined);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -224,17 +224,13 @@ app = Sammy('#main', function (sam) {
|
||||||
if (installing) {
|
if (installing) {
|
||||||
checkInstall = setInterval(function () {
|
checkInstall = setInterval(function () {
|
||||||
c.checkInstall(function(isInstalled) {
|
c.checkInstall(function(isInstalled) {
|
||||||
if (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);
|
clearInterval(checkInstall);
|
||||||
if (window.location.hostname === args.domain) {
|
document.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/#/login';
|
||||||
document.location.href = 'https://'+ args.domain +'/yunohost/admin';
|
|
||||||
} else {
|
|
||||||
c.redirect('#/login');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 6000);
|
||||||
} else {
|
} else {
|
||||||
c.flash('fail', y18n.t('error_occured'));
|
c.flash('fail', y18n.t('error_occured'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue