Commit Graph
12 Commits
Author SHA1 Message Date

2026-08-10

lezi-fun c171efc1ec fix: dropdown menu not opening on avatar click
React synthetic event stopPropagation doesn't stop native document
listeners (React 17+ attaches to root, document listener is separate).
The document click handler was closing the menu right after avatar
opened it. Now it checks if the click target is inside the dropdown
or on the avatar and skips closing.
2026-08-10 14:38:30 +08:00
lezi-fun 2a508d1b21 fix: post detail client error (hooks order), image viewer, messages vs DM split
- Fix critical bug: useState declared after conditional return in PostDetail
  caused 'Rendered more hooks than during previous render' client error
- Add image viewer (click post image to zoom, matching upstream openImageViewer)
- CSS upload warning confirm modal (matching upstream)
- Fix: navbar 消息 menu item now opens notifications page (messages), not DM
  list — DM stays on the ✉️ nav button (matches upstream structure)
2026-08-10 14:18:29 +08:00
lezi-fun 4ee38f6486 feat: align with upstream — pin posts, edit marker, custom CSS, UX fixes
- Pin/unpin posts (PUT /api/posts/:id/pin, admin) with notification to author
- is_pinned/pinned_at in schema; 📌 badge on feed + detail; admin pin button
- Edited marker (已编辑) on feed + detail; edit button + modal for authors
- Custom CSS: upload/delete API + admin tab + global loader (style.css override)
- Fix: duplicate post title on detail page (remove card title, keep header)
- Fix: forum name flicker on load (localStorage cache before fetch)
- Fix: dropdown menu closes on outside click (document listener)
- Fix: document.title + <title> sync on forum rename
2026-08-10 12:32:06 +08:00
lezi-fun ac6e2dab84 fix: chat input hidden on small viewports
- Chat modal fixed height 70vh, message list flex:1 with minHeight:0
- Input row flexShrink:0 so it's never compressed out of view
2026-08-10 10:38:30 +08:00
lezi-fun 5d90e5c415 fix: hide DM button when logged out 2026-08-10 10:21:26 +08:00
lezi-fun 60c21ae0a6 fix: navbar full-width layout
- Remove flex wrapper around Navbar that collapsed it to content width
- Move DM button inside Navbar nav-right, ChatManager renders modals only
- Navbar is a direct body child again, sticky + full width restored
2026-08-10 10:11:32 +08:00
lezi-fun 4732e7d61d feat: port upstream custom pages, notifications, recovery codes, account security
- schema: custom_pages, notifications, recovery_codes tables + UNIQUE(conversations) + posts.edited_at
- API: custom-pages CRUD (public + admin), notifications (list/read/read-all), recovery-codes (generate/count/reset-password), user avatar/password/email, post edit
- UI: custom page nav links + iframe rendering, admin custom pages tab with editor modal, messages page shows notifications, settings page gains avatar upload, password/email change, recovery codes manager
- Sync globals.css with upstream rewrite
2026-08-10 09:07:06 +08:00

2026-08-09

lezi-fun 02ac24ba88 feat: port pagination and drag-drop upload from upstream
- GET /api/posts now supports page/limit, returns {data, pagination}
- Feed: pagination controls (‹ page numbers ›), reset to page 1 on sort change
- NewPost: dashed drop zone with click/drag-drop image upload, 5MB limit
- UserProfile adapts to paginated response
2026-08-09 21:14:18 +08:00
lezi-fun 300ad5959c feat: port private messaging (私信) from upstream
- Add conversations/messages tables to schema.sql (upstream missed them)
- API: GET/POST /api/conversations, GET/POST /api/conversations/[id]/messages, PUT /api/messages/[id]/read
- Chat UI: conversation list modal, chat window with 3s polling, unread badge
- Navbar message entry opens DM list; user profile has 发私信 button
- Access control: only conversation participants (403 otherwise)
2026-08-09 21:01:55 +08:00
lezi-fun 5ef8d4b1ff feat: port user profile feature from upstream
- GET /api/users?username= filter (admin)
- GET /api/posts?user_id= filter
- Add UserProfile page (profile card + user's posts), reachable via ?user=<username>
- Clickable usernames on feed, post detail, replies
2026-08-09 18:30:49 +08:00
lezi-fun 70a198ae32 fix: restore original Feather icons across UI
- Add components/Icons.js with SVG paths extracted verbatim from the original index.html (14 unique icons)
- Restore icons on navbar menu, sidebar, feed actions, post/reply, modals, admin tabs and settings
- Replaces emoji placeholders from the initial migration
2026-08-09 18:12:46 +08:00
lezi-fun 281460fb03 feat: migrate to Next.js 14 (App Router + Route Handlers)
- Replace Express server with Next.js Route Handlers (16 API routes)
- Rewrite index.html SPA as React components (feed, post, admin, modals)
- Move style.css to app/globals.css with dark/light themes intact
- Add lib/db.js, lib/auth.js (JWT), lib/api.js (client API wrapper)
- Server binds 0.0.0.0 by default; host/port configurable via config.js
- Uploads served via /api/uploads route (rewrite keeps /uploads/ URLs)
- Multi-stage dockerfile using standalone output
2026-08-09 17:02:11 +08:00