summaryrefslogtreecommitdiff
path: root/src/jwebmail/render_mail.py
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-04-10 19:05:10 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2024-04-10 19:05:10 +0200
commitb73ed6ebd3cca86de065549cfb0d109a1d0461c5 (patch)
tree72e601618b215599cc6646bd2c6df058b053406f /src/jwebmail/render_mail.py
parentf06e7e51f84e9260410108ed527f3c8cbe28fbdd (diff)
split js files and do local time conversion
Diffstat (limited to 'src/jwebmail/render_mail.py')
-rw-r--r--src/jwebmail/render_mail.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py
index f597603..d348721 100644
--- a/src/jwebmail/render_mail.py
+++ b/src/jwebmail/render_mail.py
@@ -50,8 +50,7 @@ def render_multipart_alternative(_subtype, content, path):
C += "</div>"
T += "</ul></div>"
- script_url = url_for("static", filename="src/rendermail.js")
- return f'<script src="{script_url}"></script><div class="jwm-mail-body jwm-mail-body-multipart-alternative">\n{T}\n{C}\n</div>\n'
+ return f'<div class="jwm-mail-body jwm-mail-body-multipart-alternative">\n{T}\n{C}\n</div>\n'
def render_multipart(_subtype, content, path):
@@ -123,7 +122,8 @@ def render_message(subtype, msg, path):
R += _format_header(gettext("CC"), msg["head"].get("cc"))
R += _format_header(gettext("BCC"), msg["head"].get("bcc"))
R += f"<dt>{escape(gettext('Date'))}</dt>"
- R += f"<dd>{escape(msg['head']['date'])}</dd>\n"
+ date = escape(msg['head']['date'])
+ R += f"<dd><time datetime='{date}' class=jwm-tolocaltime>{date}</time></dd>\n"
R += f"<dt>{escape(gettext('Content-Type'))}</dt>"
R += f"<dd>{to_mime_type(msg['head']['mime'])}</dd>\n"
R += "</dl>\n"