Commit Graph
17 Commits
Author SHA1 Message Date

2026-08-11

lezi-fun 0aac277aea Revert "feat: reply chain view (sub-thread folding)"
This reverts commit 4c0f146338.
2026-08-11 22:22:18 +08:00
lezi-fun 4c0f146338 feat: reply chain view (sub-thread folding)
Build reply tree, show up to 3 children per reply. '继续此消息串' opens a dedicated chain view (only that reply + all descendants). '返回所有回复' goes back.
2026-08-11 22:21:09 +08:00
lezi-fun 5a9a454ef3 fix: replies drawer auto-expand, settings no-scroll, title bug, admin links
- PostDetail: replies open as drawer (grid-rows animation) automatically
  after post loads — no toggle button
- SettingsPage: outer frame overflow hidden (100vh), only inner panel
  scrolls; hide #app layout when not on feed (fixes navbar moving when
  scrolling settings)
- Title: metadata 'Loading...' → 'Forumlify' (Next resets <title> to
  metadata on re-render → title became Loading... after load); unify
  title effect (rotate Loading. only while !ready && !forumNameLoaded)
- AdminLinks: link divider uses var(--border) (was #f1f5f9, invisible
  in dark mode); add admin.link i18n keys
- AdminPage i18n nav labels
2026-08-11 17:35:48 +08:00
lezi-fun cb89f1190c fix: stabilize markdown post transition 2026-08-11 15:58:39 +08:00
lezi-fun 0060034dec fix: morph post card content by element 2026-08-11 15:46:46 +08:00
lezi-fun 6947cdaf36 fix: polish forum navigation and interface states 2026-08-11 15:25:05 +08:00

2026-08-10

lezi-fun b2368f68df 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
2026-08-10 21:54:28 +08:00
lezi-fun 1a8a588d60 feat: markdown rendering + dark mode input fixes + DM icon align
- Add marked dependency; render post/reply content and signature via
  marked.parse (matches upstream). lib/markdown.js helper + CSS for
  code/pre/blockquote/tables in glass theme
- Fix hardcoded #e2e8f0 white inputs in dark mode: NewPost title/content,
  Modals report select, ReplyList, AdminForumSettings/Links/Users/Logs
- DM button: replace ✉️ emoji with upstream SVG chat bubble icon
2026-08-10 18:18:19 +08:00
lezi-fun 4a30e79269 feat: edit post images (upload/remove) + fix captcha input in dark mode
- PostDetail edit modal: show existing images with delete button, upload
  new images (multi-file, 5MB limit), save replaces image list
- API PUT /posts/:id accepts images array; omitting keeps original
- lib/api updatePost passes images
- NewPost/ReplyList captcha answer input: use CSS vars (was hardcoded
  #e2e8f0 border with white bg — glaring in dark mode)
2026-08-10 17:41:46 +08:00
lezi-fun 34c06c206c fix: loading page logo/name flash, settings name flash, post card radius
- LoadingScreen: remove 🌊 logo; show forum name only after server
  responds (fades in place), delayed 650ms before switching to home
- AppProvider: new forumNameLoaded flag; title rotation already handled
- settings API: always returns forum_name (inserts default if missing)
- AdminForumSettings: name input starts empty, fills after fetch
- PostDetail: add id=pagePost so #pagePost .post-detail-card styles
  apply (border-radius/shadow were missing)
2026-08-10 17:05:23 +08:00
lezi-fun 599b6f3435 fix: post/reply avatars not updating after avatar change
Feed, PostDetail and ReplyList rendered ui-avatars fallback from
username only, ignoring avatar_url from the posts/replies API. Now
use p.avatar_url / r.avatar_url when present.
2026-08-10 15:23:05 +08:00
lezi-fun 581925ad7d feat: user signature (设置页编辑 + 帖子底部显示)
- schema: users.signature column (upstream aligned)
- API: posts query JOIN signature, /auth/me returns signature, PUT /users/:id updates signature
- Settings: signature textarea (Markdown hint), saved with profile
- PostDetail: signature shown under post content with divider
- README: remove upstream DB schema note (fixed upstream)
2026-08-10 14:45:50 +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

2026-08-09

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