From 7435cf9882fe577c8754fe8ac2df6f7007c546fa Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 8 Dec 2024 17:03:57 +0100 Subject: add fixes for search and sort --- src/jwebmail/__init__.py | 2 +- src/jwebmail/model/read_mails.py | 2 +- src/jwebmail/templates/_bot_nav.html | 4 ++-- src/jwebmail/templates/_top_nav.html | 10 ++++++++-- 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src/jwebmail') diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index 86febf4..b54d0e2 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.8.1.dev0" +__version__ = "2.8.1.dev1" csrf = CSRFProtect() diff --git a/src/jwebmail/model/read_mails.py b/src/jwebmail/model/read_mails.py index b2e1191..fc89c8e 100644 --- a/src/jwebmail/model/read_mails.py +++ b/src/jwebmail/model/read_mails.py @@ -36,7 +36,7 @@ class QMailAuthuser: sort_val["direction"] = "asc" match sort: - case "date" | "subject" | "size": + case "date" | "sender" | "size": sort_val["parameter"] = sort case _: raise ValueError(f"invalid sort parameter {sort!r}") diff --git a/src/jwebmail/templates/_bot_nav.html b/src/jwebmail/templates/_bot_nav.html index d92d467..03cb939 100644 --- a/src/jwebmail/templates/_bot_nav.html +++ b/src/jwebmail/templates/_bot_nav.html @@ -43,7 +43,7 @@
{% if mail_folders|length > 1 %} -
+ {% for k, v in request.args.items() if v %} @@ -67,7 +67,7 @@
{% endif %} -
diff --git a/src/jwebmail/templates/_top_nav.html b/src/jwebmail/templates/_top_nav.html index a9d385b..4c8bdb7 100644 --- a/src/jwebmail/templates/_top_nav.html +++ b/src/jwebmail/templates/_top_nav.html @@ -1,9 +1,15 @@
- + +
- +
-- cgit v1.2.3