1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-17 05:08:59 +00:00
FediBooks/app/templates/bot/accounts_add.html

55 lines
2.2 KiB
HTML

<!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">Add account</h1>
</div>
{%include 'error.html' %}
<div class="container centred">
<form method="POST">
{% if session['step'] == 1 %}
<p>Please enter the full handle of the account you'd like your bot to learn from. Note that this is case sensitive.</p>
<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>You now need to authenticate with {{ session['instance'] }}. If {{ session['handle'] }} is your account, click "Open". If it's someone else's account, copy the URL in the box below and send it to them, and ask them to send you the code they receive.</p>
<input readonly value="{{ session['url'] }}"> <a href="{{ session['url'] }}" target="_blank" class="button btn-primary"><i class="fas fa-external-link-alt"></i>Open</a>
<p>After you've authenticated, paste the code returned by {{ session['instance'] }} into the textbox below.</p>
<input name="code" placeholder="OAuth code">
{% 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>
{% else %}
<h2 class="thin centred">Error</h2>
<p>An unknown error has occurred.</p>
{% endif %}
<div class="container centred">
<a href="/bot/accounts/{{ session['bot'] }}" class="button btn-secondary"><i class="fas fa-times"></i> Cancel</a>
{% if session['step'] != 1 %}
<a href="/bot/accounts/add/back" class="button btn-secondary"><i class="fas fa-arrow-left"></i> Back</a>
{% endif %}
<button class="button btn-primary"><i class="fas fa-arrow-right"></i> Next</button>
</div>
</form>
</div>
{% include 'footer.html' %}
</body>
</html>