mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
bot accounts add page
This commit is contained in:
parent
07430c4d64
commit
f2a124aff5
2 changed files with 47 additions and 0 deletions
43
templates/bot_accounts_add.html
Normal file
43
templates/bot_accounts_add.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>FediBooks</title>
|
||||
{% include 'imports.html' %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="thin centred">Create bot</h1>
|
||||
<p class="large thin centred">Step {{ session['step'] }}</p>
|
||||
</div>
|
||||
|
||||
<div class="container centred">
|
||||
<form action="/bot/accounts/add" method="POST">
|
||||
{% if session['step'] == 1 %}
|
||||
<label for="account" class="important">Account handle</label>
|
||||
<input type="text" name="account" class="full-width" placeholder="@user@example.com">
|
||||
<br>
|
||||
|
||||
{% elif session['step'] == 2 %}
|
||||
<h2 class="thin centred">Authentication required</h2>
|
||||
<p>{{ 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.</p>
|
||||
|
||||
{% elif session['step'] == 3 %}
|
||||
|
||||
<h2 class="thin centred">Authentication failure</h2>
|
||||
<p>FediBooks was unable to authenticate with {{ session['instance'] }}.</p>
|
||||
<p>Click back to try again. If you believe this is in error, you may <a href="https://github.com/Lynnesbian/FediBooks/issues/new/choose">file a bug report</a>.</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="container centred">
|
||||
<button class="button btn-secondary"><i class="fas fa-arrow-left"></i> Back</button>
|
||||
<button class="button btn-primary"><i class="fas fa-arrow-right"></i> Next</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% include 'footer.html' %}
|
||||
</body>
|
||||
</html>
|
4
webui.py
4
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
|
||||
|
|
Loading…
Reference in a new issue