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
b50562085b
commit
d53f84c3d7
1 changed files with 3 additions and 2 deletions
|
@ -213,15 +213,16 @@ app = Sammy('#main', function (sam) {
|
||||||
} else {
|
} else {
|
||||||
if (uri === '/postinstall') {
|
if (uri === '/postinstall') {
|
||||||
if (installing) {
|
if (installing) {
|
||||||
|
interval = window.location.hostname === args.domain ? 20000 : 5000;
|
||||||
checkInstall = setInterval(function () {
|
checkInstall = setInterval(function () {
|
||||||
c.checkInstall(function(isInstalled) {
|
c.checkInstall(function(isInstalled) {
|
||||||
if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) {
|
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);
|
||||||
document.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/#/login';
|
window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 6000);
|
}, interval);
|
||||||
} else {
|
} else {
|
||||||
c.flash('fail', y18n.t('error_occured'));
|
c.flash('fail', y18n.t('error_occured'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue