Clean home.ms + Adjust post-install message

This commit is contained in:
Kload 2013-11-21 19:31:32 +01:00
parent 8ee6aba842
commit 31332119d1
2 changed files with 11 additions and 13 deletions

View file

@ -41,6 +41,7 @@ app = Sammy('#main', function (sam) {
c = this;
method = typeof method !== 'undefined' ? method : 'GET';
data = typeof data !== 'undefined' ? data : {};
var args = data;
auth = "Basic "+ btoa(store.get('user') +':'+ atob(store.get('password')));
if (uri == '/postinstall') {
var installing = false;
@ -83,15 +84,22 @@ app = Sammy('#main', function (sam) {
} else {
if (uri == '/postinstall') {
if (installing) {
if (args.domain.match(/\.nohost\.me$/) || args.domain.match(/\.noho\.st$/)) {
interval = 150000;
} else {
interval = 5000;
}
setInterval(function () {
$('#popup-title').text('Installation complete');
$('#popup-body').html('<p>YunoHost has been successfully installed, please go to <a href="https://'+ window.location.hostname +'/ynhadmin" target="_blank"><strong>https://'+ window.location.hostname +'/ynhadmin</strong></a>.</p>');
}, 5000);
$('#popup-body').html('<p>YunoHost has been successfully installed, please go to <a href="https://'+ args.domain +'/ynhadmin" target="_blank"><strong>https://'+ args.domain +'/ynhadmin</strong></a>.</p><br><p><small><a href="https://doc.yunohost.org/#/dns" target="_blank">Not working ?</a></small></p>');
}, interval);
} else {
$('#popup').modal('hide');
c.flash('fail', 'An error occured, try again');
}
} else {
c.flash('fail', 'Server error');
}
c.flash('fail', 'Server error');
}
store.clear('slide');
c.redirect(store.get('path-1'));

View file

@ -20,15 +20,5 @@
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
<a href="#/monitor" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">Monitor</h4>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
<a href="#/backups" class="list-group-item slide">
<h4 class="pull-left list-group-item-heading">Backups</h4>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<div class="clearfix"></div>
</a>
</div>