Merge branch 'master' into feature/router-0.10

This commit is contained in:
Jean-Baptiste Pasquier 2020-10-21 17:29:00 +02:00
commit eb7ab82e2d
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,55 @@
document.addEventListener("DOMContentLoaded", () => {
const resizeChat = () => {
let chatBox = Array.from(document.querySelectorAll("solid-xmpp-chat"))
.map((el) => el.shadowRoot ? el.shadowRoot.getElementById("conversejs") : false)
.filter((el) => el)
.pop();
if (chatBox) {
let chatTextArea = chatBox.querySelector(".message-form-container");
let ischatTextArea = setInterval(() => {
chatTextArea = chatBox.querySelector(".message-form-container");
if (chatTextArea) {
clearInterval(ischatTextArea);
if (
chatBox.getBoundingClientRect().height -
chatTextArea.getBoundingClientRect().height !=
chatTextArea.offsetTop
) {
let viewportChat = Array.from(
document.querySelectorAll("#viewport .chat-view")
);
viewportChat.forEach(
(c) => (c.style.height = "calc(100vh - 106px - 57px - 4px)")
);
}
}
}, 15);
}
};
resizeChat();
let isbody = setInterval(() => {
if (document.body) {
clearInterval(isbody);
resizeChat();
}
}, 15);
window.addEventListener("load", () => {
setTimeout(() => {
resizeChat();
}, 0);
});
window.addEventListener("resize", () => {
setTimeout(() => {
resizeChat();
}, 0);
});
document.addEventListener("navigate", () => {
setTimeout(() => {
resizeChat();
}, 0);
});
});

View File

@ -49,6 +49,9 @@
text-align: center;
vertical-align: middle;
}
solid-multiple[name="user.communities"] {
text-align: left;
}
}
}