Commit Graph

175 Commits

Author SHA1 Message Date
ad95ba7d1f UI: 添加精油直接加空行,去掉确认取消按钮
All checks were successful
Deploy Production / test (push) Successful in 5s
Deploy Production / deploy (push) Successful in 6s
Test / unit-test (push) Successful in 4s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 4s
Test / e2e-test (push) Successful in 55s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 9s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:27 +00:00
c63091b504 UI: 全选按钮左置+颜色区分、placeholder浅色、应用到配方
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:27 +00:00
6931df4afd feat: 编辑器对齐+审核记录+UI调整
- 新增/编辑配方编辑器与配方卡片编辑界面完全一致(含容量与稀释)
- 自定义滴数/稀释比例框缩小,应用按钮放在稀释比例同一行
- 管理员可查看所有审核记录(采纳/拒绝历史)
- 标签筛选和全选按钮对所有用户可见
- 我的配方/公共配方库均可折叠
- viewer 看配方卡片无编辑按钮
- diary 配方卡片无编辑按钮
- 退出登录跳转首页并刷新
- 新增 /api/recipe-reviews 端点

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:27 +00:00
6f9c5732eb feat: 管理配方加共享按钮+状态+贡献统计
- 我的配方每行加📤共享按钮
- 显示共享状态:已共享(绿)/等待审核(橙)
- 已共享的隐藏共享按钮
- 非管理员显示"已贡献 X 条"统计
- 配方查询页去掉共享按钮(移到管理配方)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
cf07f6b60d fix: 我的配方加共享按钮 + 管理员显示版本号
- 我的配方卡片右上角加📤共享按钮,已共享/审核中显示状态标签
- 管理员账号标题下显示版本号和日期

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
e26cd700b9 fix: 智能识别配方名称 + 新增默认保存到个人配方
- 修复空格/无分隔符时配方名称无法识别的问题
- 支持"长高芳香调理8永久花10"连写格式自动分离名称
- 所有用户新增配方默认保存到个人配方(diary),不进公共库

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
56bc6f2bbb feat: 重写新增配方+共享审核完整流程
新增配方:
- 修复保存失败(oil→oil_name字段转换)
- 智能识别支持多条配方同时解析
- 识别结果逐条预览,可修改/放弃/保存单条/全部保存
- 编辑器加成分表格(单价/滴、小计、总成本)
- 保存到个人配方(diary)

共享审核:
- 新增 /api/recipes/{id}/reject 端点(带原因通知提交者)
- 采纳配方时通知提交者"配方已采纳"
- 拒绝时管理员输入原因
- 贡献统计含被采纳的配方数

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
3c3ce30b48 feat: 共享配方审核完整流程
- 新增 /api/recipes/{id}/reject 端点:拒绝配方并通知提交者(含原因)
- 采纳配方时通知提交者"配方已采纳"
- 管理员拒绝配方时输入原因
- 贡献统计改为统计被采纳的配方数(含 audit_log 记录)
- 完整流程测试:共享→通知→拒绝(带原因)→通知→重新共享→采纳→通知

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
50cf9d3e9b feat: 商业认证完整流程 + 通知时间过滤
商业认证:
- 申请页重写:商户名+说明字段,显示审核中/被拒/已通过状态
- 被拒绝显示原因,可重新申请
- 管理员拒绝时输入原因
- 商业核算页未认证用户点详情弹认证提示,跳转认证页面
- 删除项目仅管理员可见

通知:
- 只显示用户注册后的通知,避免角色变更后看到旧通知
- 搜索未收录通知只发管理员和高级编辑者

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
1d424984e0 feat: 权限细化、商业认证跳转、UI改进
权限:
- viewer 管理配方页只显示我的配方,隐藏公共配方库和工具栏
- 高级编辑者可看到精油价目信息不全的红色提示
- 商业核算删除按钮仅管理员可见
- 搜索未收录通知只发管理员和高级编辑者

Tab 可见性:
- 所有用户可见:配方查询、管理配方、个人库存、精油价目、商业核算
- 需登录的 tab 点击弹登录框,登录后跳转
- 操作日志/Bug/用户管理仅管理员可见

