make screen blurred while loading messages

This commit is contained in:
DJ2LS 2023-03-22 23:46:13 +01:00
parent 1f7cab31a6
commit febd2874e7
2 changed files with 18 additions and 1 deletions

View file

@ -1875,6 +1875,12 @@ async function updateAllChat(clear) {
})
.then(async function (result) {
// handle result async
//document.getElementById("blurOverlay").classList.add("bg-primary");
document.getElementById("blurOverlay").style.webkitFilter = "blur(10px)";
if (typeof result !== "undefined") {
for (const item of result.docs) {
//await otherwise history will not be in chronological order
@ -1887,9 +1893,15 @@ async function updateAllChat(clear) {
});
}
}
})
document.getElementById("blurOverlay").style.webkitFilter = "blur(0px)";
}
)
.catch(function (err) {
console.log(err);
document.getElementById("blurOverlay").style.webkitFilter = "blur(0px)";
});
})
.catch(function (err) {

View file

@ -46,6 +46,8 @@
data-source="../node_modules/emoji-picker-element-data/en/emojibase/data.json"
></emoji-picker>
</div>
<div id="blurOverlay" style="-webkit-filter: blur(0px); filter: blur(10px)">
<div class="container-fluid">
<div class="row h-100">
<div class="col-4 p-2">
@ -708,5 +710,8 @@
</div>
</div>
</div>
</div>
</body>
</html>