mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Hide modal if an error occured at postinstall + adjust timeout
This commit is contained in:
parent
a7565d7b15
commit
6f609894a3
1 changed files with 3 additions and 1 deletions
|
@ -94,7 +94,7 @@ app = Sammy('#main', function (sam) {
|
|||
|
||||
setInterval(function () {
|
||||
installing = true;
|
||||
}, 2500);
|
||||
}, 1500);
|
||||
|
||||
$('#popup-title').text('Installing');
|
||||
$('#popup-body').html('<p>YunoHost is being installed on <strong>'+ data.domain +'</strong>. It may take a few minutes ...</p><br><div class="text-center"><img src="img/ajax-loader.gif"></div><br>');
|
||||
|
@ -131,8 +131,10 @@ app = Sammy('#main', function (sam) {
|
|||
})
|
||||
.fail(function(xhr) {
|
||||
if (xhr.status == 401) {
|
||||
$('#popup').modal('hide');
|
||||
c.flash('fail', 'Wrong password');
|
||||
} else if (typeof xhr.responseJSON !== 'undefined') {
|
||||
$('#popup').modal('hide');
|
||||
c.flash('fail', xhr.responseJSON.error);
|
||||
} else {
|
||||
if (uri == '/postinstall') {
|
||||
|
|
Loading…
Reference in a new issue