商业核算:
- 未认证用户可看项目列表,点详情提示去认证
- 跳转到我的账户页商业认证区域并自动滚动

其他:
- 我的配方和收藏配方默认折叠

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:32:13 +00:00
a8e91dc384 feat: 权限修复、搜索改进、滑动切换、通知badge
All checks were successful
Deploy Production / test (push) Successful in 4s
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / deploy-preview (pull_request) Has been skipped
PR Preview / test (pull_request) Has been skipped
PR Preview / teardown-preview (pull_request) Successful in 13s
Deploy Production / deploy (push) Successful in 7s
Test / e2e-test (push) Successful in 52s
权限:
- viewer 不能编辑公共配方(前端+后端双重限制)
- viewer 管理配方页只显示"我的配方"
- 取消 token 链接登录,改为自注册+管理员分配角色
- 用户管理页去掉创建用户和复制链接,禁止设管理员
- 修复改权限 API 路径错误

搜索:
- 模糊匹配+同义词扩展(37组),精确/相似分层
- 精确匹配不搜精油成分(避免"西班牙牛至"污染)
- 所有搜索结果底部加"通知编辑添加"按钮

UI:
- 顶部 tab 栏按用户角色显示,切换时居中滚动
- 左右滑动按 visibleTabs 顺序切换 tab
- 用户名旁红色通知数 badge

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
27c46cb803 feat: 大量管理配方和搜索改进
- 存为我的:修复调用错误API,改用 diaryStore.createDiary
- 存为我的:同名检测(我的配方 + 公共配方库)
- 我的配方:使用 RecipeCard 统一卡片格式
- 管理配方:按钮缩小、编辑时隐藏智能粘贴、精油搜索框支持拼音跳转
- 管理配方:批量操作改为按钮组(打标签/删除/导出卡片/分享到公共库)
- 管理配方:我的配方加勾选框、全选按钮、编辑功能
- 搜索:模糊匹配 + 同义词扩展(37组),精确/相似分层显示
- 搜索:无匹配时通知编辑添加,搜索时隐藏无匹配的收藏/我的配方区
- 搜索:配方按首字母排序
- 共享审核:通知高级编辑+管理员,我的配方显示共享状态
- 通知:搜索未收录→已添加按钮,审核类→去审核按钮跳转
- 贡献统计:非管理员显示已贡献公共配方数
- 登录弹窗:加反馈问题按钮(无需登录)
- 精油编辑:右上角加保存按钮,支持回车保存
- 后端:新增 /api/me/contribution 接口

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
80397ec7ca fix: 关闭按钮用 force click 绕过遮挡 + 放宽每滴价格上限到 300
- close button 用 .detail-close-btn + force:true 避免被 login modal 遮挡
- 部分高端精油每滴价格超 100,上限调至 300

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
19eeb7ba9a fix: 测试加 dismissModals 关闭登录弹窗 + 改用 should('exist')
CI 中 login-body 覆盖 detail-overlay 导致 visible 检查失败。
改为 exist 断言 + 自动关闭 login/dialog 弹窗。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
cf5b974ae1 fix: 修复 rebase 后重复 clearBrandImage 声明 + 测试加 dismissDialog
- 删除 MyDiary.vue 重复的 clearBrandImage 函数(rebase 遗留)
- 测试加 dismissDialog() 关闭 CI 中 API 错误弹出的 dialog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
b0d82d4ff7 fix: 修复 recipe-detail 测试选择器和按钮文本
- [class*="detail"] → .detail-overlay 避免匹配多余元素
- 导出图片 → 保存图片(匹配当前 UI)
- admin 编辑测试加入按钮存在性检查,token 失效时不崩溃

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
54003bc466 fix: 搜索过滤收藏、拼音首字母匹配、清除图片、滑动切换、通知已读
1. 搜索时收藏配方也按关键词过滤,不匹配的隐藏
2. 编辑配方添加精油时支持拼音首字母匹配(如xyc→薰衣草)
3. 品牌设置页清除图片立即保存到后端,不需点保存按钮
4. 左右滑动切换tab,轮播区域内滑动切换图片不触发tab切换
5. 通知列表每条未读通知加"已读"按钮,调用POST /api/notifications/{id}/read

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:31:17 +00:00
b764ff7ea3 fix: 退出登录后在受保护页面跳转到配方查询页面
Some checks failed
PR Preview / test (pull_request) Has been skipped
Deploy Production / test (push) Successful in 5s
Test / unit-test (push) Successful in 5s
PR Preview / teardown-preview (pull_request) Successful in 14s
PR Preview / deploy-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 4s
Deploy Production / deploy (push) Successful in 5s
Test / e2e-test (push) Failing after 1m14s
在 router/index.js 中为需要登录才能访问的路由(manage、inventory、
projects、mydiary、audit、bugs、users)添加 meta.requiresAuth 标记。

