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:
parent
11197eb7e7
commit
34622230b0
4 changed files with 19 additions and 4 deletions
|
@ -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;
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue