fix: no-render
This commit is contained in:
parent
f8624a06e8
commit
63e64b0ed6
@ -24,7 +24,7 @@ html(lang="en")
|
|||||||
nav#main__menu.left-menu.jsLeftMenu
|
nav#main__menu.left-menu.jsLeftMenu
|
||||||
include menu-left.pug
|
include menu-left.pug
|
||||||
|
|
||||||
main#viewport.content.notLoggedIn(no-render)
|
main#viewport.content.notLoggedIn
|
||||||
|
|
||||||
if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
|
if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
|
||||||
#dashboard(hidden, data-view="dashboard").no-sidebar.with-padding
|
#dashboard(hidden, data-view="dashboard").no-sidebar.with-padding
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
const resizeChat = () => {
|
const resizeChat = () => {
|
||||||
let isMobile = window.innerHeight < 993;
|
let isMobile = window.innerWidth < 993;
|
||||||
|
let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
||||||
|
let isFirefoxMobile = navigator.platform.toLowerCase().indexOf("mobile") > -1 || navigator.platform.toLowerCase().indexOf("tablet") > -1;
|
||||||
let chatBox = Array.from(document.querySelectorAll("solid-xmpp-chat"))
|
let chatBox = Array.from(document.querySelectorAll("solid-xmpp-chat"))
|
||||||
.map((el) => el.shadowRoot ? el.shadowRoot.getElementById("conversejs") : false)
|
.map((el) => el.shadowRoot ? el.shadowRoot.getElementById("conversejs") : false)
|
||||||
.filter((el) => el)
|
.filter((el) => el)
|
||||||
@ -19,10 +21,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
let viewportChat = Array.from(
|
let viewportChat = Array.from(
|
||||||
document.querySelectorAll("#viewport .chat-view")
|
document.querySelectorAll("#viewport .chat-view")
|
||||||
);
|
);
|
||||||
let headerOffset = document.querySelector('#header').offsetHeight;
|
|
||||||
let intermediateOffset = Array.from(document.querySelectorAll(".content-box__header")).filter(el=>el.offsetParent!==null?el:null)[0].offsetHeight;
|
|
||||||
viewportChat.forEach(
|
viewportChat.forEach(
|
||||||
(c) => (c.style.height = isMobile ? "calc(100vh - "+String(headerOffset+intermediateOffset)+"px - 57px)" : "calc(100vh - "+String(headerOffset+intermediateOffset)+"px)")
|
(c) => (c.style.height = isMobile ? (isFirefox && isFirefoxMobile) ? "calc(100vh - 106px - 57px)" : "calc(100vh - 106px)" : "calc(100vh - 64px - 83px)")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user