Updated dem glow.
This commit is contained in:
parent
f0545cbf02
commit
a0fb214332
@ -13,11 +13,18 @@ class MessageList extends HTMLElement {
|
|||||||
this.updateMessageText(data.uid, data);
|
this.updateMessageText(data.uid, data);
|
||||||
});
|
});
|
||||||
app.ws.addEventListener("set_typing", (data) => {
|
app.ws.addEventListener("set_typing", (data) => {
|
||||||
this.triggerGlow(data.user_uid);
|
this.triggerGlow(data.user_uid,data.color);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.items = [];
|
this.items = [];
|
||||||
}
|
}
|
||||||
|
scrollToBottom(force) {
|
||||||
|
|
||||||
|
// if (force) {
|
||||||
|
// this.scrollTop = this.scrollHeight;
|
||||||
|
this.querySelector(".message-list-bottom").scrollIntoView();
|
||||||
|
// }
|
||||||
|
}
|
||||||
updateMessageText(uid, message) {
|
updateMessageText(uid, message) {
|
||||||
const messageDiv = this.querySelector('div[data-uid="' + uid + '"]');
|
const messageDiv = this.querySelector('div[data-uid="' + uid + '"]');
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ function updateStarColorDelayed(color) {
|
|||||||
}
|
}
|
||||||
app.updateStarColor = updateStarColorDelayed;
|
app.updateStarColor = updateStarColorDelayed;
|
||||||
app.ws.addEventListener("set_typing", (data) => {
|
app.ws.addEventListener("set_typing", (data) => {
|
||||||
updateStarColorDelayed(data.data.color);
|
updateStarColorDelayed(data.color);
|
||||||
});
|
});
|
||||||
window.createAvatar = () => {
|
window.createAvatar = () => {
|
||||||
let avatar = document.createElement("avatar-face")
|
let avatar = document.createElement("avatar-face")
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
{{ message.html }}
|
{{ message.html }}
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class class="message-list-bottom"></div>
|
<div class="message-list-bottom"></div>
|
||||||
</message-list>
|
</message-list>
|
||||||
<chat-input live-type="false" channel="{{ channel.uid.value }}"></chat-input>
|
<chat-input live-type="false" channel="{{ channel.uid.value }}"></chat-input>
|
||||||
</section>
|
</section>
|
||||||
@ -185,9 +185,8 @@
|
|||||||
});
|
});
|
||||||
lastMessage = messagesContainer.querySelector(".message:last-child");
|
lastMessage = messagesContainer.querySelector(".message:last-child");
|
||||||
if (doScrollDown) {
|
if (doScrollDown) {
|
||||||
lastMessage?.scrollIntoView({ block: "end", inline: "nearest" });
|
messagesContainer.scrollToBottom()
|
||||||
|
|
||||||
chatInputField.scrollIntoView({ block: "end", inline: "nearest" });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user