Commit Graph
255 Commits
Author SHA1 Message Date

2026-08-10

lezi-fun e860978aef style: sync admin table full-width styles from upstream 2026-08-10 21:25:30 +08:00
lezi-fun 83d270eada feat: theme follows system preference by default + fix dark mode FOUC
- getTheme: manual localStorage override first, else prefers-color-scheme
- layout: inline head script sets data-theme before first paint (no
  white flash in dark mode on loading screen)
- AppProvider: listen for system theme change when user hasn't overridden
2026-08-10 18:27:17 +08:00
lezi-fun e3afba65fa feat: theme follows system preference by default + fix dark mode FOUC
- getTheme: manual localStorage override first, else prefers-color-scheme
- layout: inline head script sets data-theme before first paint (no
  white flash in dark mode on loading screen)
- AppProvider: listen for system theme change when user hasn't overridden
2026-08-10 18:25:44 +08:00
lezi-fun 156e178160 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:19:56 +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 9eed101caa fix: recovery codes modal not showing (portal to body)
Modal rendered inside SettingsPage .page-slide whose slideIn animation
creates a containing block, so position:fixed modal was positioned
relative to the slide (invisible in some browsers). Render via
createPortal to document.body.
2026-08-10 17:57:58 +08:00
lezi-fun bd6314be38 fix: recovery codes modal not showing (portal to body)
Modal rendered inside SettingsPage .page-slide whose slideIn animation
creates a containing block, so position:fixed modal was positioned
relative to the slide (invisible in some browsers). Render via
createPortal to document.body.
2026-08-10 17:55:30 +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 f317e5eee6 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:18:14 +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 68b78c7987 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:06:12 +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 ba65f446ec 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:49 +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 9880d2b0d0 fix: browser tab title not updating after forum rename on reload
document.title was only set inside updateForumName (the rename action).
On page reload the cached/loaded forumName never synced to the title, so
the tab stayed 'Forumlify' (server-rendered). Add a useEffect on
forumName that syncs document.title + <title> element, covering init,
DB load and rename paths.
2026-08-10 16:47:30 +08:00
lezi-fun ae8299820f 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:44:21 +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 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 4d4c227f58 docs: deploy button → dedicated template repo (forumlify-deploy)
Separate one-click deploy template repo with next as default branch,
so Vercel imports the Next.js version without branch selection.

# Conflicts:
#	README.md
2026-08-10 15:20:01 +08:00
lezi-fun d5e56c0a20 docs: deploy button → dedicated template repo (forumlify-deploy)
Separate one-click deploy template repo with next as default branch,
so Vercel imports the Next.js version without branch selection.
2026-08-10 15:13:09 +08:00
lezi-fun 9ffafc73b3 docs: point deploy button to fork with next as default branch
Vercel one-click deploy imports the repo's default branch with no way
to select a branch, so point the button at lezi-fun/forumlify whose
default branch is now 'next' (Next.js version).
2026-08-10 15:10:25 +08:00
lezi-fun 35a3fe0e8f docs: one-click Vercel deploy badge + clear env var table
- Add Deploy with Vercel button (auto-fills env var prompts)
- Environment variable reference table (required vs optional, with examples)
- Cloudflare Pages: explicit build settings and env config steps
2026-08-10 15:05:44 +08:00
lezi-fun b1dd75312f docs: one-click Vercel deploy badge + clear env var table
- Add Deploy with Vercel button (auto-fills env var prompts)
- Environment variable reference table (required vs optional, with examples)
- Cloudflare Pages: explicit build settings and env config steps
2026-08-10 15:05:19 +08:00
lezi-fun 3d2886ec07 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:38 +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 694fa2bfaf 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:46: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 c8dcf32dd4 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:45 +08:00
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 89987c430c 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:39 +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 48372aa14f 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:35:50 +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 721e4bfe42 fix: 405 on write methods in Vercel (static GET optimization)
Route handlers with both GET and write methods get the GET statically
optimized on Vercel, which 405s POST/PUT/DELETE. Add
export const dynamic = 'force-dynamic' to all 7 affected routes
(settings, posts, custom-pages, event-logs, links, conversations, reports).
2026-08-10 11:08:10 +08:00
lezi-fun 7ce81969ac fix: 405 on write methods in Vercel (static GET optimization)
Route handlers with both GET and write methods get the GET statically
optimized on Vercel, which 405s POST/PUT/DELETE. Add
export const dynamic = 'force-dynamic' to all 7 affected routes
(settings, posts, custom-pages, event-logs, links, conversations, reports).
2026-08-10 11:02:11 +08:00
Furrium Network 8ee6cc07c9 Merge pull request #5 from lezi-fun/serverless-support
feat: support serverless deployment (Vercel / Cloudflare Pages)
2026-08-10 10:47:00 +08:00
lezi-fun d1c06741f6 fix: uploads route ignored by .gitignore, image 404s
.gitignore 'uploads/' pattern matched app/api/uploads/ too, so the
image-serving route handler was never committed. Anchor it to /uploads/
so only the runtime storage dir is ignored. Also add vercel.json.
2026-08-10 10:45:25 +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 1486d95f89 fix: no-cache HTML headers (dynamic forum content)
Next.js default s-maxage=31536000 caches HTML for a year at CDN level,
serving stale pages after deploys. Add Cache-Control: no-store for all
routes so CDN/browser always fetch fresh.
2026-08-10 10:15:16 +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 ec50efea89 feat: support serverless deployment (Vercel / Cloudflare Pages)
- Replace bcrypt (native) with bcryptjs (pure JS) — no native build on serverless
- Storage abstraction (lib/storage.js): local uploads/ for traditional deploy, S3-compatible (R2/MinIO/S3 via aws4fetch) for serverless
- DB pool auto-adapts to serverless (single connection, rotation, timeouts)
- next.config.js: standalone output only when DOCKER=1 (serverless skips it)
- Docs: serverless deployment section in README, S3 env vars in .env.example
2026-08-10 09:55:18 +08:00
Furrium Network 83239d498e huh
feat: migrate to Next.js 14 (App Router + Route Handlers)
2026-08-10 09:40:41 +08:00
lezi-fun 95b0d63223 Merge remote-tracking branch 'origin/main' into nextjs-migration 2026-08-10 09:08:30 +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

Furrium Network 9c53ddb459 Update index.html 2026-08-09 23:56:49 +08:00
Furrium Network e03e1c6110 Update app.js 2026-08-09 23:55:45 +08:00
Furrium Network 01afe089f3 Update api.js 2026-08-09 23:54:34 +08:00
Furrium Network d79662b809 Update server.js 2026-08-09 23:53:39 +08:00
Furrium Network 4594a9acf3 Update auth.js 2026-08-09 23:51:30 +08:00