feat(nsfw): 新增账号成人内容偏好并默认开启

- src/lib/digital.ts: 补充账号 NSFW 偏好协议,兼容未返回偏好的旧响应
- src/components/digital-home.tsx: 我的页支持保存开关,收藏更新保留服务端偏好
- src/components/digital.css: 增加开关样式与键盘焦点提示
- README.md: 说明默认值、游客限制与前后端配套发布要求
This commit is contained in:
湛兮
2026-10-27 20:18:16 +08:00
parent 3530219123
commit cb5e004eb9
4 changed files with 87 additions and 7 deletions
+2
View File
@@ -20,6 +20,8 @@ export type Profile = {
favorites: string[];
persona: string;
userName: string;
/** 登录账号的成人内容偏好;旧服务未返回时沿用默认开启。 */
nsfwEnabled?: boolean;
};
/** 会话消息拥有持久化 id,避免流式刷新时重复插入。 */
export type Message = {