feat(dnfs): 折叠态用户面板改为圆形头像按钮,点击展开

This commit is contained in:
qing committed 2026-08-12 20:51:44 +08:00
1 parent f1d6e9ceb4
commit 8673515d31
2 files changed
+26 -3

No files matched your search

+23 -1
View File
@@ -575,8 +575,30 @@ input[type="button"]:disabled {
background: var(--accent-soft);
border-color: var(--accent);
}
/* 折叠态用户面板:圆形头像按钮,与 owner-avatar 同风格 */
.userpanel .user-avatar-fold {
display: flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border-radius: 50%;
background: var(--accent-soft);
color: var(--accent-dark);
border: 2px solid var(--accent);
font-size: 0.95rem;
font-weight: 700;
cursor: pointer;
user-select: none;
transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.userpanel .user-avatar-fold:hover {
border-color: var(--accent-dark);
transform: scale(1.08);
box-shadow: 0 0 0 4px var(--accent-glow);
}
/* ===== Special Nodes (dnfs,管理员发布的特殊节点) ===== */
/* ===== Special Nodes (dnfs) ===== */
.sp-link { display: flex; align-items: center; gap: 0.5rem; }
.sp-favicon { width: 20px; height: 20px; flex: none; border-radius: 4px; }
.sp-anchor { color: var(--accent); word-break: break-all; }
+3 -2
View File
@@ -1299,11 +1299,12 @@ function renderUserPanel() {
if (current_user == null) return;
userpanel.replaceChildren();
let fold = document.createElement("div");
fold.className = "tag fold-btn";
if (userpanel_expand) {
fold.className = "tag fold-btn";
fold.textContent = "v 折叠";
} else {
fold.textContent = "> 展开";
fold.className = "user-avatar-fold";
fold.textContent = current_user.login ? (current_user.user || "?").trim().charAt(0).toUpperCase() : "?";
}
fold.addEventListener("click", () => {
userpanel_expand = !userpanel_expand;