From 45c49f1e1a2028dd21994ae4be943f66d8e1f245 Mon Sep 17 00:00:00 2001 From: doanguyen Date: Sat, 28 Dec 2019 21:59:47 +0100 Subject: [PATCH] minor comments on domain-detail branch --- app/config.py | 12 +++++++----- .../templates/dashboard/custom_domain.html | 8 ++++++-- .../templates/dashboard/domain_detail.html | 19 ++++++++++++++++--- app/dashboard/templates/dashboard/index.html | 4 ++-- app/dashboard/views/domain_detail.py | 11 +---------- static/style.css | 4 ++++ 6 files changed, 36 insertions(+), 22 deletions(-) diff --git a/app/config.py b/app/config.py index e2906ee3..b4dc1184 100644 --- a/app/config.py +++ b/app/config.py @@ -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"] diff --git a/app/dashboard/templates/dashboard/custom_domain.html b/app/dashboard/templates/dashboard/custom_domain.html index c5e700c3..23fdc769 100644 --- a/app/dashboard/templates/dashboard/custom_domain.html +++ b/app/dashboard/templates/dashboard/custom_domain.html @@ -16,8 +16,12 @@
- {{ custom_domain.domain }} - {% if custom_domain.verified %} ✅ {% else %} 🚫{% endif %} + {{ custom_domain.domain }} + {% if custom_domain.verified %} + + {% else %} + 🚫 + {% endif %}
Created {{ custom_domain.created_at | dt }}
diff --git a/app/dashboard/templates/dashboard/domain_detail.html b/app/dashboard/templates/dashboard/domain_detail.html index 3f0f2909..08864fa7 100644 --- a/app/dashboard/templates/dashboard/domain_detail.html +++ b/app/dashboard/templates/dashboard/domain_detail.html @@ -19,7 +19,12 @@
1. MX record - {% if custom_domain.verified %} ✅ {% else %} 🚫{% endif %} + + {% if custom_domain.verified %} + + {% else %} + 🚫 + {% endif %}
Add the following MX DNS record to your domain
@@ -64,7 +69,11 @@
2. SPF (Optional) - {% if custom_domain.spf_verified %} ✅ {% else %} 🚫{% endif %} + {% if custom_domain.spf_verified %} + + {% else %} + 🚫 + {% endif %}
@@ -116,7 +125,11 @@
3. DKIM (Optional) - {% if custom_domain.dkim_verified %} ✅ {% else %} 🚫{% endif %} + {% if custom_domain.dkim_verified %} + + {% else %} + 🚫 + {% endif %}
diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index 9b4e659d..a3a2841c 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -80,7 +80,7 @@ >
- -