From 079cafc7b972ef8e0d354f13746a155b4696def0 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 12 Jan 2020 22:22:28 +0100 Subject: [PATCH 1/4] Improve welcome email --- templates/emails/welcome.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/emails/welcome.html b/templates/emails/welcome.html index 3ad5777d..eb68821c 100644 --- a/templates/emails/welcome.html +++ b/templates/emails/welcome.html @@ -1,18 +1,22 @@ {% extends "base.html" %} {% block content %} - {{ render_text("Hi " + name) }} + (% if name %} + {{ render_text("Hi " + name + ",") }} + {% else %} + {{ render_text("Hi,") }} + {% endif %} {{ render_text("My name is Son. I’m the founder of SimpleLogin and I wanted to be the first to welcome you on board.") }} {{ render_text('To better secure your account, I recommend enabling Multi-Factor Authentication (MFA) on your Setting page.') }} - {{ render_text('If you use Chrome or Firefox, SimpleLogin extension could be quite handy to quickly create aliases. Chrome extension can be installed on Chrome Store and Firefox on Firefox Store.') }} + {{ render_text('If you use Chrome or Firefox, SimpleLogin extension could be handy to quickly create aliases. Chrome extension can be installed on Chrome Store and Firefox on Firefox Store.') }} {{ render_text('If you have a domain, for example for your business or your project, you can import your domain into SimpleLogin and create your business emails backed by your personal email. This is cheaper and more convenient than buying a GSuite account. By the way, all our business emails are actually aliases :).') }} - {{ render_text('Importing domain is only available for Premium plan though, shoot me an email if you need a trial period.') }} + {{ render_text('Importing domain is only available for Premium plan though, shoot me an email by replying to this email if you need a trial period.') }} {% endblock %} From 110b296f73358e20f4b87e6425925078595d579f Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 12 Jan 2020 22:23:05 +0100 Subject: [PATCH 2/4] use alias_id instead of alias in contact manager page --- app/dashboard/templates/dashboard/index.html | 2 +- app/dashboard/views/alias_contact_manager.py | 24 ++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index 66048a32..b80650c4 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -151,7 +151,7 @@
{% if gen_email.enabled %} - /", methods=["GET", "POST"]) +@dashboard_bp.route("/alias_contact_manager//", methods=["GET", "POST"]) @dashboard_bp.route( - "/alias_contact_manager//", methods=["GET", "POST"] + "/alias_contact_manager//", methods=["GET", "POST"] ) @login_required -def alias_contact_manager(alias, forward_email_id=None): - gen_email = GenEmail.get_by(email=alias) +def alias_contact_manager(alias_id, forward_email_id=None): + gen_email = GenEmail.get(alias_id) # sanity check if not gen_email: @@ -83,7 +83,7 @@ def alias_contact_manager(alias, forward_email_id=None): ): flash(f"{website_email} is already added", "error") return redirect( - url_for("dashboard.alias_contact_manager", alias=alias) + url_for("dashboard.alias_contact_manager", alias_id=alias_id) ) forward_email = ForwardEmail.create( @@ -100,7 +100,7 @@ def alias_contact_manager(alias, forward_email_id=None): return redirect( url_for( "dashboard.alias_contact_manager", - alias=alias, + alias_id=alias_id, forward_email_id=forward_email.id, ) ) @@ -110,10 +110,14 @@ def alias_contact_manager(alias, forward_email_id=None): if not forward_email: flash("Unknown error. Refresh the page", "warning") - return redirect(url_for("dashboard.alias_contact_manager", alias=alias)) + return redirect( + url_for("dashboard.alias_contact_manager", alias_id=alias_id) + ) elif forward_email.gen_email_id != gen_email.id: flash("You cannot delete reverse-alias", "warning") - return redirect(url_for("dashboard.alias_contact_manager", alias=alias)) + return redirect( + url_for("dashboard.alias_contact_manager", alias_id=alias_id) + ) contact_name = forward_email.website_from ForwardEmail.delete(forward_email_id) @@ -121,7 +125,9 @@ def alias_contact_manager(alias, forward_email_id=None): flash(f"Reverse-alias for {contact_name} has been deleted", "success") - return redirect(url_for("dashboard.alias_contact_manager", alias=alias)) + return redirect( + url_for("dashboard.alias_contact_manager", alias_id=alias_id) + ) # make sure highlighted forward_email is at array start forward_emails = gen_email.forward_emails From e2974cdd60a1cb3ed276e8916a92030b531d3fe0 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 12 Jan 2020 22:23:18 +0100 Subject: [PATCH 3/4] make card responsive in alias log --- app/dashboard/templates/dashboard/alias_log.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/dashboard/templates/dashboard/alias_log.html b/app/dashboard/templates/dashboard/alias_log.html index ef98b165..fee55ca7 100644 --- a/app/dashboard/templates/dashboard/alias_log.html +++ b/app/dashboard/templates/dashboard/alias_log.html @@ -74,28 +74,28 @@
-
+
{{ total }} Email Handled
-
+
{{ email_forwarded }} Email Forwarded
-
+
{{ email_replied }} Email Replied
-
+
{{ email_blocked }} From 8d18708c94825c184b4f5326439c9cddbf8c2aed Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 12 Jan 2020 22:33:02 +0100 Subject: [PATCH 4/4] fix jinja error --- templates/emails/welcome.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/emails/welcome.html b/templates/emails/welcome.html index eb68821c..f2129955 100644 --- a/templates/emails/welcome.html +++ b/templates/emails/welcome.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block content %} - (% if name %} + {% if name %} {{ render_text("Hi " + name + ",") }} {% else %} {{ render_text("Hi,") }}