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
加载中...
; + return
加载中...
; } const srcdoc = ` diff --git a/components/Feed.js b/components/Feed.js index 0d6c22a..26beea9 100644 --- a/components/Feed.js +++ b/components/Feed.js @@ -85,7 +85,7 @@ export default function Feed({ onOpenModal, onReport }) {
{posts === null ? ( -
加载中...
+
加载中...
) : error ? (
加载失败:{error}
) : posts.length === 0 ? ( diff --git a/components/UserProfile.js b/components/UserProfile.js index 6499471..2882135 100644 --- a/components/UserProfile.js +++ b/components/UserProfile.js @@ -45,7 +45,7 @@ export default function UserProfile({ username }) { ); } if (!user) { - return
加载中...
; + return
加载中...
; } return ( @@ -55,7 +55,7 @@ export default function UserProfile({ username }) {
- +

{user.username}

{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() {
{pages === null ? ( -
加载中...
+
加载中...
) : pages.length === 0 ? (
暂无自定义页面
) : ( diff --git a/components/admin/AdminLogs.js b/components/admin/AdminLogs.js index 2f0dbff..62987b1 100644 --- a/components/admin/AdminLogs.js +++ b/components/admin/AdminLogs.js @@ -17,7 +17,7 @@ export default function AdminLogs() { useEffect(load, []); if (error) return
加载失败:{error}
; - if (!logs) return
加载中...
; + if (!logs) return
加载中...
; if (logs.length === 0) return
暂无日志
; return ( diff --git a/components/admin/AdminReports.js b/components/admin/AdminReports.js index f03dead..1512dad 100644 --- a/components/admin/AdminReports.js +++ b/components/admin/AdminReports.js @@ -35,7 +35,7 @@ export default function AdminReports() { }; if (error) return
加载失败:{error}
; - if (!reports) return
加载中...
; + if (!reports) return
加载中...
; if (reports.length === 0) return
✅ 暂无举报
; return reports.map((r) => ( diff --git a/components/admin/AdminUsers.js b/components/admin/AdminUsers.js index 95fcc3a..57c4715 100644 --- a/components/admin/AdminUsers.js +++ b/components/admin/AdminUsers.js @@ -30,7 +30,7 @@ export default function AdminUsers() { }; if (error) return
加载失败:{error}
; - if (!users) return
加载中...
; + if (!users) return
加载中...
; return ( <> diff --git a/components/chat/ChatWindow.js b/components/chat/ChatWindow.js index 91f838f..1d7f4ee 100644 --- a/components/chat/ChatWindow.js +++ b/components/chat/ChatWindow.js @@ -60,7 +60,7 @@ export default function ChatWindow({ conversationId, otherUserId, otherUsername,
{messages === null ? ( -
加载中...
+
加载中...
) : messages.length === 0 ? (
还没有消息,打个招呼吧 👋
) : ( diff --git a/components/chat/ConversationList.js b/components/chat/ConversationList.js index 97673e1..1bb97ec 100644 --- a/components/chat/ConversationList.js +++ b/components/chat/ConversationList.js @@ -29,7 +29,7 @@ export default function ConversationList({ onOpenChat, onClose }) {
{conversations === null ? ( -
加载中...
+
加载中...
) : conversations.length === 0 ? (
暂无私信
) : (