在 UserMenu.vue 的 handleLogout() 中检查当前路由是否需要登录,
如果是则 router.push('/') 跳回配方查询页,否则原地 reload。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 18:48:51 +00:00
86db3e1868 fix: emoji按钮缩小(13px/4px padding),工具栏不换行(nowrap)
Some checks failed
PR Preview / teardown-preview (pull_request) Successful in 13s
PR Preview / test (pull_request) Has been skipped
PR Preview / deploy-preview (pull_request) Has been skipped
Deploy Production / test (push) Successful in 5s
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
Deploy Production / deploy (push) Successful in 5s
Test / e2e-test (push) Failing after 1m26s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:38:02 +00:00
3133a2f10c fix: 手机版emoji按钮加圆角边框,与视图切换按钮风格一致
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 11s
Test / e2e-test (push) Failing after 1m22s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:36:12 +00:00
8a653b684e fix: 下架精油卡片对比度提高(opacity 0.5→0.7, 加边框)
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:35:13 +00:00
a77aecba75 fix: 手机版新增/导出按钮改为emoji,跟视图切换同行
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Has been cancelled
桌面: 显示文字按钮'+ 新增''📥 导出PDF'
手机(@media max-width:480px): 隐藏文字按钮,显示  📄 emoji按钮
搜索框min-width缩小到140px给按钮留空间

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:33:59 +00:00
f355eaac4d fix: 知识卡片第二行字号缩小+nowrap确保一行显示
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m24s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:31:49 +00:00
b69abe0fdb rewrite: 英文名统一读写 oils.en_name,三处同步
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m23s
核心设计: oils.en_name (DB) 是唯一数据源

读取链路 (全部统一):
- 精油价目: getEnglishName → oilsMeta.enName → oilEn()
- 配方卡片: getCardOilName → oilsMeta.enName → oilEn()
- 翻译编辑器: openTranslationEditor → oilsMeta.enName

写入链路 (全部写同一个字段):
- 精油价目编辑: saveEditOil → oilsStore.saveOil → oils.en_name → loadOils
- 配方卡翻译: applyTranslation → oilsStore.saveOil → oils.en_name → loadOils
- 配方名翻译: applyTranslation → PUT /api/recipes/{id} → recipes.en_name → loadRecipes

保存后:
- await Promise.all([loadOils(), loadRecipes()]) 刷新所有数据
- 下次任何地方渲染都读到最新值
- customOilNameEn 只在编辑器打开期间有效,关闭后丢弃

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:04:00 +00:00
9dbaf95839 fix: 翻译保存修复 — 去掉version检查 + 保存后重新加载数据
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m29s
根因: PUT /api/recipes/{id} 传了 version 字段导致 409 冲突
(version 不匹配时后端拒绝),但修改 en_name 不需要 version 检查

修复:
- 保存 recipe en_name 时不传 version(后端只在 version 存在时才检查)
- 保存后 loadRecipes + loadOils 刷新数据
- 下次打开配方卡片读到最新的 en_name
- 精油价目页也同步更新(loadOils 刷新 oilsMeta.enName)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:56:45 +00:00
e04d572f27 fix: 下架后卡片变灰+按钮变灰,isActive存为boolean
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 1m42s
根因: oils store 存 isActive = oil.is_active ?? true
  oil.is_active=0 时 0??true=0,但检查用 ===false,0!==false

