From 83199e1a9aa7e34bd8d862f499d5134c3a3a66df Mon Sep 17 00:00:00 2001 From: kload Date: Sun, 25 May 2014 22:17:42 +0000 Subject: [PATCH] [fix] Postinstall --- js/app.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/js/app.js b/js/app.js index 6e7332c4..73a5856d 100644 --- a/js/app.js +++ b/js/app.js @@ -104,7 +104,7 @@ app = Sammy('#main', function (sam) { callback(data.installed); }) .fail(function() { - callback(false); + callback(undefined); }); }, @@ -224,17 +224,13 @@ app = Sammy('#main', function (sam) { if (installing) { checkInstall = setInterval(function () { c.checkInstall(function(isInstalled) { - if (isInstalled) { + if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) { c.flash('success', y18n.t('installation_complete')); clearInterval(checkInstall); - if (window.location.hostname === args.domain) { - document.location.href = 'https://'+ args.domain +'/yunohost/admin'; - } else { - c.redirect('#/login'); - } + document.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/#/login'; } }); - }, 5000); + }, 6000); } else { c.flash('fail', y18n.t('error_occured')); }