diff --git a/app/templates/close_account.html b/app/templates/close_account.html new file mode 100644 index 0000000..01ff495 --- /dev/null +++ b/app/templates/close_account.html @@ -0,0 +1,36 @@ + + + + + FediBooks + {% include 'imports.html' %} + + + +
+

Close your FediBooks account

+
+ + {% include 'error.html' %} + +
+
+

+ +

+
+

Are you sure you want to permanently delete your account?

+

All of your FediBooks bots will stop working, but their accounts will remain open. You can delete them manually or repurpose them for something else.

+

If you're sure you want to delete your account, enter your password below and click "Close my account".

+

+ +

+ Cancel + +
+
+
+ + {% include 'footer.html' %} + + diff --git a/app/templates/settings.html b/app/templates/settings.html index a806fa5..67b3c00 100644 --- a/app/templates/settings.html +++ b/app/templates/settings.html @@ -18,7 +18,7 @@

Login settings

-

Update your email and password here.

+

Update your email and password here, or close your account.

@@ -29,6 +29,10 @@
+
+ + Close account +

Contact settings

@@ -73,10 +77,10 @@
- - Cancel - Help -
+ + Cancel + Help +
diff --git a/app/webui.py b/app/webui.py index dd3d97c..40f8c04 100644 --- a/app/webui.py +++ b/app/webui.py @@ -61,6 +61,10 @@ def show_signup_page(): def render_settings(): return settings(mysql) +@app.route("/delete") +def render_delete(): + return render_template("close_account.html", error = session.pop('error', None)) + @app.route("/bot/edit/", methods = ['GET', 'POST']) def render_bot_edit(id): return bot_edit(id, mysql)