修复: isActive = oil.is_active !== 0 (true/false boolean)

UI:
- 下架后弹窗不关闭,按钮变灰显示"✓ 已下架 · 点击重新上架"
- 卡片立即变灰(oil-chip--inactive class生效)
- 重新上架后恢复正常

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:50:26 +00:00
321b1ea585 fix: 下架改用原生fetch调试、翻译保存错误可见、手机字号加大
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m26s
下架:
- 改用原生 fetch 替代 api.post,避免抽象层干扰
- 详细错误信息: status code + response text
- 分步检查: name/meta 为空时分别提示

翻译保存:
- 失败不再静默吞掉,显示成功/失败数量
- console.error 记录具体失败原因

手机字号:
- @media(max-width:480px): 名称13px 英文9px 价格12px
- grid 最小宽度160px,间距8px

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:46:27 +00:00
73a041d9c8 fix: 字号恢复正常大小、下架改用api.post、翻译编辑器预填充
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m26s
精油价目:
- 字号恢复固定大小(14/10/13/11px),手机端@media缩小
- 不再用clamp()(之前太小)
- 下架改用 api.post 替代 api() raw fetch,更可靠
- 稀释比例/使用禁忌卡片: emoji和标题合并为一行(flex row)

翻译同步:
- 打开翻译编辑器时预填充: 读取 oilsMeta.enName → oilEn() → 填入输入框
- 用户看到当前英文名,修改后保存到 oils.en_name
- 精油价目页 getEnglishName 读同一字段,自动同步

翻译表:
- 补充 舒缓→Deep Blue 等常用精油英文名
- oilEn() 支持去掉/添加"复方"后缀匹配

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:38:04 +00:00
3912e2d122 fix: 价格字号随名称缩放、翻译表补全、编辑框全宽、下架修复
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Has been cancelled
价格字号:
- 用 clamp() 跟精油名同步缩放
- 不再硬编码 13px/11px

翻译表 (useOilTranslation):
- 补充: 舒缓→Deep Blue, 保卫→On Guard, 乐活→DigestZen 等
- oilEn() 支持模糊匹配: 去掉/添加"复方""呵护"后缀再试

编辑弹窗:
- form-input 加 width:100% + box-sizing:border-box
- 去掉 max-width:400px 限制(已在上一次提交)

下架:
- 需要重启后端才能生效(OilIn model 变更需重启 uvicorn)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:28:34 +00:00
4826c00e27 fix: 精油名不截断改用clamp缩放、下架错误提示、翻译双向同步
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m27s
精油名:
- 用 font-size:clamp() 自适应缩小,不截断不换行
- 去掉 overflow:hidden/text-overflow:ellipsis

信息不全判定:
- 缺英文名、零售价、或会员价 = 红色底色
- 下架的不算不全
- 补全后自动恢复

下架功能:
- 修复:添加详细错误信息显示
- 编辑弹窗宽度恢复到默认520px(不再限制400px)

翻译双向同步:
- 配方卡片修改翻译 → 同时保存到 oils.en_name(oilsStore.saveOil)
- 精油价目页修改英文名 → 保存到 oils.en_name
- 两处共用同一个DB字段,loadOils后自动同步
- getCardOilName fallback链:custom → oilsMeta.enName → oilEn → name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:19:18 +00:00
2a823e5bac feat: 精油价目页优化 — 名称缩放、去容量、红色底色、下架功能
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 16s
Test / e2e-test (push) Failing after 1m22s
显示优化:
- 中文名和英文名各一行,nowrap+ellipsis不换行
- 去掉📖 emoji标记
- 去掉右侧容量标签
- 划掉的零售价后面加/瓶,跟会员价一致

管理员功能:
- 信息不全的精油(缺价格/滴数/零售价)显示浅红底色
- 补全后自动恢复正常底色
- 编辑弹窗加"下架"按钮,下架后所有人看到浅灰底色
- 已下架可"重新上架"

