Commit Graph
219 Commits
Author SHA1 Message Date

2026-08-09

lezi-fun 9e72e4de8e chore: allow .env in repo, add .env.example template
- .gitignore: track .env, still ignore local overrides (.env.local)
- Add .env.example with DATABASE_URL / JWT_SECRET / PORT / HOST
2026-08-09 21:26:29 +08:00
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 02ac24ba88 feat: port pagination and drag-drop upload from upstream
- GET /api/posts now supports page/limit, returns {data, pagination}
- Feed: pagination controls (‹ page numbers ›), reset to page 1 on sort change
- NewPost: dashed drop zone with click/drag-drop image upload, 5MB limit
- UserProfile adapts to paginated response
2026-08-09 21:14:18 +08:00
lezi-fun 96c3ac3bb9 Merge remote-tracking branch 'origin/main' into nextjs-migration 2026-08-09 21:03:38 +08:00
lezi-fun 300ad5959c feat: port private messaging (私信) from upstream
- Add conversations/messages tables to schema.sql (upstream missed them)
- API: GET/POST /api/conversations, GET/POST /api/conversations/[id]/messages, PUT /api/messages/[id]/read
- Chat UI: conversation list modal, chat window with 3s polling, unread badge
- Navbar message entry opens DM list; user profile has 发私信 button
- Access control: only conversation participants (403 otherwise)
2026-08-09 21:01:55 +08:00
Furrium Network ff46812564 Update app.js 2026-08-09 19:58:22 +08:00
Furrium Network bbaa1e9748 Update user.js 2026-08-09 19:57:16 +08:00
Furrium Network da0252207e Update user.js 2026-08-09 19:52:55 +08:00
Furrium Network 26312f7990 Update feed.js 2026-08-09 19:47:55 +08:00
Furrium Network 9d33b7aa0a Update index.html 2026-08-09 19:38:13 +08:00
Furrium Network 42a7f0edb4 Update app.js 2026-08-09 19:37:06 +08:00
Furrium Network 1b5feb3df1 Update feed.js 2026-08-09 19:33:30 +08:00
Furrium Network e9b16c79f1 Update feed.js 2026-08-09 19:29:27 +08:00
Furrium Network c3ceaed70b Update app.js 2026-08-09 19:28:59 +08:00
Furrium Network 854d6caaa7 Update feed.js 2026-08-09 19:27:01 +08:00
Furrium Network 028bca44ed Update api.js 2026-08-09 19:26:28 +08:00
Furrium Network d3741cb3ea Update api.js 2026-08-09 19:26:03 +08:00
Furrium Network ab8fc07a7a Update server.js 2026-08-09 19:25:32 +08:00
Furrium Network ae0d382573 Update index.html 2026-08-09 19:19:52 +08:00
Furrium Network e223407b55 添加了私信功能 2026-08-09 19:13:38 +08:00
Furrium Network f0cf4b1738 Update config.js 2026-08-09 19:12:21 +08:00
Furrium Network b86ea0269e Update config.js 2026-08-09 19:11:35 +08:00
Furrium Network e2d141d693 Update app.js 2026-08-09 19:10:48 +08:00
Furrium Network fae95c5aa5 Update app.js 2026-08-09 19:10:14 +08:00
Furrium Network e4d9e7dcd0 Update user.js 2026-08-09 19:09:56 +08:00
Furrium Network 6473a66265 Update admin.js 2026-08-09 19:09:42 +08:00
Furrium Network c231f7684d Update post.js 2026-08-09 19:08:39 +08:00
Furrium Network b4214359f6 Update feed.js 2026-08-09 19:08:09 +08:00
Furrium Network 3b5ba899e8 Update auth.js 2026-08-09 19:07:42 +08:00
Furrium Network 4a1ed6c139 Update captcha.js 2026-08-09 19:07:15 +08:00
Furrium Network c17fc68ea3 Update theme.js 2026-08-09 19:06:55 +08:00
Furrium Network e74c3c35ea 添加私信API 2026-08-09 19:05:56 +08:00
Furrium Network 6489075781 添加私信API 2026-08-09 19:04:28 +08:00
Furrium Network fd7d0c95b8 添加私信 2026-08-09 18:59:54 +08:00
Furrium Network 93d971484a 修复了无法切换亮色/暗色的问题 2026-08-09 18:53:33 +08:00
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 e6ba5507ae Merge remote-tracking branch 'origin/main' into nextjs-migration 2026-08-09 18:24:37 +08:00
Furrium Network d0df10df7f Update user.js 2026-08-09 18:22:10 +08:00
Furrium Network 7170add911 Update server.js 2026-08-09 18:21:08 +08:00
lezi-fun e16887a4b3 chore: remove orphaned js/ modules from reverted upstream split 2026-08-09 18:17:53 +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 3e9d004fb6 Merge remote-tracking branch 'origin/main' into nextjs-migration 2026-08-09 17:15:57 +08:00
Furrium Network 6deb213d89 拆分了index.html并整出来了这些 2026-08-09 17:06:06 +08:00
Furrium Network 91b4852951 Create nothing 2026-08-09 17:05:25 +08:00
Furrium Network b875dbc8ce Update index.html 2026-08-09 17:05:04 +08:00
lezi-fun 94cb0f50be docs: preserve upstream attribution note in README 2026-08-09 17:03:00 +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 ef1318da66 Update README.md 2026-08-09 16:47:09 +08:00
Furrium Network d986ecdbc4 ACCEPT REQUEST
docs: add build-from-source guide, optional SERVER_PORT config
2026-08-09 16:34:25 +08:00
lezi-fun 2ffad8422f Add .gitignore, remove node_modules from repo 2026-08-09 16:28:32 +08:00