Updated dem glow.

This commit is contained in:
retoor 2025-05-23 01:17:34 +02:00
parent f0545cbf02
commit a0fb214332
3 changed files with 12 additions and 6 deletions

View File

@ -13,11 +13,18 @@ class MessageList extends HTMLElement {
this.updateMessageText(data.uid, data);
});
app.ws.addEventListener("set_typing", (data) => {
this.triggerGlow(data.user_uid);
this.triggerGlow(data.user_uid,data.color);
});
this.items = [];
}
scrollToBottom(force) {
// if (force) {
// this.scrollTop = this.scrollHeight;
this.querySelector(".message-list-bottom").scrollIntoView();
// }
}
updateMessageText(uid, message) {
const messageDiv = this.querySelector('div[data-uid="' + uid + '"]');

View File

@ -126,7 +126,7 @@ function updateStarColorDelayed(color) {
}
app.updateStarColor = updateStarColorDelayed;
app.ws.addEventListener("set_typing", (data) => {
updateStarColorDelayed(data.data.color);
updateStarColorDelayed(data.color);
});
window.createAvatar = () => {
let avatar = document.createElement("avatar-face")

View File

@ -11,7 +11,7 @@
{{ message.html }}
{% endautoescape %}
{% endfor %}
<div class class="message-list-bottom"></div>
<div class="message-list-bottom"></div>
</message-list>
<chat-input live-type="false" channel="{{ channel.uid.value }}"></chat-input>
</section>
@ -185,9 +185,8 @@
});
lastMessage = messagesContainer.querySelector(".message:last-child");
if (doScrollDown) {
lastMessage?.scrollIntoView({ block: "end", inline: "nearest" });
chatInputField.scrollIntoView({ block: "end", inline: "nearest" });
messagesContainer.scrollToBottom()
}
}