From b4134b7774d6a031255cce92dfd8388c37c70290 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Wed, 11 Apr 2018 21:45:17 +0200 Subject: [PATCH] Add a client setup page, fixes #342 --- core/admin/mailu/ui/templates/client.html | 65 ++++++++++++++++++++++ core/admin/mailu/ui/templates/sidebar.html | 5 ++ core/admin/mailu/ui/views/base.py | 5 ++ 3 files changed, 75 insertions(+) create mode 100644 core/admin/mailu/ui/templates/client.html diff --git a/core/admin/mailu/ui/templates/client.html b/core/admin/mailu/ui/templates/client.html new file mode 100644 index 00000000..5109032e --- /dev/null +++ b/core/admin/mailu/ui/templates/client.html @@ -0,0 +1,65 @@ +{% extends "base.html" %} + +{% block title %} +{% trans %}Client setup{% endtrans %} +{% endblock %} + +{% block subtitle %} +configure your email client +{% endblock %} + +{% block content %} +{% call macros.box(title="Incoming mail") %} + + + + + + + + + + + + + + + + + + + + + + + +
{% trans %}Mail protocol{% endtrans %}IMAP
{% trans %}TCP port{% endtrans %}{{ "143" if config["TLS_FLAVOR"] == "notls" else "993 (TLS) or 143 (STARTTLS)" }}
{% trans %}Server name{% endtrans %}
{{ config["HOSTNAMES"].split(',')[0] }}
{% trans %}Username{% endtrans %}
{{ current_user or "******" }}
{% trans %}Password{% endtrans %}
*******
+{% endcall %} + +{% call macros.box(title="Outgoing mail") %} + + + + + + + + + + + + + + + + + + + + + + + +
{% trans %}Mail protocol{% endtrans %}SMTP
{% trans %}TCP port{% endtrans %}{{ "25" if config["TLS_FLAVOR"] == "notls" else "465 (TLS) or 587 (STARTTLS)" }}
{% trans %}Server name{% endtrans %}
{{ config["HOSTNAMES"].split(',')[0] }}
{% trans %}Username{% endtrans %}
{{ current_user or "******" }}
{% trans %}Password{% endtrans %}
*******
+{% endcall %} +{% endblock %} diff --git a/core/admin/mailu/ui/templates/sidebar.html b/core/admin/mailu/ui/templates/sidebar.html index db80d328..e700064c 100644 --- a/core/admin/mailu/ui/templates/sidebar.html +++ b/core/admin/mailu/ui/templates/sidebar.html @@ -77,6 +77,11 @@ {% endif %} +
  • + + {% trans %}Client setup{% endtrans %} + +
  • {% trans %}Website{% endtrans %} diff --git a/core/admin/mailu/ui/views/base.py b/core/admin/mailu/ui/views/base.py index 69af7dd3..6d4ea022 100644 --- a/core/admin/mailu/ui/views/base.py +++ b/core/admin/mailu/ui/views/base.py @@ -58,3 +58,8 @@ def announcement(): form.announcement_body.data = '' flask.flash('Your announcement was sent', 'success') return flask.render_template('announcement.html', form=form) + + +@ui.route('/client', methods=['GET']) +def client(): + return flask.render_template('client.html')