mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-24 07:37:04 +00:00
Bump web dependencies (#1)
- Bootstrap: 3.3.7 -> 4.4.1 - - New admin panel style and respective corrections applied. - JQuery: 2.1.4 -> 3.5.0
This commit is contained in:
parent
785280c86b
commit
7ffc889c08
@ -21,6 +21,8 @@ This is a fork of MiaB (duh), hacked and tuned to my needs:
|
||||
|
||||
- 💤 Possibility of disabling some services (\*cough\* NextCloud \*cough\*);
|
||||
|
||||
- ✅ Bumped the bootstrap and jQuery dependencies' versions - and we've got a brand new admin panel now!
|
||||
|
||||
- 💤 Anything else I might need to use;
|
||||
|
||||
All in all, I think I should rename this to something like "Central [Clown Computing](https://www.urbandictionary.com/define.php?term=clown%20computing)", since I'm trying to cram as many services as possible into that poor machine (Spending 5$ is better than spending 10$)
|
||||
|
@ -69,7 +69,6 @@
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/admin/assets/bootstrap/css/bootstrap-theme.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -78,46 +77,51 @@
|
||||
<!--[if gt IE 7]><!-->
|
||||
|
||||
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="container bg-light">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
|
||||
data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">{{hostname}}</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<div class="navbar navbar-expand-lg">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">System <b class="caret"></b></a>
|
||||
<li class="btn dropdown">
|
||||
<a style="color: black;" href="#" class="dropdown-toggle" data-toggle="dropdown">System <b
|
||||
class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#system_status" onclick="return show_panel(this);">Status Checks</a></li>
|
||||
<li><a href="#tls" onclick="return show_panel(this);">TLS (SSL) Certificates</a></li>
|
||||
<li><a href="#system_backup" onclick="return show_panel(this);">Backup Status</a></li>
|
||||
<li><a href="#smtp_relays" onclick="return show_panel(this);">SMTP Relays</a></li>
|
||||
<li class="dropdown-item"><a href="#system_status" onclick="return show_panel(this);">Status
|
||||
Checks</a></li>
|
||||
<li class="dropdown-item"><a href="#tls" onclick="return show_panel(this);">TLS (SSL)
|
||||
Certificates</a></li>
|
||||
<li class="dropdown-item"><a href="#system_backup" onclick="return show_panel(this);">Backup
|
||||
Status</a></li>
|
||||
<li class="dropdown-item"><a href="#smtp_relays" onclick="return show_panel(this);">SMTP
|
||||
Relays</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Advanced Pages</li>
|
||||
<li><a href="#custom_dns" onclick="return show_panel(this);">Custom DNS</a></li>
|
||||
<li><a href="#external_dns" onclick="return show_panel(this);">External DNS</a></li>
|
||||
<li><a href="/admin/munin" target="_blank">Munin Monitoring</a></li>
|
||||
<li class="dropdown-item"><a href="#custom_dns" onclick="return show_panel(this);">Custom
|
||||
DNS</a></li>
|
||||
<li class="dropdown-item"><a href="#external_dns"
|
||||
onclick="return show_panel(this);">External DNS</a></li>
|
||||
<li class="dropdown-item"><a href="/admin/munin" target="_blank">Munin Monitoring</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Mail <b class="caret"></b></a>
|
||||
<li class="btn dropdown">
|
||||
<a style="color: black;" href="#" class="dropdown-toggle" data-toggle="dropdown">Mail <b
|
||||
class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#mail-guide" onclick="return show_panel(this);">Instructions</a></li>
|
||||
<li><a href="#users" onclick="return show_panel(this);">Users</a></li>
|
||||
<li><a href="#aliases" onclick="return show_panel(this);">Aliases</a></li>
|
||||
<li class="dropdown-item"><a href="#mail-guide"
|
||||
onclick="return show_panel(this);">Instructions</a></li>
|
||||
<li class="dropdown-item"><a href="#users" onclick="return show_panel(this);">Users</a></li>
|
||||
<li class="dropdown-item"><a href="#aliases" onclick="return show_panel(this);">Aliases</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#sync_guide" onclick="return show_panel(this);">Contacts/Calendar</a></li>
|
||||
<li><a href="#web" onclick="return show_panel(this);">Web</a></li>
|
||||
<li class="btn"><a style="color: black;" href="#sync_guide"
|
||||
onclick="return show_panel(this);">Contacts/Calendar</a></li>
|
||||
<li class="btn"><a style="color: black;" href="#web" onclick="return show_panel(this);">Web</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#" onclick="do_logout(); return false;" style="color: white">Log out</a></li>
|
||||
<ul class="btn nav navbar-nav navbar-right">
|
||||
<li><a href="#" onclick="do_logout(); return false;" style="color: black; font-weight: bold;">Log
|
||||
out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--/.navbar-collapse -->
|
||||
@ -177,7 +181,7 @@
|
||||
|
||||
<footer>
|
||||
<p>This is a <a href="https://github.com/ddavness/power-mailinabox">Power Mail-in-a-Box</a>. (Debian
|
||||
GNU/Linux 10 (Buster))</p>
|
||||
GNU/Linux 10)</p>
|
||||
</footer>
|
||||
</div> <!-- /container -->
|
||||
|
||||
@ -194,8 +198,8 @@
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="errorModalTitle"> </h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p> </p>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{% if no_users_exist or no_admins_exist %}
|
||||
<div class="row">
|
||||
<div class="col-md-offset-2 col-md-8">
|
||||
<div class="col-md-offset-2 col-md-8">
|
||||
{% if no_users_exist %}
|
||||
<p class="text-danger">There are no users on this system! To make an administrative user,
|
||||
log into this machine using SSH (like when you first set it up) and run:</p>
|
||||
@ -16,7 +16,7 @@ sudo tools/mail.py user make-admin me@{{hostname}}</pre>
|
||||
sudo tools/mail.py user make-admin me@{{hostname}}</pre>
|
||||
{% endif %}
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -26,13 +26,13 @@ sudo tools/mail.py user make-admin me@{{hostname}}</pre>
|
||||
<form class="form-horizontal" role="form" onsubmit="do_login(); return false;" method="get">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-3 control-label">Email</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="col-sm-12">
|
||||
<input name="email" type="email" class="form-control" id="loginEmail" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-3 control-label">Password</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="col-sm-12">
|
||||
<input name="password" type="password" class="form-control" id="loginPassword" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
@ -55,15 +55,15 @@ sudo tools/mail.py user make-admin me@{{hostname}}</pre>
|
||||
|
||||
|
||||
<script>
|
||||
function do_login() {
|
||||
function do_login() {
|
||||
if ($('#loginEmail').val() == "") {
|
||||
show_modal_error("Login Failed", "Enter your email address.", function() {
|
||||
show_modal_error("Login Failed", "Enter your email address.", function () {
|
||||
$('#loginEmail').focus();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if ($('#loginPassword').val() == "") {
|
||||
show_modal_error("Login Failed", "Enter your email password.", function() {
|
||||
show_modal_error("Login Failed", "Enter your email password.", function () {
|
||||
$('#loginPassword').focus();
|
||||
});
|
||||
return false;
|
||||
@ -75,8 +75,8 @@ function do_login() {
|
||||
api(
|
||||
"/me",
|
||||
"GET",
|
||||
{ },
|
||||
function(response){
|
||||
{},
|
||||
function (response) {
|
||||
// This API call always succeeds. It returns a JSON object indicating
|
||||
// whether the request was authenticated or not.
|
||||
if (response.status != "ok") {
|
||||
@ -117,27 +117,27 @@ function do_login() {
|
||||
// Open the next panel the user wants to go to. Do this after the XHR response
|
||||
// is over so that we don't start a new XHR request while this one is finishing,
|
||||
// which confuses the loading indicator.
|
||||
setTimeout(function() { show_panel(!switch_back_to_panel || switch_back_to_panel == "login" ? 'system_status' : switch_back_to_panel) }, 300);
|
||||
setTimeout(function () { show_panel(!switch_back_to_panel || switch_back_to_panel == "login" ? 'system_status' : switch_back_to_panel) }, 300);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function do_logout() {
|
||||
function do_logout() {
|
||||
api_credentials = ["", ""];
|
||||
if (typeof localStorage != 'undefined')
|
||||
localStorage.removeItem("miab-cp-credentials");
|
||||
if (typeof sessionStorage != 'undefined')
|
||||
sessionStorage.removeItem("miab-cp-credentials");
|
||||
show_panel('login');
|
||||
}
|
||||
}
|
||||
|
||||
function show_login() {
|
||||
$('#loginEmail,#loginPassword').each(function() {
|
||||
function show_login() {
|
||||
$('#loginEmail,#loginPassword').each(function () {
|
||||
var input = $(this);
|
||||
if (!$.trim(input.val())) {
|
||||
input.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -69,18 +69,18 @@ rm -rf $assets_dir
|
||||
mkdir -p $assets_dir
|
||||
|
||||
# jQuery CDN URL
|
||||
jquery_version=2.1.4
|
||||
jquery_version=3.5.0
|
||||
jquery_url=https://code.jquery.com
|
||||
|
||||
# Get jQuery
|
||||
wget_verify $jquery_url/jquery-$jquery_version.min.js 43dc554608df885a59ddeece1598c6ace434d747 $assets_dir/jquery.min.js
|
||||
wget_verify $jquery_url/jquery-$jquery_version.min.js 1d6ae46f2ffa213dede37a521b011ec1cd8d1ad3 $assets_dir/jquery.min.js
|
||||
|
||||
# Bootstrap CDN URL
|
||||
bootstrap_version=3.3.7
|
||||
bootstrap_version=4.4.1
|
||||
bootstrap_url=https://github.com/twbs/bootstrap/releases/download/v$bootstrap_version/bootstrap-$bootstrap_version-dist.zip
|
||||
|
||||
# Get Bootstrap
|
||||
wget_verify $bootstrap_url e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a /tmp/bootstrap.zip
|
||||
wget_verify $bootstrap_url 52759c9d307308da862ac29e1c41bfcfe81313eb /tmp/bootstrap.zip
|
||||
unzip -q /tmp/bootstrap.zip -d $assets_dir
|
||||
mv $assets_dir/bootstrap-$bootstrap_version-dist $assets_dir/bootstrap
|
||||
rm -f /tmp/bootstrap.zip
|
||||
|
Loading…
Reference in New Issue
Block a user