Merge pull request #9 from simple-login/domain-detail-dev
minor comments on domain-detail branch
This commit is contained in:
commit
2d3490ad61
|
@ -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"]
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -103,16 +103,4 @@ def domain_detail(custom_domain_id):
|
|||
|
||||
dkim_record = f"v=DKIM1; k=rsa; p={DKIM_DNS_VALUE}"
|
||||
|
||||
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,
|
||||
)
|
||||
return render_template("dashboard/domain_detail.html", **locals())
|
||||
|
|
|
@ -67,3 +67,7 @@ em {
|
|||
font-size: 0.6rem;
|
||||
line-height: 0.75;
|
||||
}
|
||||
|
||||
.cursor {
|
||||
cursor: pointer;
|
||||
}
|
Loading…
Reference in a new issue