From 6d14860b9c9e47e82b47471d82ac63ea81ae727a Mon Sep 17 00:00:00 2001 From: nxxy335 Date: Tue, 8 Sep 2026 19:14:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9C=8B=E6=9D=BF=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=94=B9=E7=9C=9F=E5=AE=9E=E9=93=BE=E6=8E=A5(=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=BC=B9=E7=AA=97=E6=8B=A6=E6=88=AA)=20+=20=E5=85=A8?= =?UTF-8?q?=E5=B1=80UI=E7=BE=8E=E5=8C=96=E4=B8=8E=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/app.js | 1 - assets/style.css | 56 ++++++++++++++++++++++++++++++++++-------------- index.php | 2 +- 3 files changed, 41 insertions(+), 18 deletions(-) diff --git a/assets/app.js b/assets/app.js index dc0e8f2..f5af05d 100644 --- a/assets/app.js +++ b/assets/app.js @@ -700,7 +700,6 @@ $('#lgLogin').addEventListener('click', loginEnter); $('#lgPwd').addEventListener('keydown', e => { if (e.key === 'Enter') loginTest(); }); $('#btnLogout').addEventListener('click', logout); - $('#btnDashboard').addEventListener('click', () => window.open('dashboard.php', '_blank')); // 启动:本会话已认证(未重启电脑)则直接进入主界面,跳过登录门;否则显示登录门 let authed = false; diff --git a/assets/style.css b/assets/style.css index 614327e..75565ca 100644 --- a/assets/style.css +++ b/assets/style.css @@ -31,6 +31,13 @@ html, body { -webkit-font-smoothing: antialiased; } +/* 顶部柔和渐变,增强页面层次 */ +body { + background-image: linear-gradient(180deg, rgba(47, 107, 255, .06), rgba(47, 107, 255, 0) 300px); + background-repeat: no-repeat; + background-attachment: fixed; +} + /* ---------- 顶栏 ---------- */ .topbar { position: sticky; @@ -115,20 +122,27 @@ html, body { background: var(--primary-weak); color: var(--primary); border-radius: 999px; font-size: 11px; } +/* 链接当按钮用(如「数据看板」):继承按钮外观,避免被浏览器弹窗拦截 */ +a.btn { + display: inline-flex; align-items: center; justify-content: center; + text-decoration: none; white-space: nowrap; +} +a.btn:hover { text-decoration: none; } /* ---------- 布局 ---------- */ -.wrap { max-width: 1440px; margin: 0 auto; padding: 20px 24px 48px; } +.wrap { max-width: 1460px; margin: 0 auto; padding: 22px 26px 52px; } .toolbar { - display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; - background: var(--panel); border: 1px solid var(--border); - border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); + display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 18px; + background: linear-gradient(180deg, #ffffff, #fbfcff); + border: 1px solid var(--border); + border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); } -.field { display: flex; flex-direction: column; gap: 6px; } -.field.grow { flex: 1 1 260px; min-width: 220px; } -.field.grow-2 { flex: 1 1 200px; min-width: 180px; } +.field { display: flex; flex-direction: column; gap: 7px; min-width: 150px; } +.field.grow { flex: 1 1 280px; min-width: 220px; } +.field.grow-2 { flex: 1 1 210px; min-width: 180px; } .field.btns { flex-direction: row; gap: 8px; align-items: center; } -.field label { font-size: 12px; color: var(--text-2); font-weight: 600; } +.field label { font-size: 12px; color: var(--text-2); font-weight: 600; letter-spacing: .3px; } .inline { display: flex; align-items: center; gap: 10px; } select, input[type=text], input[type=number], input[type=password] { @@ -194,16 +208,24 @@ select:focus, input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px /* ---------- 面板 ---------- */ .panel { - margin-top: 16px; background: var(--panel); + margin-top: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; } .panel-head { display: flex; align-items: center; justify-content: space-between; - padding: 12px 16px; border-bottom: 1px solid var(--border-2); + padding: 13px 18px; border-bottom: 1px solid var(--border-2); + background: linear-gradient(180deg, #ffffff, #fbfcfe); } -.panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; } -.panel-head h2 small { font-weight: 500; color: var(--text-3); font-size: 12px; margin-left: 8px; } +.panel-head h2 { + margin: 0; font-size: 15px; font-weight: 700; + display: flex; align-items: center; gap: 9px; +} +.panel-head h2::before { + content: ''; flex: none; width: 4px; height: 16px; border-radius: 3px; + background: linear-gradient(180deg, var(--primary), #6a4bff); +} +.panel-head h2 small { font-weight: 500; color: var(--text-3); font-size: 12px; margin-left: 0; } .updated { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; } .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd3e2; display: inline-block; } .dot.on { background: var(--ok); animation: pulse 1.6s infinite; } @@ -220,16 +242,18 @@ select:focus, input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px table.grid { width: 100%; border-collapse: collapse; font-size: 13px; } table.grid th { position: sticky; top: 0; z-index: 2; - background: #fafbfe; color: var(--text-2); + background: linear-gradient(180deg, #fbfcfe, #f4f7fc); color: var(--text-2); text-align: left; font-weight: 600; font-size: 12px; - padding: 10px 14px; border-bottom: 1px solid var(--border); + padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; + box-shadow: inset 0 -1px 0 var(--border); } table.grid th.sortable { cursor: pointer; user-select: none; } table.grid th.sortable:hover { color: var(--primary); } table.grid th .arrow { color: var(--primary); margin-left: 3px; } -table.grid td { padding: 9px 14px; border-bottom: 1px solid var(--border-2); } -table.grid tbody tr:hover td { background: #fafbfe; } +table.grid td { padding: 10px 14px; border-bottom: 1px solid var(--border-2); } +table.grid tbody tr:nth-child(even) td { background: #fbfcff; } +table.grid tbody tr:hover td { background: var(--primary-weak); } table.grid.compact td, table.grid.compact th { padding: 7px 12px; } td.empty { text-align: center; color: var(--text-3); padding: 32px 0; } td.num { font-variant-numeric: tabular-nums; white-space: nowrap; } diff --git a/index.php b/index.php index 1cf8c2c..fbf5587 100644 --- a/index.php +++ b/index.php @@ -25,7 +25,7 @@ $rosterCount = Roster::count();
未连接
- + 📊 数据看板