feat: SSR 私信与通知(/messages)

会话列表、读写、未读角标与全部已读;系统会话只读;用户主页可发起私信。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-29 05:59:54 +08:00
parent 126e3bae98
commit 40ec20b3df
14 changed files with 455 additions and 11 deletions

View File

@@ -114,12 +114,12 @@
## G. 私信与通知
- [ ] 会话列表(含系统会话 peer=0
- [ ] 会话消息(分页 / before 游标)
- [ ] 发送私信
- [ ] 未读数(可分私信 / 通知)
- [ ] 标记会话已读 / 通知已读 / 全部已读
- [ ] 系统通知种类:`system` / `reject` / `report_result` / `reply` / `mention` / `moderation`
- [x] 会话列表(含系统会话 peer=0— SSR `/messages`
- [x] 会话消息(分页 / before 游标)— SSR `/messages/with/:peerId`
- [x] 发送私信 — 表单 PRG用户主页「发私信」入口
- [x] 未读数(可分私信 / 通知)— 列表分项 + 导航角标
- [x] 标记会话已读 / 通知已读 / 全部已读 — 打开会话自动已读;全部标已读
- [ ] 系统通知种类:`system` / `reject` / `report_result` / `reply` / `mention` / `moderation`(写入已有;筛选 UI 未迁)
---

View File

@@ -34,7 +34,8 @@
| `/favorites` | 收藏 | 已迁 |
| `/projects` | Gitea 码桶 | 后置 |
| `/links` | 友链 | pending |
| `/messages` | 私信 | pending |
| `/messages` | 私信/通知会话列表 | 已迁 |
| `/messages/with/:peerId` | 会话详情peer=0 系统通知) | 已迁 |
| `/page/:slug` | 站点单页 | 未注册 |
| `*` | 404 / pending | 已迁 |

View File

@@ -45,7 +45,7 @@ modules/
templates/
install.tmpl
post-install.tmpl
base/ home/ post/ shared/ status/ auth/ admin/ profile/ user/ favorites/
base/ home/ post/ shared/ status/ auth/ admin/ profile/ user/ favorites/ messages/
services/
web_src/ → public/assets/
```
@@ -85,4 +85,6 @@ web_src/ → public/assets/
个人闭环:`/profile`(昵称/签名/密码/头像)、`/user/:id``/favorites`
私信:`/messages``/messages/with/:peerId`(系统 peer=0 只读;打开会话标已读)。
Admin`/admin/dashboard``/admin/boards``/admin/moderation``/admin/settings`(品牌/限流/敏感词)。