fix: 头像上传后前端不显示真头像 (row29 续)

真因:上传成功且 setUser 写入了 avatar_url,但前端任何头像位置都没渲染 avatar_url,
只显示姓氏首字占位 → 看着像「没更新」。根因:User 类型里压根没暴露 avatar_url 字段。

修:User 类型补 avatar_url;侧栏 .user、账户菜单 .shell-account-head、设置页 av-big
三处头像改为「有 avatar_url 显 <img>,空则回退首字」;.av/.av-big 加 overflow:hidden + img 铺满规则。
后端上传 200 + 直链公读已实测正常,此为纯前端显示修复。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
zyc
2026-06-30 11:02:28 +08:00
co-authored by Claude Opus 4.8
parent b4e61ce627
commit 291a8bf394
4 changed files with 9 additions and 3 deletions
+4
View File
@@ -375,7 +375,9 @@ nav a.disabled:hover { background: transparent; color: var(--black-alpha-32); }
color: var(--accent-white);
display: flex; align-items: center; justify-content: center;
font-weight: 600; font-size: 12px;
overflow: hidden;
}
.user .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user .em { font-size: 13px; color: var(--accent-black); }
body.sidebar-collapsed aside.sidebar { padding: 22px 12px; }
@@ -1948,7 +1950,9 @@ table.t tbody tr:hover { background: var(--black-alpha-4); }
color: var(--accent-white);
font-size: 12px;
font-weight: 600;
overflow: hidden;
}
.shell-account-head .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shell-account-head .nm {
display: block;
font-size: 13px;