1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

Add a client setup page, fixes #342

This commit is contained in:
kaiyou 2018-04-11 21:45:17 +02:00
parent fa0bda7b69
commit b4134b7774
3 changed files with 75 additions and 0 deletions

View File

@ -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") %}
<table class="table table-bordered">
<tbody>
<tr>
<th>{% trans %}Mail protocol{% endtrans %}</th>
<td>IMAP</td>
</tr>
<tr>
<th>{% trans %}TCP port{% endtrans %}</th>
<td>{{ "143" if config["TLS_FLAVOR"] == "notls" else "993 (TLS) or 143 (STARTTLS)" }}</td>
</tr>
<tr>
<th>{% trans %}Server name{% endtrans %}</th>
<td><pre>{{ config["HOSTNAMES"].split(',')[0] }}</pre></td>
</tr>
<tr>
<th>{% trans %}Username{% endtrans %}</th>
<td><pre>{{ current_user or "******" }}</pre></td>
</tr>
<tr>
<th>{% trans %}Password{% endtrans %}</th>
<td><pre>*******</pre></td>
</tr>
</tbody>
</table>
{% endcall %}
{% call macros.box(title="Outgoing mail") %}
<table class="table table-bordered">
<tbody>
<tr>
<th>{% trans %}Mail protocol{% endtrans %}</th>
<td>SMTP</td>
</tr>
<tr>
<th>{% trans %}TCP port{% endtrans %}</th>
<td>{{ "25" if config["TLS_FLAVOR"] == "notls" else "465 (TLS) or 587 (STARTTLS)" }}</td>
</tr>
<tr>
<th>{% trans %}Server name{% endtrans %}</th>
<td><pre>{{ config["HOSTNAMES"].split(',')[0] }}</pre></td>
</tr>
<tr>
<th>{% trans %}Username{% endtrans %}</th>
<td><pre>{{ current_user or "******" }}</pre></td>
</tr>
<tr>
<th>{% trans %}Password{% endtrans %}</th>
<td><pre>*******</pre></td>
</tr>
</tbody>
</table>
{% endcall %}
{% endblock %}

View File

@ -77,6 +77,11 @@
</a>
</li>
{% endif %}
<li>
<a href="{{ url_for('.client') }}">
<i class="fa fa-laptop"></i> <span>{% trans %}Client setup{% endtrans %}</span>
</a>
</li>
<li>
<a href="{{ config["WEBSITE"] }}">
<i class="fa fa-globe"></i> <span>{% trans %}Website{% endtrans %}</span>

View File

@ -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')