minor comments on domain-detail branch

This commit is contained in:
doanguyen 2019-12-28 21:59:47 +01:00 committed by Son NK
parent e239be504c
commit 45c49f1e1a
6 changed files with 36 additions and 22 deletions

View File

@ -66,11 +66,13 @@ with open(DKIM_PRIVATE_KEY_PATH) as f:
with open(DKIM_PUBLIC_KEY_PATH) as f:
DKIM_DNS_VALUE = f.read()
DKIM_DNS_VALUE = DKIM_DNS_VALUE.replace("-----BEGIN PUBLIC KEY-----", "")
DKIM_DNS_VALUE = DKIM_DNS_VALUE.replace("-----END PUBLIC KEY-----", "")
DKIM_DNS_VALUE = DKIM_DNS_VALUE.replace("\r", "")
DKIM_DNS_VALUE = DKIM_DNS_VALUE.replace("\n", "")
DKIM_DNS_VALUE = (
f.read()
.replace("-----BEGIN PUBLIC KEY-----", "")
.replace("-----END PUBLIC KEY-----", "")
.replace("\r", "")
.replace("\n", "")
)
DKIM_HEADERS = [b"from", b"to", b"subject"]

View File

@ -16,8 +16,12 @@
<div class="card" style="max-width: 50rem">
<div class="card-body">
<h5 class="card-title">
{{ custom_domain.domain }}
{% if custom_domain.verified %} ✅ {% else %} 🚫{% endif %}
<a href="{{ url_for('dashboard.domain_detail', custom_domain_id=custom_domain.id) }}">{{ custom_domain.domain }}</a>
{% if custom_domain.verified %}
<span class="cursor" data-toggle="tooltip" data-original-title="Domain Verified"></span>
{% else %}
<span class="cursor" data-toggle="tooltip" data-original-title="Domain Not Verified">🚫 </span>
{% endif %}
</h5>
<h6 class="card-subtitle mb-2 text-muted">
Created {{ custom_domain.created_at | dt }} <br>

View File

@ -19,7 +19,12 @@
<div>
<div class="font-weight-bold">1. MX record
{% if custom_domain.verified %} ✅ {% else %} 🚫{% endif %}
{% if custom_domain.verified %}
<span class="cursor" data-toggle="tooltip" data-original-title="MX Record Verified"></span>
{% else %}
<span class="cursor" data-toggle="tooltip" data-original-title="MX Record Not Verified">🚫 </span>
{% endif %}
</div>
<div class="mb-2">Add the following MX DNS record to your domain</div>
@ -64,7 +69,11 @@
<div>
<div class="font-weight-bold">2. SPF (Optional)
{% if custom_domain.spf_verified %} ✅ {% else %} 🚫{% endif %}
{% if custom_domain.spf_verified %}
<span class="cursor" data-toggle="tooltip" data-original-title="SPF Verified"></span>
{% else %}
<span class="cursor" data-toggle="tooltip" data-original-title="SPF Not Verified">🚫 </span>
{% endif %}
</div>
<div>
@ -116,7 +125,11 @@
<div>
<div class="font-weight-bold">3. DKIM (Optional)
{% if custom_domain.dkim_verified %} ✅ {% else %} 🚫{% endif %}
{% if custom_domain.dkim_verified %}
<span class="cursor" data-toggle="tooltip" data-original-title="SPF Verified"></span>
{% else %}
<span class="cursor" data-toggle="tooltip" data-original-title="DKIM Not Verified">🚫 </span>
{% endif %}
</div>
<div>

View File

@ -80,7 +80,7 @@
>
<div class="card p-3 {% if alias_info.highlight %} highlight-row {% endif %}">
<div>
<span class="clipboard mb-0"
<span class="clipboard cursor mb-0"
{% if gen_email.enabled %}
data-toggle="tooltip"
title="Copy to clipboard"
@ -118,7 +118,7 @@
<form method="post">
<input type="hidden" name="form-name" value="switch-email-forwarding">
<input type="hidden" name="gen-email-id" value="{{ gen_email.id }}">
<label class="custom-switch mt-2"
<label class="custom-switch cursor mt-2"
data-toggle="tooltip"
{% if gen_email.enabled %}
title="Block Alias"

View File

@ -105,14 +105,5 @@ def domain_detail(custom_domain_id):
return render_template(
"dashboard/domain_detail.html",
custom_domain=custom_domain,
EMAIL_SERVERS_WITH_PRIORITY=EMAIL_SERVERS_WITH_PRIORITY,
spf_record=spf_record,
dkim_record=dkim_record,
mx_errors=mx_errors,
mx_ok=mx_ok,
spf_errors=spf_errors,
spf_ok=spf_ok,
dkim_errors=dkim_errors,
dkim_ok=dkim_ok,
**locals()
)

View File

@ -66,4 +66,8 @@ em {
.copy-btn {
font-size: 0.6rem;
line-height: 0.75;
}
.cursor {
cursor: pointer;
}