forked from retoor/snek
feat: add request id to context and cache-bust static assets with rid query param
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
{% extends "app.html" %}
|
||||
|
||||
{% block header_text %}<h2>{{ name }}</h2>{% endblock %}
|
||||
{% block header_text %}<h2 style="color:#fff">{{ name }}</h2>{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<section class="chat-area" id="chat">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="chat-area">
|
||||
<div class="chat-messages">
|
||||
{% for message in messages %}
|
||||
{% autoescape false %}
|
||||
@@ -11,10 +16,10 @@
|
||||
{% endautoescape %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<footer class="chat-input">
|
||||
<div class="chat-input">
|
||||
<textarea placeholder="Type a message..." rows="2"></textarea>
|
||||
<upload-button channel="{{ channel.uid.value }}"></upload-button>
|
||||
</footer>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script type="module">
|
||||
@@ -137,6 +142,8 @@
|
||||
lastMessage = messagesContainer.querySelector(".message:last-child");
|
||||
if (doScrollDown) {
|
||||
lastMessage?.scrollIntoView({ block: "end", inline: "nearest" });
|
||||
const inputBox = document.querySelector(".chat-input");
|
||||
inputBox.scrollIntoView({ block: "end", inline: "nearest" });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user