feat: add request id to context and cache-bust static assets with rid query param

This commit is contained in:
2025-04-02 12:55:18 +00:00
parent 7fddff68bc
commit 976f0eeb68
9 changed files with 70 additions and 15 deletions
+11 -4
View File
@@ -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" });
}
}