mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
added second bot creation step
This commit is contained in:
parent
f581d4eda0
commit
a3a6e5ea4b
2 changed files with 14 additions and 4 deletions
|
@ -9,16 +9,24 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="thin centred">Create bot</h1>
|
<h1 class="thin centred">Create bot</h1>
|
||||||
<p class="large centred">Step {{ session['step'] }}</p>
|
<p class="large thin centred">Step {{ session['step'] }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container centred">
|
<div class="container centred">
|
||||||
<form action="/bot/create" method="POST">
|
<form action="/bot/create" method="POST">
|
||||||
|
{% if session['step'] == 1 %}
|
||||||
<label for="instance" class="important">What instance will your bot's account be on?</label>
|
<label for="instance" class="important">What instance will your bot's account be on?</label>
|
||||||
<input type="text" name="instance" class="full-width" placeholder="botsin.space">
|
<input type="text" name="instance" class="full-width" placeholder="botsin.space">
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
{% elif session['step'] == 2 %}
|
||||||
|
<h2 class="thin centred">Detected instance type: {{ session['instance_type'] }}</h2>
|
||||||
|
<p>{{ session['instance'] }} is a {{ session['instance_type'] }} instance. {% if session['instance_type'] == Pleroma %}Unfortunately, bots on Pleroma instances cannot listen for replies yet. This means that your bot will have its reply functionality disabled.{% else %}{{ session['instance_type'] }} instances are fully supported, and your bot will have all functionality available.{% endif %}</p>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="container centred">
|
<div class="container centred">
|
||||||
<button class="button btn-primary"><i class="fas fa-play"></i> Next</button>
|
<button class="button btn-primary"><i class="fas fa-arrow-right"></i> Next</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
4
webui.py
4
webui.py
|
@ -33,5 +33,7 @@ def bot_edit(id):
|
||||||
|
|
||||||
@app.route("/bot/create/")
|
@app.route("/bot/create/")
|
||||||
def bot_create():
|
def bot_create():
|
||||||
session['step'] = 1
|
session['step'] = 2
|
||||||
|
session['instance'] = "botsin.space"
|
||||||
|
session['instance_type'] = "Mastodon"
|
||||||
return render_template("bot_create.html")
|
return render_template("bot_create.html")
|
||||||
|
|
Loading…
Reference in a new issue