后端:
- OilIn model 加 is_active 字段
- upsert 支持更新 is_active

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:09:52 +00:00
4d5c9874a9 fix: Logo提示语改为'卡片左下角水印',Logo清晰显示(opacity:1)
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Failing after 1m35s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 15:58:12 +00:00
0dd2cc00d3 fix: QR移到右上角(top:20 right:16),总成本缩小一行,日期与logo居中对齐
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m24s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 15:50:31 +00:00
9f25da6232 fix: Logo左下角+日期靠右,手机字号自适应,精油名不换行
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 6s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m28s
配方卡片:
- Logo: 左下角靠左对齐(flex),opacity:0.5
- 制作日期: 靠右对齐(Logo和日期同一行,space-between)
- 精油名: white-space:nowrap + text-overflow:ellipsis,不换行
- 配方名: max-width留QR空间,不换行
- 手机端(@media max-width:420px): 整体字号缩小,padding缩小

预览图:
- 同样Logo左下+日期靠右布局
- 去掉了底部居中Logo水印

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 15:36:01 +00:00
d1723797e0 rewrite: 配方卡片和预览图完全重写,匹配initial commit样式
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m43s
完全删除之前的CSS class方案,改用inline style匹配原版HTML:

配方卡片 (RecipeDetailOverlay):
- 背景图: absolute全覆盖, opacity:0.12
- Logo: absolute底部居中水印, bottom:60px, opacity:0.2
- QR: absolute右上角 top:36px right:24px, 品牌名在下方
- 内容区: position:relative z-index:2 (在overlay之上)
- 制作日期: text-align:center (居中,匹配原版)
- 所有样式用inline style,跟原版_buildBrandHtml()一致

预览图 (MyDiary):
- 等比缩小版配方卡片,同样布局
- QR右上,Logo底部居中,日期居中

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:53:13 +00:00
e459a52b5b fix: 配方卡片总成本条和底部行恢复全宽,预览与实际一致
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m21s
- card-content padding-right:80px 给QR留空间
- card-total 和 card-bottom-row 用 margin-right:-80px 抵消padding
  恢复全宽显示(总成本条和日期行不被QR挤压)
- 预览图和实际卡片布局验证一致

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:35:35 +00:00
472b554cd0 fix: 预览品牌名保留换行,配方卡片与预览布局一致
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m21s
- 预览QR文字加 white-space: pre-line 保留换行
- 配方卡片结构: QR+品牌名(absolute右上) → 内容区(padding-right避让)
  → 精油列表(每行9px间距) → 总成本(绿色条) → Logo左+日期右
- 两者布局完全一致

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:25:14 +00:00
765bc0facc fix: 配方卡片QR恢复absolute定位+padding-right避让,预览图修正
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m27s
配方卡片:
- QR恢复absolute(top:36px right:36px),不用float避免文字环绕
- card-content加padding-right:70px给QR留空间
- 文字不会被QR挤压

预览图:
- QR+品牌名放在右上角area里(absolute定位)
- 品牌名文字显示在QR图片下方
- 内容区padding-right:60px避让QR

返回配方:
- openRecipe参数用String比较修复类型不匹配

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:18:03 +00:00
2417ea2525 fix: QR改为float right自然对齐文字,不再absolute定位
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m26s
配方卡片:
- QR从.export-card的absolute定位改为.card-content内float right
- QR自然跟"来自大地的礼物"文字顶端对齐
- 右侧边缘跟内容区域对齐(不再需要手动算padding偏移)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:09:26 +00:00
4a3fadb048 fix: 预览图布局匹配实际卡片、QR对齐、返回按钮
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Failing after 1m23s
预览图(MyDiary):
- QR: top-right与内容区对齐(top:16px right:16px)
- 内容区右侧留出QR空间(padding-right:50px)
- 总成本条: flow layout不再absolute
- Logo左下 + 制作日期右下(flex space-between)
- 品牌名在最底部
- 去掉fixed height,自适应内容

