From da4a8cc9798fca5ed99cc2f5b85c2e8071b9d54b Mon Sep 17 00:00:00 2001 From: MrMeeb Date: Tue, 25 Apr 2023 11:00:05 +0000 Subject: [PATCH] 4.27.0 --- app/email_handler.py | 2 +- app/static/js/index.js | 12 ++- app/templates/dashboard/index.html | 140 ++++++++++++++++------------- 3 files changed, 88 insertions(+), 66 deletions(-) diff --git a/app/email_handler.py b/app/email_handler.py index 93f3f0e..470d4d2 100644 --- a/app/email_handler.py +++ b/app/email_handler.py @@ -1024,7 +1024,7 @@ def handle_reply(envelope, msg: Message, rcpt_to: str) -> (bool, str): # reply_email must end with EMAIL_DOMAIN or a domain that can be used as reverse alias domain if not reply_email.endswith(EMAIL_DOMAIN): sl_domain: SLDomain = SLDomain.get_by(domain=reply_domain) - if sl_domain is None or not sl_domain.use_as_reverse_alias: + if sl_domain is None: LOG.w(f"Reply email {reply_email} has wrong domain") return False, status.E501 diff --git a/app/static/js/index.js b/app/static/js/index.js index 3a55731..0fbc362 100644 --- a/app/static/js/index.js +++ b/app/static/js/index.js @@ -256,17 +256,27 @@ new Vue({ el: '#filter-app', delimiters: ["[[", "]]"], // necessary to avoid conflict with jinja data: { - showFilter: false + showFilter: false, + showStats: false }, methods: { async toggleFilter() { let that = this; that.showFilter = !that.showFilter; store.set('showFilter', that.showFilter); + }, + + async toggleStats() { + let that = this; + that.showStats = !that.showStats; + store.set('showStats', that.showStats); } }, async mounted() { if (store.get("showFilter")) this.showFilter = true; + + if (store.get("showStats")) + this.showStats = true; } }); diff --git a/app/templates/dashboard/index.html b/app/templates/dashboard/index.html index a3e24df..82f7ad6 100644 --- a/app/templates/dashboard/index.html +++ b/app/templates/dashboard/index.html @@ -31,63 +31,11 @@ {% block title %}Alias{% endblock %} {% block default_content %} - -
-
-
-
-
-
Aliases
-
All time
-
-
{{ stats.nb_alias }}
-
-
-
-
-
-
-
-
Forwarded
-
Last 14 days
-
-
{{ stats.nb_forward }}
-
-
-
-
-
-
-
-
Replies/Sent
-
Last 14 days
-
-
{{ stats.nb_reply }}
-
-
-
-
-
-
-
-
Blocked
-
Last 14 days
-
-
{{ stats.nb_block }}
-
-
-
-
-
-
-
+
+
{{ csrf_form.csrf_token }} @@ -141,17 +89,86 @@
-
+ +
+
+
+
+
+
Aliases
+
All time
+
+
{{ stats.nb_alias }}
+
+
+
+
+
+
+
+
Forwarded
+
Last 14 days
+
+
{{ stats.nb_forward }}
+
+
+
+
+
+
+
+
Replies/Sent
+
Last 14 days
+
+
{{ stats.nb_reply }}
+
+
+
+
+
+
+
+
Blocked
+
Last 14 days
+
+
{{ stats.nb_block }}
+
+
+
+
+
@@ -223,11 +240,6 @@ Reset {% endif %} - - -