From 8673515d319ccc4f3d67bd1680d7f3ec0633200b Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 12 Aug 2026 20:51:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(dnfs):=20=E6=8A=98=E5=8F=A0=E6=80=81?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=9D=A2=E6=9D=BF=E6=94=B9=E4=B8=BA=E5=9C=86?= =?UTF-8?q?=E5=BD=A2=E5=A4=B4=E5=83=8F=E6=8C=89=E9=92=AE=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fsys/public/css/theme.css | 24 +++++++++++++++++++++++- fsys/public/js/dnfs.js | 5 +++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/fsys/public/css/theme.css b/fsys/public/css/theme.css index 6b65a3f..6736a5e 100644 --- a/fsys/public/css/theme.css +++ b/fsys/public/css/theme.css @@ -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; } diff --git a/fsys/public/js/dnfs.js b/fsys/public/js/dnfs.js index 40996c0..7337278 100644 --- a/fsys/public/js/dnfs.js +++ b/fsys/public/js/dnfs.js @@ -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;