From e46d9e1fc9f5b50a40f785628beb63850e0a6d8a Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 11:26:37 +0200 Subject: [PATCH 01/24] Update admin-lte version in package.json --- core/admin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/package.json b/core/admin/package.json index a1107c69..ac18f61e 100644 --- a/core/admin/package.json +++ b/core/admin/package.json @@ -11,7 +11,7 @@ "dependencies": { "@babel/core": "^7.4.4", "@babel/preset-env": "^7.4.4", - "admin-lte": "^2.4.10", + "admin-lte": "^3.1.0", "babel-loader": "^8.0.5", "bootstrap": "^3.4.1", "css-loader": "^2.1.1", From c97728289bbe0e466454832f060276e0fb29702e Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 11:34:03 +0200 Subject: [PATCH 02/24] Update node version for building the image (AdminLTE requires node 10 or higher) --- core/admin/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index f3b8643c..81ffd147 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -1,7 +1,7 @@ # First stage to build assets ARG DISTRO=alpine:3.12 ARG ARCH="" -FROM ${ARCH}node:8 as assets +FROM ${ARCH}node:15 as assets COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static COPY package.json ./ From 6b3170cb4c1f9bcda28c25b7c27849cc1de06f7f Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 14:42:15 +0200 Subject: [PATCH 03/24] Update side menu --- core/admin/assets/vendor.js | 18 +- core/admin/mailu/ui/templates/base.html | 48 ++-- core/admin/mailu/ui/templates/sidebar.html | 254 +++++++++++---------- 3 files changed, 176 insertions(+), 144 deletions(-) diff --git a/core/admin/assets/vendor.js b/core/admin/assets/vendor.js index f7ed03c8..a5ff7a3c 100644 --- a/core/admin/assets/vendor.js +++ b/core/admin/assets/vendor.js @@ -3,17 +3,21 @@ import jQuery from 'jquery'; import 'select2/dist/css/select2.css'; // bootstrap -import 'bootstrap/less/bootstrap.less'; -import 'bootstrap'; +// import 'bootstrap/less/bootstrap.less'; +// import 'bootstrap'; // FA -import 'font-awesome/scss/font-awesome.scss'; +// import 'font-awesome/scss/font-awesome.scss'; // FA is included with AdminLTE +import 'admin-lte/plugins/fontawesome-free/css/fontawesome.css'; +import 'admin-lte/plugins/fontawesome-free/css/regular.css'; +import 'admin-lte/plugins/fontawesome-free/css/solid.css'; // AdminLTE -import 'admin-lte/build/less/AdminLTE-without-plugins.less'; -import 'admin-lte/build/less/select2.less'; -import 'admin-lte/build/less/skins/skin-blue.less'; +import 'admin-lte/build/scss/adminlte.scss'; +// import 'admin-lte/build/less/AdminLTE-without-plugins.less'; // doesn't exist +// import 'admin-lte/build/less/select2.less'; // doesn't exist +// import 'admin-lte/build/less/skins/skin-blue.less'; // doesn't exist import 'admin-lte/build/js/Layout.js'; import 'admin-lte/build/js/ControlSidebar.js'; import 'admin-lte/build/js/PushMenu.js'; -import 'admin-lte/build/js/BoxRefresh.js'; +// import 'admin-lte/build/js/BoxRefresh.js'; // doesn't exist diff --git a/core/admin/mailu/ui/templates/base.html b/core/admin/mailu/ui/templates/base.html index 74d5653c..c5b09159 100644 --- a/core/admin/mailu/ui/templates/base.html +++ b/core/admin/mailu/ui/templates/base.html @@ -8,43 +8,47 @@ Mailu-Admin - {{ config["SITENAME"] }} - +
-
- -
-
diff --git a/core/admin/mailu/ui/templates/sidebar.html b/core/admin/mailu/ui/templates/sidebar.html index 78be75d5..7c86378d 100644 --- a/core/admin/mailu/ui/templates/sidebar.html +++ b/core/admin/mailu/ui/templates/sidebar.html @@ -1,120 +1,144 @@ - + + {% if config["WEBMAIL"] != "none" %} + + {% endif %} + + + + {% if config['DOMAIN_REGISTRATION'] %} + + {% endif %} + {% if current_user.is_authenticated %} + + {% else %} + + {% if signup_domains %} + + {% endif %} + {% endif %} + + + From deca6e0c4a311d9156555ab65fb08f850cd4094e Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 14:45:12 +0200 Subject: [PATCH 04/24] update user/settings --- core/admin/mailu/ui/templates/macros.html | 10 +++++----- core/admin/mailu/ui/templates/user/settings.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/admin/mailu/ui/templates/macros.html b/core/admin/mailu/ui/templates/macros.html index ec4cf6e4..a1fc2919 100644 --- a/core/admin/mailu/ui/templates/macros.html +++ b/core/admin/mailu/ui/templates/macros.html @@ -64,18 +64,18 @@ {% endmacro %} -{% macro box(title=None, theme="primary", header=True) %} +{% macro card(title=None, theme="primary", header=True) %}
-
+
{% if header %} -
+
{% if title %} -

{{ title }}

+

{{ title }}

{% endif %}
{% endif %} -
+
{{ caller() }}
diff --git a/core/admin/mailu/ui/templates/user/settings.html b/core/admin/mailu/ui/templates/user/settings.html index b6ade695..e58cc89a 100644 --- a/core/admin/mailu/ui/templates/user/settings.html +++ b/core/admin/mailu/ui/templates/user/settings.html @@ -12,18 +12,18 @@
{{ form.hidden_tag() }} - {% call macros.box(title=_("Displayed name")) %} + {% call macros.card(title=_("Displayed name")) %} {{ macros.form_field(form.displayed_name) }} {% endcall %} - {% call macros.box(title=_("Antispam")) %} + {% call macros.card(title=_("Antispam")) %} {{ macros.form_field(form.spam_enabled) }} {{ macros.form_field(form.spam_threshold, step=1, max=100, prepend=''+form.spam_threshold.data.__str__()+' / 100', oninput='$("#threshold").text(this.value);') }} {% endcall %} - {% call macros.box(title=_("Auto-forward")) %} + {% call macros.card(title=_("Auto-forward")) %} {{ macros.form_field(form.forward_enabled, onchange="if(this.checked){$('#forward_destination,#forward_keep').removeAttr('disabled')} else{$('#forward_destination,#forward_keep').attr('disabled', '')}") }} From 0c5fda3fca6930d2ba1f6a34df7c223e097d8d12 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 14:47:41 +0200 Subject: [PATCH 05/24] Change macros.box to macros.card --- core/admin/mailu/ui/templates/admin/create.html | 2 +- core/admin/mailu/ui/templates/alias/create.html | 2 +- core/admin/mailu/ui/templates/announcement.html | 2 +- core/admin/mailu/ui/templates/client.html | 4 ++-- core/admin/mailu/ui/templates/confirm.html | 2 +- core/admin/mailu/ui/templates/domain/create.html | 2 +- core/admin/mailu/ui/templates/domain/signup.html | 4 ++-- core/admin/mailu/ui/templates/fetch/create.html | 4 ++-- core/admin/mailu/ui/templates/form.html | 2 +- core/admin/mailu/ui/templates/manager/create.html | 2 +- core/admin/mailu/ui/templates/user/create.html | 4 ++-- core/admin/mailu/ui/templates/user/forward.html | 2 +- core/admin/mailu/ui/templates/user/reply.html | 2 +- core/admin/mailu/ui/templates/user/signup.html | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/core/admin/mailu/ui/templates/admin/create.html b/core/admin/mailu/ui/templates/admin/create.html index 8d3a7b58..6c2413bc 100644 --- a/core/admin/mailu/ui/templates/admin/create.html +++ b/core/admin/mailu/ui/templates/admin/create.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.admin, class_='mailselect') }} diff --git a/core/admin/mailu/ui/templates/alias/create.html b/core/admin/mailu/ui/templates/alias/create.html index 38d7e7e5..4b0ea3e2 100644 --- a/core/admin/mailu/ui/templates/alias/create.html +++ b/core/admin/mailu/ui/templates/alias/create.html @@ -9,7 +9,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.localpart, append='@'+domain.name+'') }} diff --git a/core/admin/mailu/ui/templates/announcement.html b/core/admin/mailu/ui/templates/announcement.html index 7dd34d3f..acdbde1a 100644 --- a/core/admin/mailu/ui/templates/announcement.html +++ b/core/admin/mailu/ui/templates/announcement.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.announcement_subject) }} diff --git a/core/admin/mailu/ui/templates/client.html b/core/admin/mailu/ui/templates/client.html index 81bee135..ee1b1c28 100644 --- a/core/admin/mailu/ui/templates/client.html +++ b/core/admin/mailu/ui/templates/client.html @@ -9,7 +9,7 @@ configure your email client {% endblock %} {% block content %} -{% call macros.box(title="Incoming mail") %} +{% call macros.card(title="Incoming mail") %} @@ -36,7 +36,7 @@ configure your email client
{% endcall %} -{% call macros.box(title="Outgoing mail") %} +{% call macros.card(title="Outgoing mail") %} diff --git a/core/admin/mailu/ui/templates/confirm.html b/core/admin/mailu/ui/templates/confirm.html index 3b8a451f..d0f6acf3 100644 --- a/core/admin/mailu/ui/templates/confirm.html +++ b/core/admin/mailu/ui/templates/confirm.html @@ -9,7 +9,7 @@ {% endblock %} {% block content %} -{% call macros.box(theme="warning") %} +{% call macros.card(theme="warning") %}

