fix(dnfs): 用户面板用户名/角色改为纯展示,去除手型光标与 hover 变色

新增 .tag.no-hover 修饰类还原交互态;折叠按钮与退出登录保持可点样式。
This commit is contained in:
qing committed 2026-07-30 09:34:53 +08:00
1 parent 8c1956cdeb
commit 55b127747a
2 files changed
+11 -2

No files matched your search

+9
View File
@@ -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;
+2 -2
View File
@@ -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);