feat: toast notifications, canvas captcha, super admin, mobile fixes

- Toast system (ToastProvider + useToast): right-top colored toasts
  replace alert for publish success/error; CSS + layout mount
- Captcha as canvas image (noise + distortion) in NewPost/ReplyList/
  register modal — blocks bots, click to refresh
- Super admin: first registered user cannot be demoted (isFirstUser by
  created_at, DB-agnostic)
- Admins can delete others' posts/replies (UI buttons shown for admin)
- Mobile: post-actions wrap + compact, feed excerpt 2.5 lines
- Fix: missing sun icon in Icons (dark mode toggle showed nothing)
- Feed long posts: gradient fade mask instead of line-clamp
This commit is contained in:
lezi-fun committed 2026-08-10 21:54:28 +08:00
1 parent e860978aef
commit b2368f68df
12 files changed
+262 -31

No files matched your search

+5 -2
View File
@@ -1,6 +1,7 @@
// 全局布局
import './globals.css';
import CustomCssLoader from '@/components/CustomCssLoader';
import { ToastProvider } from '@/components/Toast';
export const metadata = {
// 初始标题由客户端 AppProvider 接管(加载时轮换 Loading.,完成后显示论坛名)
@@ -28,8 +29,10 @@ export default function RootLayout({ children }) {
/>
</head>
<body>
<CustomCssLoader />
{children}
<ToastProvider>
<CustomCssLoader />
{children}
</ToastProvider>
</body>
</html>
);