diff --git a/js/app.js b/js/app.js index f1a59fce..0031a0d0 100644 --- a/js/app.js +++ b/js/app.js @@ -193,11 +193,17 @@ app = Sammy('#main', function (sam) { interval = 5000; } setInterval(function () { - $('#popup-title').text(y18n.t('installation_complete')); - $('#popup-body').html( - '

'+ y18n.t('installation_complete_desc', ['https://'+ args.domain +'/yunohost/admin', args.domain +'/yunohost/admin']) +'

' - + '
' - + '

'+ y18n.t('installation_complete_help_dns') +'

'); + if (window.location.hostname === args.domain) { + $('#popup-title').text(y18n.t('installation_complete')); + $('#popup-body').html( + '

'+ y18n.t('installation_complete_desc', ['https://'+ args.domain +'/yunohost/admin', args.domain +'/yunohost/admin']) +'

' + + '
' + + '

'+ y18n.t('installation_complete_help_dns') +'

'); + } else { + $('#popup').modal('hide'); + c.flash('success', y18n.t('installation_complete')); + c.redirect('#/login'); + } }, interval); } else { $('#popup').modal('hide');