mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 16:48:58 +00:00
added bot edit page
This commit is contained in:
parent
098fd2654b
commit
5a778627ea
4 changed files with 69 additions and 5 deletions
|
@ -135,14 +135,24 @@ label.important {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
input {
|
input, select {
|
||||||
width: 100%;
|
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
line-height:1.4em;
|
line-height:1.4em;
|
||||||
border: 3px grey solid;
|
border: 3px grey solid;
|
||||||
border-radius: none;
|
border-radius: none;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
input:focus {
|
input:focus, select:focus {
|
||||||
border: 3px mediumpurple solid;
|
border: 3px mediumpurple solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label, input {
|
||||||
|
flex-basis: 0;
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .row {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
50
templates/bot_edit.html
Normal file
50
templates/bot_edit.html
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<!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">Edit bot</h1>
|
||||||
|
<p class="large centred">@botname@example.com</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container centred">
|
||||||
|
<form action="/do/bot/edit" method="post" class="full-width">
|
||||||
|
<div class="row">
|
||||||
|
<label for="username" class="large">Username</label>
|
||||||
|
<input type="text" name="username" value="Bot Name"><br>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="freq" class="large">Post frequency (minutes)</label>
|
||||||
|
<input type="number" min="5" max="240" step="5" value="30">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="cw" class="large">Content warning (subject)</label>
|
||||||
|
<input type="text" placeholder="None">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="cw-learning" class="large">Learn from posts with content warnings (subjects)</label>
|
||||||
|
<input type="checkbox">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="fake-mentions" class="large">Insert fake mentions</label>
|
||||||
|
<select>
|
||||||
|
<option value="full">At any time</option>
|
||||||
|
<option value="start" default>Only at the start of posts</option>
|
||||||
|
<option value="never">Never</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="length" class="large">Maximum post length (characters)</label>
|
||||||
|
<input type="number" min="100" max="5000" value="500">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include 'footer.html' %}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="container centred">
|
<div class="container centred">
|
||||||
<form action="/do/{% if signup %}signup{% else %}login{% endif %}" method="POST">
|
<form action="/do/{% if signup %}signup{% else %}login{% endif %}" method="POST">
|
||||||
<p>
|
<p>
|
||||||
<label for="email" class="important">Email</label>
|
<label for="email" class="important full-width">Email</label>
|
||||||
<input type="email" name="email" placeholder="you@example.com">
|
<input type="email" name="email" placeholder="you@example.com">
|
||||||
{% if signup %}
|
{% if signup %}
|
||||||
<p class="small">
|
<p class="small">
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br>
|
<br>
|
||||||
<label for="password" class="important">Password</label>
|
<label for="password" class="important full-width">Password</label>
|
||||||
<input type="password" name="password">
|
<input type="password" name="password">
|
||||||
{% if signup %}
|
{% if signup %}
|
||||||
<p class="small">
|
<p class="small">
|
||||||
|
|
4
webui.py
4
webui.py
|
@ -22,3 +22,7 @@ def show_login_page():
|
||||||
@app.route("/signup")
|
@app.route("/signup")
|
||||||
def show_signup_page():
|
def show_signup_page():
|
||||||
return render_template("login.html", signup = True)
|
return render_template("login.html", signup = True)
|
||||||
|
|
||||||
|
@app.route("/bot/edit/<id>")
|
||||||
|
def bot_edit(id):
|
||||||
|
return render_template("bot_edit.html")
|
||||||
|
|
Loading…
Reference in a new issue