Commit Graph
26 Commits
Author SHA1 Message Date

2026-08-11

lezi-fun 4d0d5edec3 feat: Discourse-style reply-to indicator (↩ @username)
- replies table: add reply_to_username column
- POST /api/replies: accept reply_to_username param
- GET /api/replies: LEFT JOIN users to return reply_to_username
- ReplyList: submit replyTo as reply_to_username on create
- UI: each reply shows '↩ 正在回复 @username' indicator (clickable,
  scrolls to target reply)
- data-username attribute on .reply-item for scroll targeting
2026-08-11 21:18:18 +08:00
lezi-fun 7bf9e37036 fix: reply button always visible (mail-style icon), works on own replies
- Reply button: always visible (opacity 0.5), only icon (no text),
  hover → full opacity + primary color
- Works on own replies (no restriction on replying to self)
- Removed .reply-item:hover .reply-btn (was requiring parent hover)
2026-08-11 21:08:55 +08:00
lezi-fun 2bb1f4227e feat: hover reply button → quote + scroll to reply box
- Each reply shows a 回复 button on hover (always visible on touch)
- Click: sets '正在回复 @user' banner, smooth-scrolls to reply box,
  focuses textarea; 取消 clears it
- New reply icon (corner-up-left); clear replyTo after submit
- Reply markdown already rendered via renderMarkdown (sanitized)
2026-08-11 20:57:48 +08:00
lezi-fun d757bde780 feat: super admin badge — earliest admin shows 超级管理员 in user list
- /api/users: mark is_super for the earliest-registered admin (matches
  the auto-promotion migration semantics)
- AdminUsers: render 超级管理员 badge for is_super, 管理员 otherwise
- i18n keys admin.user.roleSuper (zh/en)
- Mobile settings nav: active tab gets top-left/top-right rounded
  corners only (desktop unchanged)
2026-08-11 20:40:02 +08:00
lezi-fun f0867935ac fix: mobile narrow — post action buttons wrap to own row
@media (max-width:640px): .post-header flex-wrap; .post-detail-controls
full-width right-aligned row (no more icon/text split across lines).
2026-08-11 20:34:05 +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 7cc1f0e228 fix: polish post transition details 2026-08-11 16:56:07 +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 ae2d5e82ca fix: smooth post title and card morph 2026-08-11 15:32:26 +08:00
lezi-fun 6947cdaf36 fix: polish forum navigation and interface states 2026-08-11 15:25:05 +08:00
lezi-fun 0933220c70 fix: restore dark post view and API revalidation 2026-08-11 13:32:44 +08:00
lezi-fun 5c554f27ea fix: Next 16 cookies() is async — await it in Home (page rendering error
cookies().get() without await threw in Next 16 (sync dynamic API
removed), breaking the whole Home SSR render → layout broken, spinner
restart, flash. Await cookies() before reading forumlify-name.
Also raise glass-bg opacity (0.18→0.62 light / 0.35→0.60 dark) so
cards/navbar/modal aren't see-through.
2026-08-11 11:43:10 +08:00
lezi-fun b5fafdbc09 fix: long post fade uses mask (text fades out, no white block)
Replace background gradient overlay with mask-image so the text itself
fades to transparent toward the bottom; no solid edge color visible.
2026-08-11 10:30:34 +08:00
lezi-fun 74202f7551 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)
2026-08-11 10:23:33 +08:00

2026-08-10

lezi-fun 24379f0ab1 feat: settings sidebar layout (align upstream) + fix mobile admin bottom bar
- SettingsPage: sidebar layout with 3 tabs (个人资料/安全设置/恢复码),
  extract SettingsProfile component; sync upstream settings CSS
- Fix: .page-slide backdrop-filter created containing block, breaking
  position:fixed children (mobile admin bottom nav floated up on scroll,
  modals mispositioned). Removed it — background is solid gradient
- Add missing user/lock icons
2026-08-10 22:15:53 +08:00
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 e860978aef style: sync admin table full-width styles from upstream 2026-08-10 21:25:30 +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 ebc5201569 style: sync upstream liquid glass theme (液态玻璃)
- Adopt upstream style.css glassmorphism: glacier-blue palette,
  --glass-* vars, backdrop-filter blur on navbar/cards/modals, gradient bg
- Keep old CSS variable aliases (--text/--bg/--surface/--border etc)
  mapped to glass colors so React components' inline styles keep working
- Re-append loading-screen / app-fade-in styles removed by upstream sync
2026-08-10 17:16:34 +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 e79c8530e3 fix: loading screen shows Forumlify on first visit + rotating tab title
- LoadingScreen: drop forumName title (default name flashed on first
  visit before settings loaded); show 🌊 logo + spinner instead
- AppProvider: during init rotate document.title Loading. → Loading..
  → Loading... every second; after ready show actual forum name
- layout: initial metadata title is 'Loading...' (client takes over)
2026-08-10 16:55:38 +08:00
lezi-fun e50bb2ff3d feat: full-screen loading page with fade-in on init complete
- AppProvider: add 'ready' flag set after init (auth restore + settings)
- page.js: show LoadingScreen (spinner + forum name) until ready, then
  fade in main UI (.app-fade-in 0.4s) — no more unloaded UI flash
2026-08-10 16:43:56 +08:00
lezi-fun 3a9e2ec297 sync upstream: sidebar admin layout, latest styles, clean install
- README: clone -b next for the Next.js branch (was cloning Express main)
- AdminPage: sidebar layout matching upstream main (admin-layout/sidebar/nav)
- globals.css: sync latest upstream style.css (1200 lines)
- Remove broken lockfiles (package-lock.json, bun.lock) that caused
  'Failed to patch lockfile' build warnings; clean npm/bun install verified
2026-08-10 14:56:29 +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 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