From c510873e174cd39977e2cf197e387950065798d5 Mon Sep 17 00:00:00 2001 From: Elijah Bodden <106613755+Elijah-Bodden@users.noreply.github.com> Date: Thu, 28 Jul 2022 21:20:53 -0500 Subject: [PATCH] Implement fatalWrapper --- src/source/frontend/dist/static/scripts/UI.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/source/frontend/dist/static/scripts/UI.js b/src/source/frontend/dist/static/scripts/UI.js index 48096dc..7a075f0 100644 --- a/src/source/frontend/dist/static/scripts/UI.js +++ b/src/source/frontend/dist/static/scripts/UI.js @@ -149,6 +149,25 @@ window.onload = function() { } } ); + onPublicError(async (_sig, externalDetail) => { + var blurWrapper = document.createElement("div") + blurWrapper.style.position = "absolute" + blurWrapper.style.left = blurWrapper.style.right = blurWrapper.style.top = blurWrapper.style.bottom = "0px" + blurWrapper.style.width = blurWrapper.style.height = "100%" + blurWrapper.style.border = "0px" + blurWrapper.style.zIndex = 100000 + blurWrapper.style.visibility = "visible" + blurWrapper.style.filter = "blur(3px) saturate(90%) brightness(90%)" + blurWrapper.classList.add("dontBlur") + document.body.appendChild(blurWrapper) + document.querySelectorAll("body > *:not(.fatalWrapper):not(.dontBlur)").forEach((element) => {blurWrapper.appendChild(element)}) + document.addEventListener("click", (event) => { + event.stopImmediatePropagation() + event.preventDefault() + }, true) + document.querySelector(".fatalBody").innerHTML = `