From 1dbcb89fbd8c28fcaefad8ccd1d510964b0cfaee Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Tue, 11 Aug 2026 10:23:33 +0800 Subject: [PATCH] fix: user profile avatar + loading spinners + modal opacity - UserProfile now uses avatar_url (was always default ui-avatars) - Loading states show spinner-sm spinner instead of plain text (Feed, UserProfile, chat, admin panels, custom pages) - Modal background: semi-transparent glass (0.85 light / 0.88 dark) --- app/globals.css | 21 ++++++++++++++++++++- components/CustomPage.js | 2 +- components/Feed.js | 2 +- components/UserProfile.js | 4 ++-- components/admin/AdminCustomPages.js | 2 +- components/admin/AdminLogs.js | 2 +- components/admin/AdminReports.js | 2 +- components/admin/AdminUsers.js | 2 +- components/chat/ChatWindow.js | 2 +- components/chat/ConversationList.js | 2 +- 10 files changed, 30 insertions(+), 11 deletions(-) diff --git a/app/globals.css b/app/globals.css index cfc7cb4..404782e 100644 --- a/app/globals.css +++ b/app/globals.css @@ -32,6 +32,7 @@ /* ===== 兼容旧变量(React 组件内联样式使用)===== */ --bg: #dfe6e9; + --modal-bg: rgba(255, 255, 255, 0.85); /* 弹窗背景:半透明玻璃感但保证可读性 */ --surface: rgba(255, 255, 255, 0.18); --border: rgba(255, 255, 255, 0.30); --border-light: rgba(255, 255, 255, 0.12); @@ -72,6 +73,7 @@ /* ===== 兼容旧变量(React 组件内联样式使用)===== */ --bg: #0f0f1a; + --modal-bg: rgba(24, 24, 38, 0.88); /* 弹窗背景:半透明玻璃感但保证可读性 */ --surface: rgba(30, 30, 50, 0.35); --border: rgba(255, 255, 255, 0.10); --border-light: rgba(255, 255, 255, 0.06); @@ -622,7 +624,7 @@ svg { } } .modal-content { - background: var(--glass-bg); + background: var(--modal-bg, var(--glass-bg)); backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px); border: 1px solid var(--glass-border); @@ -2286,3 +2288,20 @@ a.btn-secondary { color: var(--glass-text) !important; border-color: var(--glass-border) !important; } + +/* ===== 小转圈(列表/局部加载) ===== */ +.spinner-sm { + display: inline-block; + width: 18px; + height: 18px; + border: 2px solid var(--glass-border); + border-top-color: var(--primary); + border-radius: 50%; + animation: spin 0.8s linear infinite; + vertical-align: -3px; + margin-right: 8px; +} + +@keyframes spin { + to { transform: rotate(360deg); } +} diff --git a/components/CustomPage.js b/components/CustomPage.js index 1114a84..48af9f0 100644 --- a/components/CustomPage.js +++ b/components/CustomPage.js @@ -24,7 +24,7 @@ export default function CustomPage({ pageName }) { ); } if (html === null) { - return
{user.bio || '这个人很懒,什么都没写'}
{currentUser && currentUser.id !== user.id && ( diff --git a/components/admin/AdminCustomPages.js b/components/admin/AdminCustomPages.js index 79a3a17..19b629f 100644 --- a/components/admin/AdminCustomPages.js +++ b/components/admin/AdminCustomPages.js @@ -38,7 +38,7 @@ export default function AdminCustomPages() {