配方卡片(RecipeDetailOverlay):
- QR: top:36px right:36px 精确对齐卡片padding

返回按钮:
- 保存品牌设置右侧加"← 返回配方卡片"按钮
- 从配方卡片点📲上传QR后可返回原配方

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 11:48:51 +00:00
1044873336 fix: Logo放在总成本下方靠左,QR与标题顶端/日期右侧对齐
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m42s
- Logo: 从absolute改为flow layout,放在总成本和制作日期之间
  左侧显示logo,右侧显示制作日期(flex space-between)
  没有logo时日期仍靠右
- QR: right改为36px(与卡片padding对齐),top微调到34px
  右边缘与制作日期右侧对齐

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 11:01:10 +00:00
03a112c734 fix: 上传图片保持比例、QR正方形裁剪、Logo左下角、日期靠右
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m26s
上传图片:
- object-fit: contain 保持原比例,不压扁不拉长
- QR上传检测是否正方形,非正方形提示并自动裁剪中心区域

配方卡片:
- Logo位置改为左下角 (left:24px)
- 制作日期靠右对齐 (text-align:right)

品牌预览:
- Logo位置改为左下角 (left:16px)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:40:16 +00:00
9be123e927 fix: 品牌设置tab中文化、保存提示、上传压缩优化
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m23s
- Brand → 我的品牌, Account → 我的账户
- 保存品牌设置时显示"已保存" toast
- 图片压缩: 先试PNG,超限再降JPEG质量,缩小到600px
- 上传过程中显示"正在上传..."
- 失败显示具体错误信息

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:33:11 +00:00
95368049fe fix: 登录按钮与标题顶端对齐 (align-items: flex-start)
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m24s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:28:17 +00:00
e0526f93b3 fix: 品牌设置页重写,匹配原版设计
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m27s
- 三个上传框横排(二维码/背景图/Logo),100x100虚线框
- 点击上传,有预览,有清除按钮
- 上传前自动压缩图片(QR/Logo≤500KB,背景≤1MB)
- 品牌名称+对齐方式(靠左/居中/靠右)
- 配方卡片迷你预览(280x180,展示QR/Logo/背景/品牌名效果)
- 加载时读取brand_align
- 上传失败显示具体错误
- 重置file input允许重复选择同一文件

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:24:08 +00:00
751ef9d07d fix: 配方卡片预览隐藏容量按钮
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Failing after 1m20s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:16:24 +00:00
e3285f0961 fix: 未登录用户每次提示上传QR,已登录每月一次
Some checks failed
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
PR Preview / teardown-preview (pull_request) Has been skipped
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Failing after 1m26s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:12:53 +00:00
1018c1db11 fix: QR上传提醒改为每月一次,按钮始终显示
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
Test / e2e-test (push) Has been cancelled
PR Preview / deploy-preview (pull_request) Successful in 15s
- 用 localStorage 记录上次弹窗时间,30天内不再弹
- 📲 上传二维码按钮始终显示(只要用户没上传QR)
- 弹窗取消按钮文案改为「下次再说」

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:12:30 +00:00
5b5b73bba8 fix: 保存图片一次点击即弹分享面板
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m20s
根因: navigator.share 需要在用户手势同步上下文中调用。
之前点保存→html2canvas截图(异步)→share(手势已过期),失败。

修复: 打开 modal 时预生成图片(watch showDilution/showContra,
openOilDetail里预生成),点保存按钮时 dataUrl 已缓存,
navigator.share 在用户手势上下文内直接调用,一次即弹分享面板。

保存按钮放回卡片内部。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:52:33 +00:00
5d8f1f1e1f fix: 保存按钮移到卡片外面,截图时不包含按钮
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 1m16s
配方卡片能正常弹分享面板是因为按钮不在截图区域内。
现在稀释比例/使用禁忌/知识卡的保存按钮也移到 modal-overlay
层级(卡片 div 外面),html2canvas 截图时不会受按钮影响。
generateImageFromRef 也不再需要隐藏/恢复按钮的逻辑。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:45:25 +00:00