mirror of
https://github.com/simple-login/app.git
synced 2025-02-22 23:02:55 +08:00
add setting for include_website_in_one_click_alias
This commit is contained in:
parent
6cd8e45d21
commit
4cea47cc27
2 changed files with 54 additions and 20 deletions
|
@ -294,6 +294,15 @@ def setting():
|
|||
Session.commit()
|
||||
flash("Your preference has been updated", "success")
|
||||
return redirect(url_for("dashboard.setting"))
|
||||
elif request.form.get("form-name") == "include_website_in_one_click_alias":
|
||||
choose = request.form.get("enable")
|
||||
if choose == "on":
|
||||
current_user.include_website_in_one_click_alias = True
|
||||
else:
|
||||
current_user.include_website_in_one_click_alias = False
|
||||
Session.commit()
|
||||
flash("Your preference has been updated", "success")
|
||||
return redirect(url_for("dashboard.setting"))
|
||||
|
||||
elif request.form.get("form-name") == "export-data":
|
||||
return redirect(url_for("api.export_data"))
|
||||
|
|
|
@ -400,27 +400,52 @@
|
|||
</div>
|
||||
<!-- END Always expand alias info -->
|
||||
|
||||
<!-- Include website address in alias -->
|
||||
<div class="card" id="include_website_in_one_click_alias">
|
||||
<div class="card-body">
|
||||
<div class="card-title">
|
||||
Include website address in one-click alias creation on browser extension
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
If enabled, the website name will be used as alias prefix
|
||||
when you create an alias via SimpleLogin browser extension via the email input field <br>
|
||||
<img src="https://simplelogin.io/images/one-click-alias.gif" class="my-2"
|
||||
style="max-width: 40%">
|
||||
</div>
|
||||
<form method="post" action="#include_website_in_one_click_alias">
|
||||
<input type="hidden" name="form-name" value="include_website_in_one_click_alias">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="include-website-in-alias" name="enable"
|
||||
{% if current_user.include_website_in_one_click_alias %} checked {% endif %} class="form-check-input">
|
||||
<label for="include-website-in-alias">Include website address in alias</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-primary">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Include website address in alias -->
|
||||
|
||||
<!-- Ignore Loop Email -->
|
||||
{# <div class="card" id="ignore-loop-email-section">#}
|
||||
{# <div class="card-body">#}
|
||||
{# <div class="card-title">Ignore Loop Emails</div>#}
|
||||
{# <div class="mb-3">#}
|
||||
{# On some email clients, "Reply All" automatically includes your alias that#}
|
||||
{# would send the same email to your mailbox.#}
|
||||
{# <br>#}
|
||||
{# You can disable these "loop" emails by enabling this option.#}
|
||||
{# </div>#}
|
||||
{# <form method="post" action="#ignore-loop-email-section">#}
|
||||
{# <input type="hidden" name="form-name" value="ignore-loop-email">#}
|
||||
{# <div class="form-check">#}
|
||||
{# <input type="checkbox" id="ignore-loop-email" name="enable"#}
|
||||
{# {% if current_user.ignore_loop_email %} checked {% endif %} class="form-check-input">#}
|
||||
{# <label for="ignore-loop-email">Ignore Loop Emails</label>#}
|
||||
{# </div>#}
|
||||
{# <button type="submit" class="btn btn-outline-primary">Update</button>#}
|
||||
{# </form>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
{# <div class="card" id="ignore-loop-email-section">#}
|
||||
{# <div class="card-body">#}
|
||||
{# <div class="card-title">Ignore Loop Emails</div>#}
|
||||
{# <div class="mb-3">#}
|
||||
{# On some email clients, "Reply All" automatically includes your alias that#}
|
||||
{# would send the same email to your mailbox.#}
|
||||
{# <br>#}
|
||||
{# You can disable these "loop" emails by enabling this option.#}
|
||||
{# </div>#}
|
||||
{# <form method="post" action="#ignore-loop-email-section">#}
|
||||
{# <input type="hidden" name="form-name" value="ignore-loop-email">#}
|
||||
{# <div class="form-check">#}
|
||||
{# <input type="checkbox" id="ignore-loop-email" name="enable"#}
|
||||
{# {% if current_user.ignore_loop_email %} checked {% endif %} class="form-check-input">#}
|
||||
{# <label for="ignore-loop-email">Ignore Loop Emails</label>#}
|
||||
{# </div>#}
|
||||
{# <button type="submit" class="btn btn-outline-primary">Update</button>#}
|
||||
{# </form>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
<!-- END Ignore Loop Email -->
|
||||
|
||||
<!-- One-click subscribe -->
|
||||
|
|
Loading…
Reference in a new issue