Merge pull request #30 from simple-login/misc

Misc
This commit is contained in:
Son Nguyen Kim 2020-01-12 22:46:14 +01:00 committed by GitHub
commit 742b638011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 17 deletions

View file

@ -74,28 +74,28 @@
</h3>
</div>
<div class="row">
<div class="col-3">
<div class="col-md-3 col-sm-6">
<div class="card-counter primary">
<i class="fa fa-at"></i>
<span class="count-numbers">{{ total }}</span>
<span class="count-name">Email Handled</span>
</div>
</div>
<div class="col-3">
<div class="col-md-3 col-sm-6">
<div class="card-counter primary">
<i class="fa fa-paper-plane"></i>
<span class="count-numbers">{{ email_forwarded }}</span>
<span class="count-name">Email Forwarded</span>
</div>
</div>
<div class="col-3">
<div class="col-md-3 col-sm-6">
<div class="card-counter primary">
<i class="fa fa-reply"></i>
<span class="count-numbers">{{ email_replied }}</span>
<span class="count-name">Email Replied</span>
</div>
</div>
<div class="col-3">
<div class="col-md-3 col-sm-6">
<div class="card-counter danger">
<i class="fa fa-ban"></i>
<span class="count-numbers">{{ email_blocked }}</span>

View file

@ -151,7 +151,7 @@
<div class="row mt-3">
<div class="col">
{% if gen_email.enabled %}
<a href="{{ url_for('dashboard.alias_contact_manager', alias=gen_email.email) }}"
<a href="{{ url_for('dashboard.alias_contact_manager', alias_id=gen_email.id) }}"
{% if alias_info.show_intro_test_send_email %}
data-intro="Not only alias can receive emails, it can <em>send</em> emails too! <br><br>
You can add a new <em>contact</em> to for your alias here. <br><br>

View file

@ -44,13 +44,13 @@ class NewContactForm(FlaskForm):
)
@dashboard_bp.route("/alias_contact_manager/<alias>/", methods=["GET", "POST"])
@dashboard_bp.route("/alias_contact_manager/<alias_id>/", methods=["GET", "POST"])
@dashboard_bp.route(
"/alias_contact_manager/<alias>/<int:forward_email_id>", methods=["GET", "POST"]
"/alias_contact_manager/<alias_id>/<int:forward_email_id>", 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

View file

@ -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. Im 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 <a href="https://app.simplelogin.io/dashboard/setting">Setting page</a>.') }}
{{ render_text('If you use Chrome or Firefox, SimpleLogin extension could be quite handy to quickly create aliases. Chrome extension can be installed on <a href="https://chrome.google.com/webstore/detail/simplelogin-your-anti-spa/dphilobhebphkdjbpfohgikllaljmgbn">Chrome Store</a> and Firefox on <a href="https://addons.mozilla.org/en-GB/firefox/addon/simplelogin/">Firefox Store</a>.') }}
{{ render_text('If you use Chrome or Firefox, SimpleLogin extension could be handy to quickly create aliases. Chrome extension can be installed on <a href="https://chrome.google.com/webstore/detail/simplelogin-your-anti-spa/dphilobhebphkdjbpfohgikllaljmgbn">Chrome Store</a> and Firefox on <a href="https://addons.mozilla.org/en-GB/firefox/addon/simplelogin/">Firefox Store</a>.') }}
{{ 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 %}