From f2a124aff5296d6ccbe3dbaddf906e7de17dc862 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sun, 1 Sep 2019 14:41:33 +1000 Subject: [PATCH] bot accounts add page --- templates/bot_accounts_add.html | 43 +++++++++++++++++++++++++++++++++ webui.py | 4 +++ 2 files changed, 47 insertions(+) create mode 100644 templates/bot_accounts_add.html diff --git a/templates/bot_accounts_add.html b/templates/bot_accounts_add.html new file mode 100644 index 0000000..01247fb --- /dev/null +++ b/templates/bot_accounts_add.html @@ -0,0 +1,43 @@ + + + + + FediBooks + {% include 'imports.html' %} + + + +
+

Create bot

+

Step {{ session['step'] }}

+
+ +
+
+ {% if session['step'] == 1 %} + + +
+ + {% elif session['step'] == 2 %} +

Authentication required

+

{{ session['instance'] }} requires authentication to view public posts. Ensure you're signed in as {{ session['account'] }}, and click Next. You will be prompted to give FediBooks access to read your posts, which is required for your bot.

+ + {% elif session['step'] == 3 %} + +

Authentication failure

+

FediBooks was unable to authenticate with {{ session['instance'] }}.

+

Click back to try again. If you believe this is in error, you may file a bug report.

+ + {% endif %} + +
+ + +
+
+
+ + {% include 'footer.html' %} + + diff --git a/webui.py b/webui.py index b8715dc..a4cfbe4 100644 --- a/webui.py +++ b/webui.py @@ -47,6 +47,10 @@ def bot_delete(id): def bot_accounts(id): return render_template("bot_accounts.html") +@app.route("/bot/accounts/add") +def bot_accounts_add(): + return render_template("bot_accounts_add.html") + @app.route("/bot/create/") def bot_create(): session['step'] = 4