1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

allow sending messages in bot chat

This commit is contained in:
Lynne Megido 2020-01-20 12:43:25 +10:00
parent 11197eb7e7
commit 34622230b0
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90
4 changed files with 19 additions and 4 deletions

View file

@ -221,11 +221,19 @@ form .row {
#chatbox-input, #chatbox-input input{ #chatbox-input, #chatbox-input input{
width: 100%; width: 100%;
} }
#chatbox, #chatbox-input {
max-width: 600px;
margin: 0 auto;
}
#chatbox-input {
display: block;
}
.message { .message {
display: inline-block; display: inline-block;
padding: 5px; padding: 5px;
min-height: 30px; min-height: 30px;
max-width: 60%; max-width: 60%;
margin-bottom: 5px;
} }
.message-container.user { .message-container.user {
text-align: right; text-align: right;

View file

@ -4,6 +4,12 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>FediBooks</title> <title>FediBooks</title>
{% include 'imports.html' %} {% include 'imports.html' %}
<script>
window.onload = function() {
document.getElementById("chatbox-input-box").focus();
document.getElementById("chatbox-input").onsubmit = sendMessage;
}
</script>
</head> </head>
<body> <body>
@ -33,7 +39,7 @@
</div> </div>
<form id="chatbox-input"> <form id="chatbox-input">
<input name="message" placeholder="Press enter to send"> <input id="chatbox-input-box" name="message" placeholder="Press enter to send">
</form> </form>
</div> </div>

View file

@ -2,3 +2,4 @@
<link rel="stylesheet" href="https://kit-free.fontawesome.com/releases/latest/css/free.min.css"> <link rel="stylesheet" href="https://kit-free.fontawesome.com/releases/latest/css/free.min.css">
<link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='style.css') }}" /> <link rel='stylesheet' type='text/css' href="{{ url_for('static', filename='style.css') }}" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,700&display=swap">
<script src="{{ url_for('static', filename='script.js') }}"></script>

View file

@ -159,8 +159,8 @@ def bot_toggle(id):
@app.route("/bot/chat/<id>") @app.route("/bot/chat/<id>")
def bot_chat(id): def bot_chat(id):
return render_template("coming_soon.html") # return render_template("coming_soon.html")
# return render_template("/bot/chat.html", bot = id) return render_template("/bot/chat.html", bot = id)
@app.route("/bot/blacklist/<id>") @app.route("/bot/blacklist/<id>")
def bot_blacklist(id): def bot_blacklist(id):