[enh] Automaticaly redirect to login if postinstalled from IP

This commit is contained in:
Kload 2014-05-17 23:16:36 +02:00
parent 5db95f08bc
commit a380c6b1b3

View file

@ -193,11 +193,17 @@ app = Sammy('#main', function (sam) {
interval = 5000;
}
setInterval(function () {
$('#popup-title').text(y18n.t('installation_complete'));
$('#popup-body').html(
'<p>'+ y18n.t('installation_complete_desc', ['https://'+ args.domain +'/yunohost/admin', args.domain +'/yunohost/admin']) +'</p>'
+ '<br>'
+ '<p><small>'+ y18n.t('installation_complete_help_dns') +'</small></p>');
if (window.location.hostname === args.domain) {
$('#popup-title').text(y18n.t('installation_complete'));
$('#popup-body').html(
'<p>'+ y18n.t('installation_complete_desc', ['https://'+ args.domain +'/yunohost/admin', args.domain +'/yunohost/admin']) +'</p>'
+ '<br>'
+ '<p><small>'+ y18n.t('installation_complete_help_dns') +'</small></p>');
} else {
$('#popup').modal('hide');
c.flash('success', y18n.t('installation_complete'));
c.redirect('#/login');
}
}, interval);
} else {
$('#popup').modal('hide');