Commit Graph
219 Commits
Author SHA1 Message Date

2026-08-11

lezi-fun 3049aa96e4 docs: Cloudflare Workers one-click deploy (OpenNext) in README 2026-08-11 09:27:13 +08:00
lezi-fun 39716b7c8f docs: Cloudflare Workers one-click deploy (OpenNext) in README 2026-08-11 09:27:03 +08:00
lezi-fun dd5372a273 chore: .env is user-local env (gitignored), .env.example is the template 2026-08-11 09:19:26 +08:00
lezi-fun 59227d99a5 chore: .env is user-local env (gitignored), .env.example is the template 2026-08-11 09:19:18 +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
lezi-fun 962f7f67c1 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:29 +08:00
lezi-fun 9c4a694394 fix: R2 public URL without bucket prefix (custom domain serves at root)
S3_PUBLIC_URL (custom domain) serves objects at /<name>, not
/<bucket>/<name>. Only include bucket prefix when falling back to the
S3 endpoint path-style URL.
2026-08-11 09:07:19 +08:00
lezi-fun 778c2bcf4c fix: R2 public URL without bucket prefix (custom domain serves at root)
S3_PUBLIC_URL (custom domain) serves objects at /<name>, not
/<bucket>/<name>. Only include bucket prefix when falling back to the
S3 endpoint path-style URL.
2026-08-11 09:06:14 +08:00

2026-08-10

lezi-fun d2f377d380 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:16:57 +08:00
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
Furrium Network bd7899a180 Update dockerfile 2026-08-10 22:11:36 +08:00
lezi-fun 80eb313604 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:56:05 +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 c059ad0979 style: sync admin table full-width styles from upstream 2026-08-10 21:26:46 +08:00
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