Commit Graph

480 Commits

Author SHA1 Message Date
margrop
5dbc42c64f fix: SVG动画改为用户手动播放 2026-10-31 20:43:22 +08:00
margrop
d832de1742 style: 彩色提示块、状态标签适配深色模式
浅色彩底(如 bg-green-50)与深色文字补充 dark: 写法,避免深色模式下出现刺眼的亮块或看不清的文字;
硬编码的白底改为主题背景色。题目配图和 SVG 动画保留白底,保证黑色线条可见。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:36:26 +08:00
margrop
8e46cfe63a feat: 导航栏增加深色模式切换,默认跟随系统
- 顶部导航栏新增主题按钮,可选自动(跟随系统)、浅色、深色
- 偏好保存在账号中(User.themePreference,仅新增列),并在本地缓存,换设备登录保持一致
- <head> 内联脚本在首屏绘制前应用主题,避免深色模式下闪现浅色页面
- 用户接口、数据导出导入支持主题偏好;同步 README 与 Wiki

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:36:26 +08:00
margrop
2f0c17f4eb fix: 错题卡片摘要用 KaTeX 渲染公式,不再显示 LaTeX 源码
原先摘要用正则把 LaTeX 转成纯文本,嵌套分数、向量、三角函数等复杂公式会残留源码。
现在先抽出公式片段,文字部分去掉 Markdown 格式,公式用 KaTeX 行内渲染;
截断时公式作为整体,不会被截到一半;无法解析的公式、未闭合的 $ 或缺少定界符的命令仍按纯文本清理。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:26:53 +08:00
margrop
eb157dc2ad feat: 管理员调试模式与调试日志导出
管理员可在「设置 → 用户管理」开启调试模式,复现问题后导出调试日志发给作者排查:
- 调试模式下记录全部级别的服务端日志(不受 LOG_LEVEL 限制)和前端上报的日志,保存在内存中,最多 5000 条,24 小时后自动关闭
- 记录时脱敏:API Key、密码、令牌、Cookie 替换为 [REDACTED],图片 data URL 只保留类型和长度
- 导出文件包含运行版本、系统环境和脱敏后的配置
- 前端注册全局错误监听,未捕获异常与未处理的 Promise 拒绝上报到服务端日志
- 抽出通用下载函数 downloadFile,数据备份与调试日志导出共用

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 18:36:52 +08:00
margrop
7f122724cb chore: 公开历史检查允许限流测试使用示例内网地址
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v2026.10.31-2
2026-10-31 12:30:18 +08:00
margrop
b03c500b88 chore: 升级 @google/genai 到 2.x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:27:35 +08:00
margrop
8849d5dbc0 chore: 升级 Anthropic SDK 到 1.x,兼容接口保持 x-api-key 与 2023-06-01 请求头
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:26:02 +08:00
margrop
4e7cab2c18 chore: 升级 openai SDK 到 7.x(OpenAI 兼容渠道与 Azure)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:23:04 +08:00
margrop
d11c8bbe25 chore: 升级 Vitest 5、Vite React 插件 6 和 jsdom 30,配置改为 ESM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:19:12 +08:00
margrop
3acd607dd9 chore: 升级 dotenv 到 18.x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:16:16 +08:00
margrop
4e465c625b chore: 升级 react-dropzone 到 20.x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:11:42 +08:00
margrop
2be5fcae64 chore: 升级 lucide-react 到 1.x,GitHub 图标改用本地组件
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:10:40 +08:00
margrop
04573f96aa docs: 更新 AI 回复解析流程说明,去掉已移除的 jsonrepair
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:08:51 +08:00
margrop
91e4746de4 chore: 移除未使用的 jsonrepair、react-easy-crop 和 tailwindcss-animate 依赖
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:08:40 +08:00
margrop
635848ef16 feat: 后台任务列表写入配置目录,重启后保留记录并把中断的任务标为失败
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:06:47 +08:00
margrop
ba93404339 refactor: 拆分打印预览页的显示选项、题目勾选和单题打印内容
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:04:41 +08:00
margrop
3b58306903 fix: 管理员仪表盘学科分布合并不同用户的同名错题本,避免重复显示
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:03:00 +08:00
margrop
3dec5a573d refactor: 管理员仪表盘的图表和用户列表拆成独立组件
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:02:31 +08:00
margrop
6e7e5f9718 refactor: 拆分举一反三练习页,状态与请求抽成 usePracticeSession,并补充测试
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 12:00:35 +08:00
margrop
5428cfcf9c test: 新增错题本管理、知识点统计和打印预览的 E2E 用例
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:57:10 +08:00
margrop
af5d9fe977 test: 上传纠错 E2E 按名称精确查找数学错题本,并等创建接口返回后再离开页面
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:56:44 +08:00
margrop
47a49a74b0 test: 修正数据安全测试中请求参数的类型
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:53:58 +08:00
margrop
51dd7100fe fix: 取不到客户端 IP 时跳过按 IP 限流,避免所有人被一起锁住
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:44:50 +08:00
margrop
825b4bf2d9 test: 补充 AI 设置校验和上传图片压缩的单元测试
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:43:37 +08:00
margrop
763773e6d1 fix: 重做试卷时先检查 AI 额度,额度用完不再让试卷卡在生成中
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:42:35 +08:00
margrop
53ca8283c0 fix: 错题卡片预览中 \leq、\geq 不再残留字母,\text{} 保留单位文字
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:41:41 +08:00
margrop
850591828e fix: 按英文年级挂标签时 Grade 10~12 不再被误判为一年级
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:41:17 +08:00
margrop
f7d7be759b test: 用真实数据库覆盖批量删除、系统重置、管理后台和自定义标签的权限边界
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:40:07 +08:00
margrop
c0b0233bd8 refactor: 标签使用统计改按标签关系计数,不再解析弃用的 knowledgePoints
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:38:23 +08:00
margrop
9c8aedc87f perf: 统计页科目分布只读取科目名,不再整行读出错题原图
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:36:35 +08:00
margrop
c1c357728c refactor: 按 Next.js 16 约定将 middleware 更名为 proxy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:35:34 +08:00
margrop
74eb0e6295 feat: 全站返回安全响应头,禁止被其他站点嵌入和 MIME 嗅探
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:34:43 +08:00
margrop
e81e05b539 fix: 中间件无法校验登录状态时跳转登录页,不再直接放行
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:33:32 +08:00
margrop
7475b6ddfe feat: 登录、注册和初始化链接增加失败次数限制,防止暴力破解
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:32:50 +08:00
margrop
39ce0f524c perf: 为错题、科目、练习记录和复习计划补充按用户查询的索引
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:30:04 +08:00
margrop
49fae45d76 fix: 按知识点筛选错题改为精确匹配,不再误命中包含该词的其他标签
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:29:06 +08:00
margrop
fdae1217b2 feat: 试卷打印支持选择留白,可按题型自动或固定大小
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:46:29 +08:00
margrop
866fa5fe11 docs: Wiki 首页按 v2026.10.31 核对,补充安装方式、管理员设置与近期功能
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:21:13 +08:00
margrop
7ebab6b61e docs: 更新 CHANGELOG,发布 v2026.10.31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v2026.10.31
2026-10-31 05:00:53 +08:00
margrop
4f38057c0c chore: 公开历史检查允许初始化测试使用 README 中的示例内网地址
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v2026.10.31-1
2026-10-31 04:38:17 +08:00
margrop
e552eca81f feat: 飞牛OS 安装向导直接设置管理员邮箱和密码
- 安装向导新增「管理员账号」一步(字段 wizard_admin_email、wizard_admin_password),密码至少 6 位且不能是 123456
- install_callback 用内置 Node.js 与 bcryptjs 生成密码哈希,写入 config/initial-admin.json(0600,不保存明文,不写日志);失败时不中断安装,改用初始化链接
- 服务启动时若还没有管理员,优先用 initial-admin.json 创建管理员并删除该文件;已有管理员(保留数据重装)时忽略并删除
- 已在飞牛OS(x86)真机验证:向导账号可直接登录并进入安装向导,保留数据重装沿用原账号
- 同步中英文 README、Wiki、安装包说明与登录页指引

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 04:19:02 +08:00
margrop
7c016baccb feat: 桌面版与安卓单机版首次启动时自动打开初始化页
服务就绪后读取数据目录中的 config/setup-token,存在时直接加载 /initialize?token=…,用户无需查看日志;创建管理员后令牌删除,之后照常打开首页。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:45:48 +08:00
margrop
bd0befa85b feat: 全新安装改用一次性初始化链接创建管理员,不再预置固定密码的默认管理员
- 服务启动时若还没有管理员,生成一次性令牌保存到配置目录的 setup-token,并在日志中打印 /initialize?token= 链接;已有管理员时删除残留令牌
- 新增 /initialize 页面与 POST /api/initialize:凭令牌设置管理员名称、邮箱和密码(不能用 123456),成功后自动登录进入安装向导;令牌改名占用,并发提交只会创建一个管理员
- 登录页在尚未创建管理员时说明各安装方式到哪里找初始化链接,注册状态接口增加 initialized
- prisma/seed.ts、scripts/seed-admin.js 不再创建 admin@localhost,只为已有的默认管理员恢复角色;E2E 准备脚本改为创建测试管理员
- 已有实例升级保留原账号,旧默认管理员仍走强制改密流程
- 同步中英文 README、Wiki、安装包说明与 npm、飞牛OS 的首次使用提示

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:45:48 +08:00
margrop
8b2cdede72 feat: 登录页增加首次使用指引,关闭注册时不再显示注册入口
- 登录页下方新增「首次使用?」折叠说明:默认管理员邮箱、首次登录改密与安装向导,附使用文档链接;对所有访问者相同,不显示密码,也不透露是否已改过默认密码
- 读取注册开关,关闭时去掉「立即注册」,改为提示联系管理员开启注册
- 同步中英文 README 与 Wiki

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:28:37 +08:00
margrop
9fa253fa84 fix: 录入错题和 Openclaw 批量上传时年级学期按中文计算,避免显示为英文
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:17:42 +08:00
margrop
53968c4e0a docs: Wiki 补充裁剪缩放、错题本删除入口、试卷状态与知识点并入统计中心
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 21:31:18 +08:00
Margrop
8329c20266 ci: 接入 Windows 安装包 SignPath 签名
ci: 为 Windows 安装包接入可选的 SignPath 签名
2026-10-30 12:59:17 +08:00
margrop
fa55974384 ci: 为 Windows 安装包接入可选的 SignPath 签名 2026-10-30 12:49:01 +08:00
Margrop
466ee02562 docs: 同步 macOS 安装说明到中英文 Wiki
docs: 补齐中英文 Wiki 的 macOS 自签名步骤
2026-10-30 12:36:31 +08:00