From e1f992e0524aa24d05e8d9d49d50c050af69d0d2 Mon Sep 17 00:00:00 2001 From: Gregory Wells Date: Wed, 25 Mar 2026 15:16:13 -0400 Subject: [PATCH] dim and block profile page when executing change profile request --- src/pages/profile_page.html | 8 +++++++- static/style.css | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pages/profile_page.html b/src/pages/profile_page.html index d85b8b3..ade1d4c 100644 --- a/src/pages/profile_page.html +++ b/src/pages/profile_page.html @@ -9,6 +9,8 @@ + + logo
@@ -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%; +}