{% trans action %}You are about to {{ action }}. Please confirm your action.{% endtrans %}

{{ macros.form(form) }} {% endcall %} diff --git a/core/admin/mailu/ui/templates/domain/create.html b/core/admin/mailu/ui/templates/domain/create.html index d67e3e89..d84159b1 100644 --- a/core/admin/mailu/ui/templates/domain/create.html +++ b/core/admin/mailu/ui/templates/domain/create.html @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.name) }} diff --git a/core/admin/mailu/ui/templates/domain/signup.html b/core/admin/mailu/ui/templates/domain/signup.html index c8a52f6c..77b7fec9 100644 --- a/core/admin/mailu/ui/templates/domain/signup.html +++ b/core/admin/mailu/ui/templates/domain/signup.html @@ -9,7 +9,7 @@ {{ form.hidden_tag() }} - {% call macros.box(title="Requirements") %} + {% call macros.card(title="Requirements") %}

{% trans %}In order to register a new domain, you must first setup the domain zone so that the domain MX points to this server{% endtrans %} ({{ config["HOSTNAMES"].split(",")[0] }}). @@ -22,7 +22,7 @@

{% endcall %} - {% call macros.box() %} + {% call macros.card() %} {% if form.localpart %} {{ macros.form_fields((form.localpart, form.name), append='@') }} {{ macros.form_fields((form.pw, form.pw2)) }} diff --git a/core/admin/mailu/ui/templates/fetch/create.html b/core/admin/mailu/ui/templates/fetch/create.html index bc69fc44..ed190961 100644 --- a/core/admin/mailu/ui/templates/fetch/create.html +++ b/core/admin/mailu/ui/templates/fetch/create.html @@ -11,7 +11,7 @@ {% block content %} {{ form.hidden_tag() }} - {% call macros.box(title="Remote server") %} + {% call macros.card(title="Remote server") %} {{ macros.form_field(form.protocol) }} {{ macros.form_fields((form.host, form.port)) }} {{ macros.form_field(form.tls) }} @@ -22,7 +22,7 @@ {{ macros.form_field(form.password) }} {% endcall %} - {% call macros.box(title="Settings") %} + {% call macros.card(title="Settings") %} {{ macros.form_field(form.keep) }} {% endcall %} diff --git a/core/admin/mailu/ui/templates/form.html b/core/admin/mailu/ui/templates/form.html index 25d7e83c..0e65ce33 100644 --- a/core/admin/mailu/ui/templates/form.html +++ b/core/admin/mailu/ui/templates/form.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ macros.form(form) }} {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/manager/create.html b/core/admin/mailu/ui/templates/manager/create.html index e3911642..bc5e6ca9 100644 --- a/core/admin/mailu/ui/templates/manager/create.html +++ b/core/admin/mailu/ui/templates/manager/create.html @@ -9,7 +9,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.manager, class_='mailselect') }} diff --git a/core/admin/mailu/ui/templates/user/create.html b/core/admin/mailu/ui/templates/user/create.html index ed7b9884..a28c7048 100644 --- a/core/admin/mailu/ui/templates/user/create.html +++ b/core/admin/mailu/ui/templates/user/create.html @@ -12,7 +12,7 @@ {{ form.hidden_tag() }} - {% call macros.box(_("General")) %} + {% call macros.card(_("General")) %} {{ macros.form_field(form.localpart, append='@'+domain.name+'') }} {{ macros.form_fields((form.pw, form.pw2)) }} {{ macros.form_field(form.displayed_name) }} @@ -20,7 +20,7 @@ {{ macros.form_field(form.enabled) }} {% endcall %} - {% call macros.box(_("Features and quotas"), theme="success") %} + {% call macros.card(_("Features and quotas"), theme="success") %} {{ macros.form_field(form.quota_bytes, step=1000000000, max=(max_quota_bytes or domain.max_quota_bytes or 50000000000), prepend=''+((form.quota_bytes.data//1000000000).__str__() if form.quota_bytes.data else '∞')+' GiB', oninput='$("#quota").text(this.value == 0 ? "∞" : this.value/1000000000);') }} diff --git a/core/admin/mailu/ui/templates/user/forward.html b/core/admin/mailu/ui/templates/user/forward.html index 769d439d..6059f0ed 100644 --- a/core/admin/mailu/ui/templates/user/forward.html +++ b/core/admin/mailu/ui/templates/user/forward.html @@ -9,7 +9,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.forward_enabled, diff --git a/core/admin/mailu/ui/templates/user/reply.html b/core/admin/mailu/ui/templates/user/reply.html index 7225a178..7a6b7fa8 100644 --- a/core/admin/mailu/ui/templates/user/reply.html +++ b/core/admin/mailu/ui/templates/user/reply.html @@ -9,7 +9,7 @@ {% endblock %} {% block content %} -{% call macros.box() %} +{% call macros.card() %} {{ form.hidden_tag() }} {{ macros.form_field(form.reply_enabled, diff --git a/core/admin/mailu/ui/templates/user/signup.html b/core/admin/mailu/ui/templates/user/signup.html index f540d660..2b20bde9 100644 --- a/core/admin/mailu/ui/templates/user/signup.html +++ b/core/admin/mailu/ui/templates/user/signup.html @@ -11,7 +11,7 @@ {% block content %} {{ form.hidden_tag() }} - {% call macros.box() %} + {% call macros.card() %} {{ macros.form_field(form.localpart, append='@'+domain.name+'') }} {{ macros.form_fields((form.pw, form.pw2)) }} {% if form.captcha %} From cdfa94c2430ca43a43ba538ae7e538e8d71c33da Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 14:59:12 +0200 Subject: [PATCH 06/24] Make main action float right --- core/admin/mailu/ui/templates/admin/list.html | 2 +- core/admin/mailu/ui/templates/alias/list.html | 2 +- core/admin/mailu/ui/templates/alternative/list.html | 2 +- core/admin/mailu/ui/templates/domain/details.html | 2 +- core/admin/mailu/ui/templates/domain/list.html | 2 +- core/admin/mailu/ui/templates/fetch/list.html | 2 +- core/admin/mailu/ui/templates/manager/list.html | 2 +- core/admin/mailu/ui/templates/relay/list.html | 2 +- core/admin/mailu/ui/templates/token/list.html | 2 +- core/admin/mailu/ui/templates/user/list.html | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/admin/mailu/ui/templates/admin/list.html b/core/admin/mailu/ui/templates/admin/list.html index 72b5a1fa..856f6830 100644 --- a/core/admin/mailu/ui/templates/admin/list.html +++ b/core/admin/mailu/ui/templates/admin/list.html @@ -5,7 +5,7 @@ {% endblock %} {% block main_action %} - + {% trans %}Add administrator{% endtrans %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/alias/list.html b/core/admin/mailu/ui/templates/alias/list.html index 29766b25..4bb69169 100644 --- a/core/admin/mailu/ui/templates/alias/list.html +++ b/core/admin/mailu/ui/templates/alias/list.html @@ -9,7 +9,7 @@ {% endblock %} {% block main_action %} -{% trans %}Add alias{% endtrans %} +{% trans %}Add alias{% endtrans %} {% endblock %} {% block content %} diff --git a/core/admin/mailu/ui/templates/alternative/list.html b/core/admin/mailu/ui/templates/alternative/list.html index 56e7565b..dc981ef6 100644 --- a/core/admin/mailu/ui/templates/alternative/list.html +++ b/core/admin/mailu/ui/templates/alternative/list.html @@ -9,7 +9,7 @@ {% endblock %} {% block main_action %} -{% trans %}Add alternative{% endtrans %} +{% trans %}Add alternative{% endtrans %} {% endblock %} {% block content %} diff --git a/core/admin/mailu/ui/templates/domain/details.html b/core/admin/mailu/ui/templates/domain/details.html index 65c6ec1a..8aa35f22 100644 --- a/core/admin/mailu/ui/templates/domain/details.html +++ b/core/admin/mailu/ui/templates/domain/details.html @@ -10,7 +10,7 @@ {% block main_action %} {% if current_user.global_admin %} - + {% if domain.dkim_publickey %} {% trans %}Regenerate keys{% endtrans %} {% else %} diff --git a/core/admin/mailu/ui/templates/domain/list.html b/core/admin/mailu/ui/templates/domain/list.html index 2431faa5..fcc3a72c 100644 --- a/core/admin/mailu/ui/templates/domain/list.html +++ b/core/admin/mailu/ui/templates/domain/list.html @@ -6,7 +6,7 @@ {% block main_action %} {% if current_user.global_admin %} -{% trans %}New domain{% endtrans %} +{% trans %}New domain{% endtrans %} {% endif %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/fetch/list.html b/core/admin/mailu/ui/templates/fetch/list.html index 07ab5ad8..09253a21 100644 --- a/core/admin/mailu/ui/templates/fetch/list.html +++ b/core/admin/mailu/ui/templates/fetch/list.html @@ -9,7 +9,7 @@ {% endblock %} {% block main_action %} -{% trans %}Add an account{% endtrans %} +{% trans %}Add an account{% endtrans %} {% endblock %} {% block content %} diff --git a/core/admin/mailu/ui/templates/manager/list.html b/core/admin/mailu/ui/templates/manager/list.html index d818a876..b660bf6d 100644 --- a/core/admin/mailu/ui/templates/manager/list.html +++ b/core/admin/mailu/ui/templates/manager/list.html @@ -9,7 +9,7 @@ {% endblock %} {% block main_action %} -{% trans %}Add manager{% endtrans %} +{% trans %}Add manager{% endtrans %} {% endblock %} {% block content %} diff --git a/core/admin/mailu/ui/templates/relay/list.html b/core/admin/mailu/ui/templates/relay/list.html index bb00b1d9..aef189ad 100644 --- a/core/admin/mailu/ui/templates/relay/list.html +++ b/core/admin/mailu/ui/templates/relay/list.html @@ -6,7 +6,7 @@ {% block main_action %} {% if current_user.global_admin %} -{% trans %}New relayed domain{% endtrans %} +{% trans %}New relayed domain{% endtrans %} {% endif %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/token/list.html b/core/admin/mailu/ui/templates/token/list.html index ad560e6a..99f67383 100644 --- a/core/admin/mailu/ui/templates/token/list.html +++ b/core/admin/mailu/ui/templates/token/list.html @@ -9,7 +9,7 @@ {% endblock %} {% block main_action %} -{% trans %}New token{% endtrans %} +{% trans %}New token{% endtrans %} {% endblock %} {% block content %} diff --git a/core/admin/mailu/ui/templates/user/list.html b/core/admin/mailu/ui/templates/user/list.html index 2aff662f..ab896ee6 100644 --- a/core/admin/mailu/ui/templates/user/list.html +++ b/core/admin/mailu/ui/templates/user/list.html @@ -9,7 +9,7 @@ {% endblock %} {% block main_action %} -{% trans %}Add user{% endtrans %} +{% trans %}Add user{% endtrans %} {% endblock %} {% block content %} From 7d3c9d412d430d7fbd578df1cb738126f7e1c53e Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 16:05:30 +0200 Subject: [PATCH 07/24] Change tables to datatables --- core/admin/assets/app.js | 11 ++- core/admin/assets/vendor.js | 2 + core/admin/mailu/ui/templates/admin/list.html | 28 ++++--- core/admin/mailu/ui/templates/alias/list.html | 46 ++++++------ .../mailu/ui/templates/alternative/list.html | 32 ++++---- .../admin/mailu/ui/templates/domain/list.html | 74 ++++++++++--------- core/admin/mailu/ui/templates/fetch/list.html | 54 +++++++------- core/admin/mailu/ui/templates/macros.html | 4 +- .../mailu/ui/templates/manager/list.html | 12 ++- core/admin/mailu/ui/templates/relay/list.html | 46 ++++++------ core/admin/mailu/ui/templates/token/list.html | 36 +++++---- core/admin/mailu/ui/templates/user/list.html | 68 +++++++++-------- 12 files changed, 228 insertions(+), 185 deletions(-) diff --git a/core/admin/assets/app.js b/core/admin/assets/app.js index dc981081..d87832a6 100644 --- a/core/admin/assets/app.js +++ b/core/admin/assets/app.js @@ -1,10 +1,17 @@ require('./app.css'); import 'select2'; +import 'admin-lte/plugins/datatables/jquery.dataTables.js'; +import 'admin-lte/plugins/datatables-bs4/js/dataTables.bootstrap4.js'; +import 'admin-lte/plugins/datatables-responsive/js/dataTables.responsive.js'; +import 'admin-lte/plugins/datatables-responsive/js/responsive.bootstrap4.js'; + jQuery("document").ready(function() { jQuery(".mailselect").select2({ tags: true, tokenSeparators: [',', ' '] - }) + }); + jQuery(".table").DataTable({ + "responsive": true, + }); }); - diff --git a/core/admin/assets/vendor.js b/core/admin/assets/vendor.js index a5ff7a3c..65bee27f 100644 --- a/core/admin/assets/vendor.js +++ b/core/admin/assets/vendor.js @@ -14,6 +14,8 @@ import 'admin-lte/plugins/fontawesome-free/css/solid.css'; // AdminLTE import 'admin-lte/build/scss/adminlte.scss'; +import 'admin-lte/plugins/datatables-bs4/css/dataTables.bootstrap4.css'; +import 'admin-lte/plugins/datatables-responsive/css/responsive.bootstrap4.css'; // import 'admin-lte/build/less/AdminLTE-without-plugins.less'; // doesn't exist // import 'admin-lte/build/less/select2.less'; // doesn't exist // import 'admin-lte/build/less/skins/skin-blue.less'; // doesn't exist diff --git a/core/admin/mailu/ui/templates/admin/list.html b/core/admin/mailu/ui/templates/admin/list.html index 856f6830..f2f5d229 100644 --- a/core/admin/mailu/ui/templates/admin/list.html +++ b/core/admin/mailu/ui/templates/admin/list.html @@ -12,17 +12,21 @@ {% block content %} {% call macros.table() %} - - - - -{% for admin in admins %} - - - - -{% endfor %} + + + + + + + + {% for admin in admins %} + + + + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/alias/list.html b/core/admin/mailu/ui/templates/alias/list.html index 4bb69169..e8ddc862 100644 --- a/core/admin/mailu/ui/templates/alias/list.html +++ b/core/admin/mailu/ui/templates/alias/list.html @@ -14,26 +14,30 @@ {% block content %} {% call macros.table() %} - - - - - - - - -{% for alias in domain.aliases %} - - - - - - - - -{% endfor %} + + + + + + + + + + + + {% for alias in domain.aliases %} + + + + + + + + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/alternative/list.html b/core/admin/mailu/ui/templates/alternative/list.html index dc981ef6..f123eb9f 100644 --- a/core/admin/mailu/ui/templates/alternative/list.html +++ b/core/admin/mailu/ui/templates/alternative/list.html @@ -14,19 +14,23 @@ {% block content %} {% call macros.table() %} - - - - - -{% for alternative in domain.alternatives %} - - - - - -{% endfor %} + + + + + + + + + {% for alternative in domain.alternatives %} + + + + + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/domain/list.html b/core/admin/mailu/ui/templates/domain/list.html index fcc3a72c..c82647df 100644 --- a/core/admin/mailu/ui/templates/domain/list.html +++ b/core/admin/mailu/ui/templates/domain/list.html @@ -12,40 +12,44 @@ {% block content %} {% call macros.table() %} - - - - - - - - - - -{% for domain in current_user.get_managed_domains() %} - - - - - - - - - - -{% endfor %} + + + + + + + + + + + + + + {% for domain in current_user.get_managed_domains() %} + + + + + + + + + + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/fetch/list.html b/core/admin/mailu/ui/templates/fetch/list.html index 09253a21..77f66bb1 100644 --- a/core/admin/mailu/ui/templates/fetch/list.html +++ b/core/admin/mailu/ui/templates/fetch/list.html @@ -14,30 +14,34 @@ {% block content %} {% call macros.table() %} - - - - - - - - - - -{% for fetch in user.fetches %} - - - - - - - - - - -{% endfor %} + + + + + + + + + + + + + + {% for fetch in user.fetches %} + + + + + + + + + + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/macros.html b/core/admin/mailu/ui/templates/macros.html index a1fc2919..6d821ef8 100644 --- a/core/admin/mailu/ui/templates/macros.html +++ b/core/admin/mailu/ui/templates/macros.html @@ -86,11 +86,9 @@ {% macro table(theme="primary") %}
-
+
{% trans %}Actions{% endtrans %}{% trans %}Email{% endtrans %}
- - {{ admin }}
{% trans %}Actions{% endtrans %}{% trans %}Email{% endtrans %}
+ + {{ admin }}
{% trans %}Actions{% endtrans %}{% trans %}Email{% endtrans %}{% trans %}Destination{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
-   - - {{ alias }}{{ alias.destination|join(', ') or '-' }}{{ alias.comment or '' }}{{ alias.created_at }}{{ alias.updated_at or '' }}
{% trans %}Actions{% endtrans %}{% trans %}Email{% endtrans %}{% trans %}Destination{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
+   + + {{ alias }}{{ alias.destination|join(', ') or '-' }}{{ alias.comment or '' }}{{ alias.created_at }}{{ alias.updated_at or '' }}
{% trans %}Actions{% endtrans %}{% trans %}Name{% endtrans %}{% trans %}Created{% endtrans %}
- - {{ alternative }}{{ alternative.created_at }}
{% trans %}Actions{% endtrans %}{% trans %}Name{% endtrans %}{% trans %}Created{% endtrans %}
+ + {{ alternative }}{{ alternative.created_at }}
{% trans %}Actions{% endtrans %}{% trans %}Manage{% endtrans %}{% trans %}Domain name{% endtrans %}{% trans %}Mailbox count{% endtrans %}{% trans %}Alias count{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
-   - {% if current_user.global_admin %} -   -   - {% endif %} - -   -   -   - {% if current_user.global_admin %} -   - {% endif %} - {{ domain.name }}{{ domain.users | count }} / {{ '∞' if domain.max_users == -1 else domain.max_users }}{{ domain.aliases | count }} / {{ '∞' if domain.max_aliases == -1 else domain.max_aliases }}{{ domain.comment or '' }}{{ domain.created_at }}{{ domain.updated_at or '' }}
{% trans %}Actions{% endtrans %}{% trans %}Manage{% endtrans %}{% trans %}Domain name{% endtrans %}{% trans %}Mailbox count{% endtrans %}{% trans %}Alias count{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
+   + {% if current_user.global_admin %} +   +   + {% endif %} + +   +   +   + {% if current_user.global_admin %} +   + {% endif %} + {{ domain.name }}{{ domain.users | count }} / {{ '∞' if domain.max_users == -1 else domain.max_users }}{{ domain.aliases | count }} / {{ '∞' if domain.max_aliases == -1 else domain.max_aliases }}{{ domain.comment or '' }}{{ domain.created_at }}{{ domain.updated_at or '' }}
{% trans %}Actions{% endtrans %}{% trans %}Endpoint{% endtrans %}{% trans %}Username{% endtrans %}{% trans %}Keep emails{% endtrans %}{% trans %}Last check{% endtrans %}{% trans %}Status{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
-   - - {{ fetch.protocol }}{{ 's' if fetch.tls else '' }}://{{ fetch.host }}:{{ fetch.port }}{{ fetch.username }}{% if fetch.keep %}{% trans %}yes{% endtrans %}{% else %}{% trans %}no{% endtrans %}{% endif %}{{ fetch.last_check or '-' }}{{ fetch.error or '-' }}{{ fetch.created_at }}{{ fetch.updated_at or '' }}
{% trans %}Actions{% endtrans %}{% trans %}Endpoint{% endtrans %}{% trans %}Username{% endtrans %}{% trans %}Keep emails{% endtrans %}{% trans %}Last check{% endtrans %}{% trans %}Status{% endtrans %}{% trans %}Created{% endtrans %}{% trans %}Last edit{% endtrans %}
+   + + {{ fetch.protocol }}{{ 's' if fetch.tls else '' }}://{{ fetch.host }}:{{ fetch.port }}{{ fetch.username }}{% if fetch.keep %}{% trans %}yes{% endtrans %}{% else %}{% trans %}no{% endtrans %}{% endif %}{{ fetch.last_check or '-' }}{{ fetch.error or '-' }}{{ fetch.created_at }}{{ fetch.updated_at or '' }}
- {{ caller() }} -
diff --git a/core/admin/mailu/ui/templates/manager/list.html b/core/admin/mailu/ui/templates/manager/list.html index b660bf6d..9a78e3ca 100644 --- a/core/admin/mailu/ui/templates/manager/list.html +++ b/core/admin/mailu/ui/templates/manager/list.html @@ -14,10 +14,13 @@ {% block content %} {% call macros.table() %} - - {% trans %}Actions{% endtrans %} - {% trans %}Email{% endtrans %} - + + + {% trans %}Actions{% endtrans %} + {% trans %}Email{% endtrans %} + + + {% for manager in domain.managers %} @@ -26,5 +29,6 @@ {{ manager }} {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/relay/list.html b/core/admin/mailu/ui/templates/relay/list.html index aef189ad..6c8c9196 100644 --- a/core/admin/mailu/ui/templates/relay/list.html +++ b/core/admin/mailu/ui/templates/relay/list.html @@ -12,26 +12,30 @@ {% block content %} {% call macros.table() %} - - {% trans %}Actions{% endtrans %} - {% trans %}Domain name{% endtrans %} - {% trans %}Remote host{% endtrans %} - {% trans %}Comment{% endtrans %} - {% trans %}Created{% endtrans %} - {% trans %}Last edit{% endtrans %} - -{% for relay in relays %} - - -  -   - - {{ relay.name }} - {{ relay.smtp or '-' }} - {{ relay.comment or '' }} - {{ relay.created_at }} - {{ relay.updated_at or '' }} - -{% endfor %} + + + {% trans %}Actions{% endtrans %} + {% trans %}Domain name{% endtrans %} + {% trans %}Remote host{% endtrans %} + {% trans %}Comment{% endtrans %} + {% trans %}Created{% endtrans %} + {% trans %}Last edit{% endtrans %} + + + + {% for relay in relays %} + + +   +   + + {{ relay.name }} + {{ relay.smtp or '-' }} + {{ relay.comment or '' }} + {{ relay.created_at }} + {{ relay.updated_at or '' }} + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/token/list.html b/core/admin/mailu/ui/templates/token/list.html index 99f67383..09d0fe76 100644 --- a/core/admin/mailu/ui/templates/token/list.html +++ b/core/admin/mailu/ui/templates/token/list.html @@ -14,21 +14,25 @@ {% block content %} {% call macros.table() %} - - {% trans %}Actions{% endtrans %} - {% trans %}Comment{% endtrans %} - {% trans %}Authorized IP{% endtrans %} - {% trans %}Created{% endtrans %} - -{% for token in user.tokens %} - - - - - {{ token.comment }} - {{ token.ip or "any" }} - {{ token.created_at }} - -{% endfor %} + + + {% trans %}Actions{% endtrans %} + {% trans %}Comment{% endtrans %} + {% trans %}Authorized IP{% endtrans %} + {% trans %}Created{% endtrans %} + + + + {% for token in user.tokens %} + + + + + {{ token.comment }} + {{ token.ip or "any" }} + {{ token.created_at }} + + {% endfor %} + {% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/user/list.html b/core/admin/mailu/ui/templates/user/list.html index ab896ee6..3cc724c8 100644 --- a/core/admin/mailu/ui/templates/user/list.html +++ b/core/admin/mailu/ui/templates/user/list.html @@ -14,37 +14,41 @@ {% block content %} {% call macros.table() %} - - {% trans %}Actions{% endtrans %} - {% trans %}User settings{% endtrans %} - {% trans %}Email{% endtrans %} - {% trans %}Features{% endtrans %} - {% trans %}Quota{% endtrans %} - {% trans %}Comment{% endtrans %} - {% trans %}Created{% endtrans %} - {% trans %}Last edit{% endtrans %} - -{% for user in domain.users %} - - -   - - - -   -   -   - - {{ user }} - - {% if user.enable_imap %}imap{% endif %} - {% if user.enable_pop %}pop3{% endif %} - - {{ user.quota_bytes_used | filesizeformat }} / {{ (user.quota_bytes | filesizeformat) if user.quota_bytes else '∞' }} - {{ user.comment or '-' }} - {{ user.created_at }} - {{ user.updated_at or '' }} - -{% endfor %} + + + {% trans %}Actions{% endtrans %} + {% trans %}User settings{% endtrans %} + {% trans %}Email{% endtrans %} + {% trans %}Features{% endtrans %} + {% trans %}Quota{% endtrans %} + {% trans %}Comment{% endtrans %} + {% trans %}Created{% endtrans %} + {% trans %}Last edit{% endtrans %} + + + + {% for user in domain.users %} + + +   + + + +   +   +   + + {{ user }} + + {% if user.enable_imap %}imap{% endif %} + {% if user.enable_pop %}pop3{% endif %} + + {{ user.quota_bytes_used | filesizeformat }} / {{ (user.quota_bytes | filesizeformat) if user.quota_bytes else '∞' }} + {{ user.comment or '-' }} + {{ user.created_at }} + {{ user.updated_at or '' }} + + {% endfor %} + {% endcall %} {% endblock %} From 49d68fa6d10aef4b585ed30a5ea7e7ac08e7c869 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 16:51:13 +0200 Subject: [PATCH 08/24] Fix horizontal scrollbar in sidebar --- core/admin/mailu/ui/templates/base.html | 2 +- core/admin/mailu/ui/templates/sidebar.html | 36 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/admin/mailu/ui/templates/base.html b/core/admin/mailu/ui/templates/base.html index c5b09159..568d0880 100644 --- a/core/admin/mailu/ui/templates/base.html +++ b/core/admin/mailu/ui/templates/base.html @@ -8,7 +8,7 @@ Mailu-Admin - {{ config["SITENAME"] }} - +