2026-08-11
lezi-fun
1934edebd5
feat: i18n (i18next + react-i18next) zh/en + hydration fixes
...
- i18next + react-i18next: zh/en locales, language detection
(localStorage > navigator > zh), settings language switcher
- Components i18n'd: Navbar, Feed, NewPost, Modals, SettingsPage,
SettingsProfile, AccountSecurity, RecoveryCodes
- Fix hydration mismatch (spinner restart): forum name via cookie
(Server Component reads cookie, SSR outputs name, no inline script
DOM injection); remove createPortal in RecoveryCodes modal; i18n
sync init (initImmediate) so SSR/CSR text matches
- LoadingScreen: React-state name rendering (no script-injected nodes)
- Fix double spinner in Feed; DM icon emoji → SVG in ConversationList
# Conflicts:
# components/AppProvider.js
# components/NewPost.js
2026-08-11 11:33:57 +08:00
lezi-fun
517661441a
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:44 +08:00
lezi-fun
7966ac0eeb
feat: upgrade Next.js 16 + React 19, R2 binding storage, adaptive build
...
- Next.js 14 → 16.3.0, React 18 → 19.2.8
- Route handlers: async params (await params) for Next 15+ — 17 files
- Fix destructuring params pattern (const {id} = await params) in
users/[id] and users/[id]/role
- storage.js: prefer Cloudflare R2 binding (FORUMLIFY_BUCKET, no S3
keys) on Workers; fallback S3-compatible API (Vercel/local)
- wrangler.jsonc: add FORUMLIFY_BUCKET binding to forum bucket
- scripts/build.js: adaptive build (CF env → OpenNext, else next build);
fix recursion via NEXT_PRIVATE_STANDALONE detection
- 40/40 tests pass on Next 16
# Conflicts:
# app/api/posts/[id]/route.js
2026-08-11 09:46:51 +08:00
lezi-fun
a42fe1dd89
feat: Cloudflare Workers deployment (OpenNext adapter)
...
- Add @opennextjs/cloudflare + wrangler config, open-next.config.ts,
public/_headers, .dev.vars.example template
- package.json: cf build/preview/deploy/upload scripts
- Verified deployed: https://forumlify.roylikerebecca19930.workers.dev
(DB read/write via outbound TCP to Postgres, R2 image upload + public
domain access all working)
2026-08-11 09:18:38 +08:00
2026-08-10
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
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
2026-08-09
lezi-fun
7d431a89a7
test: add API integration test suite (40 tests)
...
- node:test based, zero extra dependencies, npm test script
- api.test.js: auth, posts, pagination, replies, 404/401 handling
- admin.test.js: admin API, role management, settings, links, logs
- dm.test.js: private messaging, unread counts, read receipts, 403
- helpers.js: makeAdmin() to guarantee admin role in shared DB
- test/README.md: setup and run instructions
2026-08-09 21:26:03 +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
Furrium Network
57b9e987dc
第一次上传
2026-08-09 11:58:28 +08:00