From febd2874e794ec9d32343bd0fbd780b57199fc0a Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 22 Mar 2023 23:46:13 +0100 Subject: [PATCH] make screen blurred while loading messages --- gui/preload-chat.js | 14 +++++++++++++- gui/src/chat-module.html | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gui/preload-chat.js b/gui/preload-chat.js index 66ee63e4..1a8bdbd2 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -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) { diff --git a/gui/src/chat-module.html b/gui/src/chat-module.html index e9de393f..8e0ea4f7 100644 --- a/gui/src/chat-module.html +++ b/gui/src/chat-module.html @@ -46,6 +46,8 @@ data-source="../node_modules/emoji-picker-element-data/en/emojibase/data.json" > +
+
@@ -708,5 +710,8 @@
+ + +