From 55b127747a1d9a072313dc28216d277664199a1c Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Thu, 30 Jul 2026 09:34:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(dnfs):=20=E7=94=A8=E6=88=B7=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E7=94=A8=E6=88=B7=E5=90=8D/=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BA=AF=E5=B1=95=E7=A4=BA=EF=BC=8C=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E6=89=8B=E5=9E=8B=E5=85=89=E6=A0=87=E4=B8=8E=20hover?= =?UTF-8?q?=20=E5=8F=98=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 .tag.no-hover 修饰类还原交互态;折叠按钮与退出登录保持可点样式。 --- static/public/css/theme.css | 9 +++++++++ static/public/js/dnfs.js | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/static/public/css/theme.css b/static/public/css/theme.css index 092dab6..be578fa 100644 --- a/static/public/css/theme.css +++ b/static/public/css/theme.css @@ -420,6 +420,15 @@ input[type="button"]:disabled { } } .minimap:empty, .userpanel:empty { display: none; } +/* userpanel 纯展示项(用户名/角色):不可点击,无手型光标与 hover 变色 */ +.userpanel .tag.no-hover { + cursor: default; +} +.userpanel .tag.no-hover:hover { + color: var(--fg-secondary); + background: rgba(232, 133, 58, 0.08); + border-color: transparent; +} .minimap .tag, .userpanel .tag { display: inline-block; max-width: 140px; diff --git a/static/public/js/dnfs.js b/static/public/js/dnfs.js index d52f8ef..50a2285 100644 --- a/static/public/js/dnfs.js +++ b/static/public/js/dnfs.js @@ -693,12 +693,12 @@ function renderUserPanel() { if (!userpanel_expand || !current_user.login) return; let name_tag = document.createElement("div"); - name_tag.className = "tag"; + name_tag.className = "tag no-hover"; name_tag.textContent = current_user.user; userpanel.appendChild(name_tag); let role_tag = document.createElement("div"); - role_tag.className = "tag"; + role_tag.className = "tag no-hover"; role_tag.textContent = current_user.is_admin ? "管理员" : "普通用户"; userpanel.appendChild(role_tag);