mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 16:48:58 +00:00
Compare commits
11 commits
098fd2654b
...
80bfca1a4a
Author | SHA1 | Date | |
---|---|---|---|
80bfca1a4a | |||
cf30e2bad3 | |||
7e9f329904 | |||
3537e28933 | |||
a5c1092f37 | |||
c6b922569f | |||
e479098724 | |||
6bc83f70ae | |||
d7621e594c | |||
d150675f3e | |||
5a778627ea |
7 changed files with 170 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
body {
|
body {
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
margin: 2.5%;
|
margin: 2%;
|
||||||
background-color: #282c37;
|
background-color: #282c37;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ body {
|
||||||
.bot-icon {
|
.bot-icon {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
background: center/contain url("https://lynnesbian.space/img/bune.png");
|
background: center/contain url("https://cloud.lynnesbian.space/s/JZCPTs3DzMLAspC/preview");
|
||||||
}
|
}
|
||||||
.bot-icon, .bot-text, .bot-actions {
|
.bot-icon, .bot-text, .bot-actions {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -53,7 +53,7 @@ body {
|
||||||
}
|
}
|
||||||
.bot-text {
|
.bot-text {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
margin: 0 10px;
|
margin: 0 0 10px 10px;
|
||||||
}
|
}
|
||||||
.bot-name {
|
.bot-name {
|
||||||
font-size: 1.8em;
|
font-size: 1.8em;
|
||||||
|
@ -76,7 +76,7 @@ body {
|
||||||
.button:visited {
|
.button:visited {
|
||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
input.button {
|
input.button, button.button {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
63
templates/bot_edit.html
Normal file
63
templates/bot_edit.html
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
<!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">
|
||||||
|
</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="length" class="large">Maximum post length (characters)</label>
|
||||||
|
<input type="number" min="100" max="5000" value="500">
|
||||||
|
</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="privacy" class="large">Post privacy</label>
|
||||||
|
<select>
|
||||||
|
<option value="public">Public</option>
|
||||||
|
<option value="unlisted">Unlisted</option>
|
||||||
|
<option value="followers">Followers only</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="cw-learning" class="large">Learn from posts with content warnings (subjects)</label>
|
||||||
|
<input type="checkbox">
|
||||||
|
</div>
|
||||||
|
<div class="container centred">
|
||||||
|
<button class="button btn-primary"><i class="fas fa-save"></i> Save</button>
|
||||||
|
<a href="/" class="button btn-secondary"><i class="fas fa-times"></i> Cancel</a>
|
||||||
|
<a href="#" class="button btn-secondary"><i class="fas fa-question"></i> Help</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include 'footer.html' %}
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,5 +1,5 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div class='subtle'>
|
<div class='subtle'>
|
||||||
<p>Website design and FediBooks program by <a href='https://fedi.lynnesbian.space/@LynnearSoftware'>Lynne</a>. This site uses <a href="https://fontawesome.com">Font Awesome</a>. Source code available <a href="https://github.com/Lynnesbian/Fedibooks">here</a>.</p>
|
<p>Website design and FediBooks software by <a href='https://fedi.lynnesbian.space/@LynnearSoftware'>Lynne</a>. This site uses <a href="https://fontawesome.com">Font Awesome</a>. Source code available <a href="https://github.com/Lynnesbian/Fedibooks">here</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="bot-status">Online, learning from 3 accounts, 12345 posts in database</div>
|
<div class="bot-status">Online, learning from 3 accounts, 12345 posts in database</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bot-actions">
|
<div class="bot-actions">
|
||||||
<a class="button btn-dangerous" href="/bot/toggle/insert id here" title="Turn on/off"><i class="fas fa-power-off"></i></a><a class="button btn-secondary" href="/bot/edit/insert id here" title="Edit"><i class="fas fa-pencil-alt"></i></a>
|
<a class="button btn-secondary" href="/bot/toggle/insert id here" title="Turn on/off"><i class="fas fa-power-off"></i></a><a class="button btn-secondary" href="/bot/edit/insert id here" title="Configure"><i class="fas fa-cog"></i></a><a class="button btn-secondary" href="/bot/accounts/insert id here" title="Accounts learned from"><i class="fas fa-users"></i></a><a class="button btn-secondary" href="/bot/blacklist/insert id here" title="Banned words"><i class="fas fa-strikethrough"></i></a><a class="button btn-secondary" href="/bot/chat/insert id here" title="Chat"><i class="fas fa-comment"></i></a><a class="button btn-dangerous" href="/bot/delete/insert id here" title="Delete"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
78
templates/settings.html
Normal file
78
templates/settings.html
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
<!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">Account settings</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<form action="/do/bot/edit" method="post" class="full-width">
|
||||||
|
<div class="container light">
|
||||||
|
<h2 class="thin centred">Login settings</h2>
|
||||||
|
<p class="centred">Update your email and password here.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label for="email" class="large">Email address</label>
|
||||||
|
<input type="email" name="email" value="me@my.site">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="password" class="large">Password</label>
|
||||||
|
<input type="password" name="password" placeholder="Unchanged">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container light">
|
||||||
|
<h2 class="thin centred">Contact settings</h2>
|
||||||
|
<p class="centred">When should FediBooks send you email?</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label for="download-error" class="large">When my bot(s) can't get new posts</label>
|
||||||
|
<select name="download-error">
|
||||||
|
<option value="once">Once</option>
|
||||||
|
<option value="every-time">Every time</option>
|
||||||
|
<option value="never">Never</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="post-error" class="large">When my bot(s) can't submit new posts</label>
|
||||||
|
<select name="post-error">
|
||||||
|
<option value="once">Once</option>
|
||||||
|
<option value="every-time">Every time</option>
|
||||||
|
<option value="never">Never</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="generation-error" class="large">When my bot(s) encounter an error generating new posts</label>
|
||||||
|
<select name="generation-error">
|
||||||
|
<option value="once">Once</option>
|
||||||
|
<option value="every-time">Every time</option>
|
||||||
|
<option value="never">Never</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="reply-error" class="large">When my bot(s) can't send replies</label>
|
||||||
|
<select name="reply-error">
|
||||||
|
<option value="once">Once</option>
|
||||||
|
<option value="every-time">Every time</option>
|
||||||
|
<option value="never">Never</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container centred">
|
||||||
|
<button class="button btn-primary"><i class="fas fa-save"></i> Save</button>
|
||||||
|
<a href="/" class="button btn-secondary"><i class="fas fa-times"></i> Cancel</a>
|
||||||
|
<a href="#" class="button btn-secondary"><i class="fas fa-question"></i> Help</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include 'footer.html' %}
|
||||||
|
</body>
|
||||||
|
</html>
|
8
webui.py
8
webui.py
|
@ -22,3 +22,11 @@ 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("/settings")
|
||||||
|
def settings():
|
||||||
|
return render_template("settings.html")
|
||||||
|
|
||||||
|
@app.route("/bot/edit/<id>")
|
||||||
|
def bot_edit(id):
|
||||||
|
return render_template("bot_edit.html")
|
||||||
|
|
Loading…
Reference in a new issue