Spaces:
Paused
Paused
fix: admin page not showing after login — display:none CSS override bug
Browse filesThe #app div had display:none in CSS. show('app') cleared inline style,
reverting to CSS display:none. Fixed by using inline style for initial
hide and passing explicit display values to all show() calls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
outlook2api/static/admin.html
CHANGED
|
@@ -69,7 +69,7 @@ button{font-family:inherit;cursor:pointer;border:none;background:none;font-size:
|
|
| 69 |
.login-box .btn{width:100%;justify-content:center;padding:.65rem}
|
| 70 |
|
| 71 |
/* ---- Layout ---- */
|
| 72 |
-
#app{
|
| 73 |
.lay{display:flex;min-height:100vh}
|
| 74 |
.side{width:240px;background:var(--surface);border-right:1px solid var(--border);padding:1.2rem 0;display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;z-index:100;transition:transform .25s}
|
| 75 |
.side-brand{padding:0 1.4rem;font-size:1.15rem;font-weight:700;color:var(--brand);border-bottom:1px solid var(--border);margin-bottom:.6rem;padding-bottom:1.1rem;display:flex;align-items:center;gap:.5rem}
|
|
@@ -211,7 +211,7 @@ pre{background:var(--bg);border:1px solid var(--border);border-radius:8px;paddin
|
|
| 211 |
</div>
|
| 212 |
|
| 213 |
<!-- ===== APP ===== -->
|
| 214 |
-
<div id="app">
|
| 215 |
<button class="menu-btn" id="menuBtn"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12h18M3 6h18M3 18h18"/></svg></button>
|
| 216 |
<div class="ov" id="ov"></div>
|
| 217 |
<div class="lay">
|
|
@@ -429,7 +429,7 @@ function tk(){return getCk('admin_token')||''}
|
|
| 429 |
function esc(s){var d=document.createElement('div');d.textContent=s;return d.innerHTML}
|
| 430 |
function fmtD(s){if(!s)return'--';try{return new Date(s).toLocaleDateString()}catch(e){return s}}
|
| 431 |
|
| 432 |
-
function show(id,disp){var el=typeof id==='string'?$(id):id;if(el)el.style.display=disp||''}
|
| 433 |
function hide(id){var el=typeof id==='string'?$(id):id;if(el)el.style.display='none'}
|
| 434 |
|
| 435 |
function toast(msg,err){
|
|
@@ -487,7 +487,7 @@ var curFolder='INBOX';
|
|
| 487 |
|
| 488 |
/* ========== AUTH ========== */
|
| 489 |
function checkAuth(){
|
| 490 |
-
if(tk()){hide('login');show('app');loadTab(curTab)}
|
| 491 |
else{show('login','flex');hide('app')}
|
| 492 |
}
|
| 493 |
|
|
@@ -527,7 +527,7 @@ $('ov').onclick=function(){$('side').classList.remove('open');$('ov').classList.
|
|
| 527 |
var tabs=['dash','acct','imp','mail','docs'];
|
| 528 |
function loadTab(t){
|
| 529 |
tabs.forEach(function(id){hide('t-'+id)});
|
| 530 |
-
show('t-'+t);
|
| 531 |
if(t==='dash')loadDash();
|
| 532 |
if(t==='acct'){page=1;loadAccts()}
|
| 533 |
if(t==='mail')loadMbAccts();
|
|
|
|
| 69 |
.login-box .btn{width:100%;justify-content:center;padding:.65rem}
|
| 70 |
|
| 71 |
/* ---- Layout ---- */
|
| 72 |
+
#app{min-height:100vh}
|
| 73 |
.lay{display:flex;min-height:100vh}
|
| 74 |
.side{width:240px;background:var(--surface);border-right:1px solid var(--border);padding:1.2rem 0;display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;z-index:100;transition:transform .25s}
|
| 75 |
.side-brand{padding:0 1.4rem;font-size:1.15rem;font-weight:700;color:var(--brand);border-bottom:1px solid var(--border);margin-bottom:.6rem;padding-bottom:1.1rem;display:flex;align-items:center;gap:.5rem}
|
|
|
|
| 211 |
</div>
|
| 212 |
|
| 213 |
<!-- ===== APP ===== -->
|
| 214 |
+
<div id="app" style="display:none">
|
| 215 |
<button class="menu-btn" id="menuBtn"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12h18M3 6h18M3 18h18"/></svg></button>
|
| 216 |
<div class="ov" id="ov"></div>
|
| 217 |
<div class="lay">
|
|
|
|
| 429 |
function esc(s){var d=document.createElement('div');d.textContent=s;return d.innerHTML}
|
| 430 |
function fmtD(s){if(!s)return'--';try{return new Date(s).toLocaleDateString()}catch(e){return s}}
|
| 431 |
|
| 432 |
+
function show(id,disp){var el=typeof id==='string'?$(id):id;if(el)el.style.display=disp||'block'}
|
| 433 |
function hide(id){var el=typeof id==='string'?$(id):id;if(el)el.style.display='none'}
|
| 434 |
|
| 435 |
function toast(msg,err){
|
|
|
|
| 487 |
|
| 488 |
/* ========== AUTH ========== */
|
| 489 |
function checkAuth(){
|
| 490 |
+
if(tk()){hide('login');show('app','block');loadTab(curTab)}
|
| 491 |
else{show('login','flex');hide('app')}
|
| 492 |
}
|
| 493 |
|
|
|
|
| 527 |
var tabs=['dash','acct','imp','mail','docs'];
|
| 528 |
function loadTab(t){
|
| 529 |
tabs.forEach(function(id){hide('t-'+id)});
|
| 530 |
+
show('t-'+t,'block');
|
| 531 |
if(t==='dash')loadDash();
|
| 532 |
if(t==='acct'){page=1;loadAccts()}
|
| 533 |
if(t==='mail')loadMbAccts();
|