mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-04 15:54:48 +01:00
Add Mail-in-a-Box version status check.
This commit is contained in:
committed by
Joshua Tauberer
parent
8c066764d9
commit
1a525df8ad
@@ -114,7 +114,6 @@
|
||||
</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><a href="#version" onclick="return show_panel(this);">Version</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>
|
||||
@@ -168,10 +167,6 @@
|
||||
{% include "ssl.html" %}
|
||||
</div>
|
||||
|
||||
<div id="panel_version" class="admin_panel">
|
||||
{% include "version.html" %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<footer>
|
||||
@@ -215,8 +210,8 @@ $(function() {
|
||||
$('#global_modal').on('shown.bs.modal', function (e) {
|
||||
// set focus to first input in the global modal's body
|
||||
var input = $('#global_modal .modal-body input');
|
||||
if (input.length > 0) $(input[0]).focus();
|
||||
})
|
||||
if (input.length > 0) $(input[0]).focus();
|
||||
})
|
||||
$('#global_modal .btn-danger').click(function() {
|
||||
// Don't take action now. Wait for the modal to be totally hidden
|
||||
// so that we don't attempt to show another modal while this one
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>Privacy Setting</h4>
|
||||
<p>By deactivating the advanced privacy feature your Mail-in-a-Box will contact a remote server to check if a new version got released.</p>
|
||||
<p>Advanced Privacy <a onclick="enable_privacy()" href="">On</a> | <a onclick="disable_privacy()" href="">Off</a></p>
|
||||
|
||||
<script>
|
||||
function show_system_status() {
|
||||
$('#system-checks tbody').html("<tr><td colspan='2' class='text-muted'>Loading...</td></tr>")
|
||||
@@ -83,4 +87,16 @@ function show_system_status() {
|
||||
}
|
||||
})
|
||||
}
|
||||
function enable_privacy() {
|
||||
api(
|
||||
"/system/privacy/enable",
|
||||
"Post",
|
||||
{ });
|
||||
}
|
||||
function disable_privacy() {
|
||||
api(
|
||||
"/system/privacy/disable",
|
||||
"Post",
|
||||
{ });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<h2>Mail-in-a-Box Version</h2>
|
||||
|
||||
<p>You are running Mail-in-a-Box version <span id="miab-version" style="font-weight: bold">...</span>.</p>
|
||||
|
||||
<p>The latest version of Mail-in-a-Box is <button id="miab-get-latest-upstream" onclick="check_latest_version()">Check</button>.</p>
|
||||
|
||||
<p>To find the latest version and for upgrade instructions, see <a href="https://mailinabox.email/">https://mailinabox.email/</a>, <a href="https://github.com/mail-in-a-box/mailinabox/blob/master/CHANGELOG.md">release notes</a>, and <a href="https://mailinabox.email/maintenance.html#updating-mail-in-a-box">upgrade instructions</a>.</p>
|
||||
|
||||
<script>
|
||||
function show_version() {
|
||||
$('#miab-version').text('loading...');
|
||||
api(
|
||||
"/system/version",
|
||||
"GET",
|
||||
{
|
||||
},
|
||||
function(version) {
|
||||
$('#miab-version').text(version);
|
||||
});
|
||||
}
|
||||
|
||||
function check_latest_version() {
|
||||
$('#miab-get-latest-upstream').text('loading...');
|
||||
api(
|
||||
"/system/latest-upstream-version",
|
||||
"POST",
|
||||
{
|
||||
},
|
||||
function(version) {
|
||||
$('#miab-get-latest-upstream').text(version);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user