@@ -99,6 +101,8 @@
var currentPreviewURL = null;
fileInput.addEventListener("change", async () => {
+ document.getElementById("popup_background").classList.remove("hidden");
+
const file = fileInput.files[0];
if (!file) return;
if (file.type !== "image/jpeg") {
@@ -118,7 +122,9 @@
credentials: "include",
});
const text = await res.text();
- // show the picture (so we don't need to re render the whole page)
+
+ document.getElementById("popup_background").classList.add("hidden");
+
const img = document.querySelector(".profile-pic");
if (currentPreviewURL != null) {
diff --git a/static/style.css b/static/style.css
index 13a877a..f3151e6 100644
--- a/static/style.css
+++ b/static/style.css
@@ -27,3 +27,15 @@ body {
.hidden {
display: none;
}
+
+.blocked {
+ position: fixed; /* or absolute */
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 9999; /* higher = on top */
+
+ background-color: black;
+ opacity: 10%;
+}