diff --git a/webui/static/init.js b/webui/static/init.js index e6ea4816..4da3795f 100644 --- a/webui/static/init.js +++ b/webui/static/init.js @@ -404,6 +404,10 @@ async function initProfileSystem() { function showLoginScreen() { const overlay = document.getElementById('login-overlay'); if (!overlay) return; + // Hide the entire app while locked, so removing the overlay (Safari "Hide + // Distracting Items", devtools) reveals nothing — not even the empty chrome. + // initApp() reveals it again on a successful sign-in (#852). + document.body.classList.add('app-locked'); overlay.style.display = 'flex'; const u = document.getElementById('login-username'); if (u) setTimeout(() => u.focus(), 50); @@ -507,6 +511,8 @@ async function submitRecoveryReset() { function showLaunchPinScreen() { const overlay = document.getElementById('launch-pin-overlay'); if (!overlay) return; + // Hide the whole app while locked — bypassing the overlay reveals nothing (#852). + document.body.classList.add('app-locked'); overlay.style.display = 'flex'; const input = document.getElementById('launch-pin-input'); @@ -2322,6 +2328,10 @@ async function _continueAppInit() { } function initApp() { + // Unlocked / authenticated — reveal the app (the lock screens hide it via + // body.app-locked so a bypassed overlay shows nothing). Do this FIRST so + // component init below measures real layout, not a display:none container. + document.body.classList.remove('app-locked'); // Initialize components initializeNavigation(); initializeMobileNavigation(); diff --git a/webui/static/style.css b/webui/static/style.css index 69f45953..954ff067 100644 --- a/webui/static/style.css +++ b/webui/static/style.css @@ -68177,3 +68177,13 @@ body.em-scroll-lock { overflow: hidden; } .arec-row { grid-template-columns: 1fr; gap: 2px; } .arec-rowcopy { opacity: 1; justify-self: end; margin-top: -22px; } } + + +/* #852: while the launch-PIN / login lock screen is up, hide EVERYTHING in the + body except the lock overlays themselves — so removing the overlay (Safari + "Hide Distracting Items", devtools) reveals a blank page, not the empty chrome + or any of the on-demand modals/sidebars. The hide-element trick can only ADD + hiding, never undo this rule. initApp() drops body.app-locked once authenticated. */ +body.app-locked > *:not(#launch-pin-overlay):not(#login-overlay):not(script):not(style):not(noscript) { + display: none !important; +}