mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Clean home.ms + Adjust post-install message
This commit is contained in:
parent
8ee6aba842
commit
31332119d1
2 changed files with 11 additions and 13 deletions
14
js/app.js
14
js/app.js
|
@ -41,6 +41,7 @@ app = Sammy('#main', function (sam) {
|
||||||
c = this;
|
c = this;
|
||||||
method = typeof method !== 'undefined' ? method : 'GET';
|
method = typeof method !== 'undefined' ? method : 'GET';
|
||||||
data = typeof data !== 'undefined' ? data : {};
|
data = typeof data !== 'undefined' ? data : {};
|
||||||
|
var args = data;
|
||||||
auth = "Basic "+ btoa(store.get('user') +':'+ atob(store.get('password')));
|
auth = "Basic "+ btoa(store.get('user') +':'+ atob(store.get('password')));
|
||||||
if (uri == '/postinstall') {
|
if (uri == '/postinstall') {
|
||||||
var installing = false;
|
var installing = false;
|
||||||
|
@ -83,15 +84,22 @@ app = Sammy('#main', function (sam) {
|
||||||
} else {
|
} else {
|
||||||
if (uri == '/postinstall') {
|
if (uri == '/postinstall') {
|
||||||
if (installing) {
|
if (installing) {
|
||||||
|
if (args.domain.match(/\.nohost\.me$/) || args.domain.match(/\.noho\.st$/)) {
|
||||||
|
interval = 150000;
|
||||||
|
} else {
|
||||||
|
interval = 5000;
|
||||||
|
}
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
$('#popup-title').text('Installation complete');
|
$('#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>');
|
$('#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>');
|
||||||
}, 5000);
|
}, interval);
|
||||||
} else {
|
} else {
|
||||||
$('#popup').modal('hide');
|
$('#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');
|
store.clear('slide');
|
||||||
c.redirect(store.get('path-1'));
|
c.redirect(store.get('path-1'));
|
||||||
|
|
|
@ -20,15 +20,5 @@
|
||||||
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
|
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</a>
|
</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>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue