From 4cea47cc27c19ed4d02e5bf835930632059af5af Mon Sep 17 00:00:00 2001 From: Son Date: Wed, 12 Jan 2022 11:50:42 +0100 Subject: [PATCH] add setting for include_website_in_one_click_alias --- app/dashboard/views/setting.py | 9 +++++ templates/dashboard/setting.html | 65 ++++++++++++++++++++++---------- 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/app/dashboard/views/setting.py b/app/dashboard/views/setting.py index ae08989f..576cdeef 100644 --- a/app/dashboard/views/setting.py +++ b/app/dashboard/views/setting.py @@ -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")) diff --git a/templates/dashboard/setting.html b/templates/dashboard/setting.html index 58020833..04f94d8d 100644 --- a/templates/dashboard/setting.html +++ b/templates/dashboard/setting.html @@ -400,27 +400,52 @@ + +
+
+
+ Include website address in one-click alias creation on browser extension +
+
+ 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
+ +
+
+ +
+ + +
+ +
+
+
+ + -{#
#} -{#
#} -{#
Ignore Loop Emails
#} -{#
#} -{# On some email clients, "Reply All" automatically includes your alias that#} -{# would send the same email to your mailbox.#} -{#
#} -{# You can disable these "loop" emails by enabling this option.#} -{#
#} -{#
#} -{# #} -{#
#} -{# #} -{# #} -{#
#} -{# #} -{#
#} -{#
#} -{#
#} + {#
#} + {#
#} + {#
Ignore Loop Emails
#} + {#
#} + {# On some email clients, "Reply All" automatically includes your alias that#} + {# would send the same email to your mailbox.#} + {#
#} + {# You can disable these "loop" emails by enabling this option.#} + {#
#} + {#
#} + {# #} + {#
#} + {# #} + {# #} + {#
#} + {# #} + {#
#} + {#
#} + {#
#}