修复: 详情弹窗内联display:flex覆盖.hidden导致未登录即显示(移入CSS并用#detailModal.hidden覆盖); 未登录隐藏退出按钮
This commit is contained in:
+5
-3
@@ -50,13 +50,15 @@ tr:hover td{background:#f8fafc;cursor:pointer}
|
||||
.bars .lbl{font-size:11px;color:var(--sub)}
|
||||
.hidden{display:none}
|
||||
#toast{position:fixed;top:60px;left:50%;transform:translateX(-50%);background:#1e293b;color:#fff;padding:8px 18px;border-radius:8px;z-index:9;opacity:.95}
|
||||
#detailModal{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:8;display:flex;align-items:center;justify-content:center}
|
||||
#detailModal.hidden{display:none}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="topbar">
|
||||
<b>📋 招聘数据后台</b><span id="whoami" style="color:#94a3b8;font-size:12px"></span>
|
||||
<span class="sp"></span>
|
||||
<button onclick="logout()">退出登录</button>
|
||||
<button id="logoutBtn" class="hidden" onclick="logout()">退出登录</button>
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<div id="loginBox">
|
||||
@@ -108,7 +110,7 @@ tr:hover td{background:#f8fafc;cursor:pointer}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="detailModal" onclick="if(event.target===this)this.classList.add('hidden')" style="position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:8;display:flex;align-items:center;justify-content:center" class="hidden">
|
||||
<div id="detailModal" onclick="if(event.target===this)this.classList.add('hidden')" class="hidden">
|
||||
<div class="panel detail" style="width:820px;max-width:94vw;max-height:88vh;overflow:auto" id="detailBody"></div>
|
||||
</div>
|
||||
<script>
|
||||
@@ -139,7 +141,7 @@ async function doLoginOrInit(){
|
||||
}
|
||||
async function logout(){await api('/api/logout',{method:'POST'});location.reload()}
|
||||
async function enter(m){
|
||||
me=m;$('loginBox').classList.add('hidden');$('main').classList.remove('hidden');
|
||||
me=m;$('loginBox').classList.add('hidden');$('main').classList.remove('hidden');$('logoutBtn').classList.remove('hidden');
|
||||
$('whoami').textContent=`${m.username} · ${m.role==='super'?'超管':'HR'}`;
|
||||
if(m.role==='super'){$('userPanel').classList.remove('hidden');loadUsers()}
|
||||
loadStats();loadList(1);
|
||||
|
||||
Reference in New Issue
Block a user