Use FIRST_ALIAS_DOMAIN in directory and custom alias

This commit is contained in:
Son NK 2020-04-15 22:52:30 +02:00
parent 28101612db
commit 746cd2eb66
3 changed files with 24 additions and 14 deletions

View File

@ -16,8 +16,8 @@
<div class="col p-1">
<div class="alert alert-primary" role="alert">
You might notice a random word after the dot(<em>.</em>) in the alias.
This part is to avoid a person taking all the "nice" aliases like <b>hello@{{ EMAIL_DOMAIN }}</b>,
<b>me@{{ EMAIL_DOMAIN }}</b>, etc. <br>
This part is to avoid a person taking all the "nice" aliases like <b>hello@{{ FIRST_ALIAS_DOMAIN }}</b>,
<b>me@{{ FIRST_ALIAS_DOMAIN }}</b>, etc. <br>
If you add your own domain, this restriction is removed and you can fully customize the alias. <br>
</div>
</div>

View File

@ -17,19 +17,27 @@
{% endif %}
<div class="alert alert-primary" role="alert">
Directory allows you to create aliases <b>on the fly</b>. Simply use <br>
<div class="pl-3 py-2 bg-white">
<em>your_directory/<b>anything</b>@{{ EMAIL_DOMAIN }}</em> or <br>
<em>your_directory+<b>anything</b>@{{ EMAIL_DOMAIN }}</em> or <br>
<em>your_directory#<b>anything</b>@{{ EMAIL_DOMAIN }}</em> <br>
<div>
Directory allows you to create aliases <b>on the fly</b>.
</div>
<div class="mt-2 pb-2">
1⃣ Pick a name for your directory, says <em>my_dir</em> <br>
2⃣ Quickly use one of the following formats to create an alias on-the-fly <b>without creating this alias beforehand</b>
</div>
<div class="pl-3 py-2 bg-white">
<em>my_dir/<b>anything</b>@{{ FIRST_ALIAS_DOMAIN }}</em> or <br>
<em>my_dir+<b>anything</b>@{{ FIRST_ALIAS_DOMAIN }}</em> or <br>
<em>my_dir#<b>anything</b>@{{ FIRST_ALIAS_DOMAIN }}</em> <br>
</div>
<em><b>anything</b></em> is any string composed of lowercase character.
<div class="mt-2">
You can use this feature on the following domains:
{% for alias_domain in ALIAS_DOMAINS %}
<div class="font-weight-bold">{{ alias_domain }} </div>
{% endfor %}
</div>
next time you need an email address. <br>
<em><b>anything</b></em> could really be anything, it's up to you to invent the most creative alias 😉. <br>
<em>your_directory</em> is the name of one of your directories. <br><br>
You can use the directory feature on the following domains:
{% for alias_domain in ALIAS_DOMAINS %}
<div class="font-weight-bold">{{ alias_domain }} </div>
{% endfor %}
<div class="h4 text-primary mt-3">

View File

@ -29,6 +29,7 @@ from app.config import (
FLASK_PROFILER_PATH,
FLASK_PROFILER_PASSWORD,
SENTRY_FRONT_END_DSN,
FIRST_ALIAS_DOMAIN,
)
from app.dashboard.base import dashboard_bp
from app.developer.base import developer_bp
@ -318,6 +319,7 @@ def jinja2_filter(app):
URL=URL,
SENTRY_DSN=SENTRY_FRONT_END_DSN,
VERSION=SHA1,
FIRST_ALIAS_DOMAIN=FIRST_ALIAS_DOMAIN,
)