docs: update UI_REDESIGN.md and clean up nav buttons
This commit is contained in:
+8
-13
@@ -922,11 +922,10 @@ select.input {
|
|||||||
<nav class="nav" id="topNav">
|
<nav class="nav" id="topNav">
|
||||||
<button data-view="home">首页</button>
|
<button data-view="home">首页</button>
|
||||||
<button data-view="search">搜索</button>
|
<button data-view="search">搜索</button>
|
||||||
<button data-view="queue">下载<span id="navBadge" class="badge">0</span></button>
|
<button data-view="queue">下载<span id="navBadge" style="display:none">0</span></button>
|
||||||
<button data-view="account">账户</button>
|
<button data-view="account">账户</button>
|
||||||
<button id="adminNav" data-view="admin">管理</button>
|
<button id="adminNav" data-view="admin">管理</button>
|
||||||
<button data-view="settings">设置</button>
|
</nav>
|
||||||
</nav>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="authbar">
|
<div class="authbar">
|
||||||
@@ -1065,7 +1064,7 @@ select.input {
|
|||||||
<div>
|
<div>
|
||||||
<div class="eyebrow">Admin Center</div>
|
<div class="eyebrow">Admin Center</div>
|
||||||
<h2>管理控制台</h2>
|
<h2>管理控制台</h2>
|
||||||
<p>系统多用户鉴权、积分流水记账、卡密批次、操作审计与全局纳管配置。</p>
|
<p>系统多用户鉴权、积分流水记账、卡密批次、操作审计与全局设置。</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1084,7 +1083,7 @@ select.input {
|
|||||||
<span>≡</span> 审计日志
|
<span>≡</span> 审计日志
|
||||||
</button>
|
</button>
|
||||||
<button class="admin-tab-btn" data-admin-tab="settings">
|
<button class="admin-tab-btn" data-admin-tab="settings">
|
||||||
<span>⚙️</span> 纳管设置
|
<span>⚙️</span> 全局设置
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1167,11 +1166,11 @@ select.input {
|
|||||||
<div id="audit" class="ledger"></div>
|
<div id="audit" class="ledger"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 5. 纳管系统设置面板(内嵌在管理后台) -->
|
<!-- 5. 全局系统设置面板(内嵌在管理后台) -->
|
||||||
<div class="admin-panel" id="adminSettingsPanel" style="display:none">
|
<div class="admin-panel" id="adminSettingsPanel" style="display:none">
|
||||||
<div class="panel-head">
|
<div class="panel-head">
|
||||||
<div>
|
<div>
|
||||||
<div class="title">系统运行与纳管配置</div>
|
<div class="title">系统全局运行设置</div>
|
||||||
<div class="muted">调整上游解析微服务、全局转存策略与系统级存储。</div>
|
<div class="muted">调整上游解析微服务、全局转存策略与系统级存储。</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1286,7 +1285,7 @@ select.input {
|
|||||||
</button>
|
</button>
|
||||||
<button data-view="queue">
|
<button data-view="queue">
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>
|
||||||
下载 <span id="mobileBadge" class="badge" style="font-size:9px;min-width:14px;height:14px;padding:0 3px">0</span>
|
下载<span id="mobileBadge" style="display:none">0</span>
|
||||||
</button>
|
</button>
|
||||||
<button data-view="account">
|
<button data-view="account">
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||||
@@ -1296,10 +1295,6 @@ select.input {
|
|||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
|
||||||
管理
|
管理
|
||||||
</button>
|
</button>
|
||||||
<button id="mobileSettingsNav" data-view="settings" style="display:none">
|
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
|
|
||||||
设置
|
|
||||||
</button>
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1382,7 +1377,7 @@ async function toggleUser(id,status){const u=adminUsersCache.find(x=>x.id===id);
|
|||||||
async function revokeBatch(id){try{await api('/admin/redeem/'+id+'/revoke',{method:'POST'});loadRedeemAdmin()}catch(e){alert('撤销失败:'+e.message)}}
|
async function revokeBatch(id){try{await api('/admin/redeem/'+id+'/revoke',{method:'POST'});loadRedeemAdmin()}catch(e){alert('撤销失败:'+e.message)}}
|
||||||
|
|
||||||
function hideLogin(){document.getElementById('loginOverlay').style.display='none'}
|
function hideLogin(){document.getElementById('loginOverlay').style.display='none'}
|
||||||
async function initAuth(){try{const x=await api('/auth/me');const u=x.user;window.currentUser=u;window.isAdmin=u.role==='admin';const pill=document.getElementById('userPill');if(pill)pill.textContent=u.username+' · '+u.role;const s=document.getElementById('settings');if(s)s.style.display=u.role==='admin'?'':'none';const an=document.getElementById('adminNav');if(an)an.style.display=u.role==='admin'?'':'none';const mn=document.getElementById('mobileAdminNav');if(mn)mn.style.display=u.role==='admin'?'':'none';const msn=document.getElementById('mobileSettingsNav');if(msn)msn.style.display=u.role==='admin'?'':'none';const ae=document.getElementById('accountAdminEntry');if(ae)ae.style.display=u.role==='admin'?'':'none';document.querySelectorAll('[data-view="settings"]').forEach(x=>x.style.display=u.role==='admin'?'':'none');const c=await api('/credits');if(pill)pill.textContent=u.username+' · '+u.role+' · 积分 '+c.balance+' / 可用 '+c.available;hideLogin();return true}catch(e){console.error('initAuth error:',e);showLogin();return false}}
|
async function initAuth(){try{const x=await api('/auth/me');const u=x.user;window.currentUser=u;window.isAdmin=u.role==='admin';const pill=document.getElementById('userPill');if(pill)pill.textContent=u.username+' · '+u.role;const s=document.getElementById('settings');if(s)s.style.display=u.role==='admin'?'':'none';const an=document.getElementById('adminNav');if(an)an.style.display=u.role==='admin'?'':'none';const mn=document.getElementById('mobileAdminNav');if(mn)mn.style.display=u.role==='admin'?'':'none';const ae=document.getElementById('accountAdminEntry');if(ae)ae.style.display=u.role==='admin'?'':'none';document.querySelectorAll('[data-view="settings"]').forEach(x=>x.style.display=u.role==='admin'?'':'none');const c=await api('/credits');if(pill)pill.textContent=u.username+' · '+u.role+' · 积分 '+c.balance+' / 可用 '+c.available;hideLogin();return true}catch(e){console.error('initAuth error:',e);showLogin();return false}}
|
||||||
document.querySelectorAll('[data-admin-view]').forEach(b=>b.addEventListener('click',()=>showAdminPanel('admin'+b.dataset.adminView.charAt(0).toUpperCase()+b.dataset.adminView.slice(1)+'Panel')));document.querySelectorAll('.admin-back').forEach(b=>b.addEventListener('click',()=>showAdminPanel('adminDashboard')));document.querySelectorAll('[data-role-filter]').forEach(b=>b.addEventListener('click',()=>{document.querySelectorAll('[data-role-filter]').forEach(x=>x.classList.remove('active'));b.classList.add('active');adminRoleFilter=b.dataset.roleFilter;renderAdminUsers()}));
|
document.querySelectorAll('[data-admin-view]').forEach(b=>b.addEventListener('click',()=>showAdminPanel('admin'+b.dataset.adminView.charAt(0).toUpperCase()+b.dataset.adminView.slice(1)+'Panel')));document.querySelectorAll('.admin-back').forEach(b=>b.addEventListener('click',()=>showAdminPanel('adminDashboard')));document.querySelectorAll('[data-role-filter]').forEach(b=>b.addEventListener('click',()=>{document.querySelectorAll('[data-role-filter]').forEach(x=>x.classList.remove('active'));b.classList.add('active');adminRoleFilter=b.dataset.roleFilter;renderAdminUsers()}));
|
||||||
document.querySelectorAll('.admin-tab-btn').forEach(btn => {
|
document.querySelectorAll('.admin-tab-btn').forEach(btn => {
|
||||||
btn.addEventListener('click', () => switchAdminTab(btn.dataset.adminTab));
|
btn.addEventListener('click', () => switchAdminTab(btn.dataset.adminTab));
|
||||||
|
|||||||
Reference in New Issue
Block a user