Commit Graph

184 Commits

Author SHA1 Message Date
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
2469f15656 rewrite: 精油价目页保存图片逻辑完全照搬配方卡片
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 53s
完全复制 RecipeDetailOverlay 的模式:
1. import html2canvas at top level (not dynamic)
2. ref 存预生成的 imageUrl (dilutionImageUrl, contraImageUrl, oilCardImageUrl)
3. generateImageFromRef: html2canvas截图→dataUrl存入ref
   参数: backgroundColor=null, scale=3, useCORS=true, allowTaint=false
4. saveGeneratedImage: 如果没截图先生成,然后调 saveImageFromUrl
5. saveImageFromUrl: navigator.share({files}) → 系统分享面板

跟 RecipeDetailOverlay.saveImage 每一步都一样。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:40:28 +00:00
309dee9848 fix: 知识卡保存图片参数与配方卡完全一致,去掉长按fallback
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
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 53s
- html2canvas 参数: backgroundColor=null, scale=3, allowTaint=false
  (与 RecipeDetailOverlay.generateCardImage 完全一致)
- useSaveImage 精简为只有 share + download 两条路径
- 截图失败时显示具体错误信息便于调试

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:23:18 +00:00
50756528ee 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) Failing after 53s
html2canvas截图→dataUrl→saveImageFromUrl,跟配方卡片saveImage一模一样。
不再用captureAndSave封装。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:17:55 +00:00
26a47aaf23 fix: 手机保存图片加长按保存 fallback
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 53s
navigator.share 在部分手机浏览器不可用时,改为弹出全屏图片
让用户长按保存到相册。三层 fallback:
1. navigator.share({files}) → 系统分享面板
2. 图片弹窗 → 长按保存(手机通用)
3. 下载链接(桌面)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:08:22 +00:00
fc16436ebd fix: 稀释比例/使用禁忌保存图片改用 ref 直接定位元素
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 54s
之前用 querySelector 找 modal 内元素,选择器匹配失败导致
手机端没有触发 navigator.share。现在用 Vue ref 直接引用
卡片 DOM 元素,传给 captureAndSave。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 09:04:11 +00:00
029071dbab fix: 手机保存图片使用 navigator.share 直接保存到相册
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 52s
- 新增 composables/useSaveImage.js
  - saveImageFromUrl: data URL → 手机分享/桌面下载
  - captureAndSave: DOM元素 → html2canvas → 保存
  - saveCanvasImage: canvas → 保存
- RecipeDetailOverlay: saveImage 改用 saveImageFromUrl
- OilReference: saveModalImage 改用 captureAndSave
- 手机端调用 navigator.share({files}) 弹出系统分享面板

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 08:58:53 +00:00
3a65cb7209 feat: header重排、共享配方、待审核、权限优化
Some checks failed
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / e2e-test (push) Failing after 54s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 15s
Header:
- 登录按钮固定右侧,flex布局自适应所有屏幕
- 登录后不显示版本号,用户名在右侧
- 商业认证用户显示🏢标识
- 手机端响应式适配

配方共享:
- 个人配方卡片加📤共享按钮
- 提交到公共库,非管理员需审核

管理配方:
- 待审核栏从recipes动态计算(不依赖不存在的API)
- 采纳用/adopt端点,拒绝=确认删除
- senior_editor可编辑精油和公共配方

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 08:24:28 +00:00
3d95db6cae Merge pull request 'feat: 配方卡片加入上传个人二维码功能' (#5) from feature/qr-upload-hint into main
Some checks failed
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 6s
Test / e2e-test (push) Failing after 1m22s
Reviewed-on: #5
2026-04-08 22:09:30 +00:00
4e0039d5ad UI: 知识卡片宽度收窄(380px),使用方式按钮选中态更醒目
Some checks failed
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 3s
Test / e2e-test (push) Failing after 1m27s
PR Preview / test (pull_request) Has been skipped
PR Preview / teardown-preview (pull_request) Successful in 14s
PR Preview / deploy-preview (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:59:38 +00:00
f580aa3eee 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 1m23s
知识卡片编辑:
- 填写功效后自动生成 emoji(关键词匹配)
- 使用方式改为三按钮点选(香薰/内用/涂抹)
- 保存后立即生成卡片,📖标记即时出现

稀释比例/使用禁忌:
- 匹配原版设计(绿色/橙色渐变头部)
- 都加了保存图片按钮(html2canvas)

精油知识卡:
- 加了保存图片按钮

UI优化:
- 新增精油框加了零售价,隐藏数字输入加减按钮
- 搜索栏: 每瓶价/每滴价(替代会员价/滴价)
- 新增按钮可展开/收起
- 植物空胶囊显示160颗
- 编辑弹窗精油名称可修改

PDF导出:
- 标题含日期,去掉副标题
- 英文名列标题格式统一
- 去掉滴数列

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:55:28 +00:00
2983036388 feat: 区分我的配方(diary)和公共配方库(recipes)
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 1m19s
配方查询页:
- 我的配方 → /api/diary (user_diary表),左绿色边框区分
- 收藏配方 → 收藏的公共配方
- 公共配方库 → /api/recipes (recipes表),所有公共配方
- 搜索同时过滤个人和公共配方

管理配方页:
- 我的配方 → diary store,支持搜索/标签过滤
- 公共配方库 → 所有公共配方,所有用户可见
- 管理员创建的公共配方不再误归为"我的配方"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 20:45:05 +00:00
0c19153156 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 1m23s
- 区分「取消」(null) 和「清空名称后确认」(空字符串) 两种情况
  前者静默返回,后者提示「请输入配方名称」
- 添加 console.log/error 方便在浏览器控制台定位问题
- 成功 toast 改为「已保存!可在「配方查询 → 我的配方」查看」提示去向
- 错误 toast 延长至 3s,并显示 status code
- saveRecipe:loadRecipes 失败不再抛出,保证保存成功后不误报失败

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 20:27:03 +00:00
66766197a4 fix: 输入框 Enter 键忽略 IME 输入法合字阶段,防止误触提交
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 13s
Test / e2e-test (push) Failing after 1m25s
中文输入法在选字时按回车,会触发 keydown.enter 事件,
但此时 v-model 尚未更新(组合阶段未结束),导致
inputValue 仍为空字符串,造成 saveToDiary 的 if (!name) return
分支被触发,配方从未保存,「我的配方」中自然看不到。

修复方案:
- 监听 compositionstart / compositionend 事件,
  用 isComposing 标记组合状态
- compositionend 时手动同步 inputValue(确保值最新)
- submitPrompt 检查 e.isComposing || isComposing.value,
  任一为真则跳过提交,等用户真正按下独立 Enter 再确认

Co-Authored-By: YoYo <yoyo@euphon.net>
2026-04-08 20:07:13 +00:00
31b46d59b6 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 13s
Test / e2e-test (push) Failing after 1m20s
1. 配方卡片视图加回容量切换按钮(单次/2.5ml/5ml…),
   非单次容量的滴数通过 Math.round 取整显示
2. 编辑器「预览」按钮改为展示当前未保存数据;
   预览后点关闭询问是否保存;
   直接点「保存」后留在配方卡片视图(不再关闭弹层)
3. 添加精油改为搜索输入框 + 下拉自动补全,
   支持中文名和英文名筛选
4. 精油价目:添加/编辑表单加入英文名字段;
   编辑/删除按钮改为悬停(桌面)或点击(移动端)才显示;
   后端及数据库同步支持 oils.en_name
2026-04-08 20:03:14 +00:00
cc79ae1211 fix: 存为我的改写入 recipes 表,确保在「我的配方」和「管理配方」中显示
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 1m23s
之前 saveToDiary() 调用 POST /api/diary,数据写入 user_diary 表,
只在「我的配方日记」(/mydiary) 中可见。
改为调用 recipesStore.saveRecipe(),写入 recipes 表并以当前用户为 owner,
GET /api/recipes 会返回该用户自己创建的配方,
RecipeSearch 的「我的配方」预览和 RecipeManager 的配方列表均可显示。

Co-Authored-By: YoYo <yoyo@euphon.net>
2026-04-08 19:56:36 +00:00
dcf516f2de fix: 移除所有权限身份显示,QR上传布局还原为initial commit样式
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 1m19s
2026-04-08 19:47:24 +00:00
c8de1ad229 fix: 退出登录后跳转到配方查询页面
将 handleLogout 里的 window.location.reload() 改为 router.push('/'),
确保在任何需要登录的页面退出后都能回到配方查询页面。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 19:47:24 +00:00
533cd2a0bd 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 5s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 1m21s
Co-Authored-By: YoYo <yoyo@euphon.net>
2026-04-08 19:41:04 +00:00
de74ffe638 fix: 配方卡片品牌样式与 initial commit 保持一致
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 1m16s
- 背景图改用 div+background-image,opacity 从 0.06 恢复为 0.12
- 二维码位置改回 top:36px/right:24px,尺寸 54×54,加圆角和阴影
- 二维码下方新增品牌名称小字(7px)
- Logo 位置改回 bottom:60px,尺寸 height:60px,opacity 0.2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 07:42:47 +00:00
4761253d73 fix: 存为我的改用自定义 showPrompt,与主分支保持一致
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 1m18s
将 saveToDiary 中的原生 prompt() 替换为项目内置的
showPrompt(),使对话框样式与主分支及全站风格保持一致。

Co-Authored-By: YoYo <yoyo@euphon.net>
2026-04-07 23:09:29 +00:00
65239abc53 QR upload: replace inline hint with dialog, add back button in brand page
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 12s
Test / e2e-test (push) Failing after 1m21s
- Replace the inline brand-upload-hint bar in RecipeDetailOverlay with a
  confirm dialog (「去上传」/「取消」) that pops up when the card opens
- Extend useDialog/CustomDialog to support custom ok/cancel button text
- Add a 「← 返回配方卡片」banner in MyDiary brand tab when navigated
  from a recipe card, allowing return without uploading

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 22:55:39 +00:00
19f4ab8abe fix: 顶部导航栏sticky修正、右上角显示角色身份、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 4s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Has been cancelled
- 预览环境下nav-tabs top偏移36px,避免被orange banner遮挡
- 登录用户名旁显示角色身份(查看者/编辑/管理员等)
- 账户页角色改用绿色渐变徽章样式,对齐UserMenu风格
- QR图片上传区改为120x120居中方形,预览样式与二维码链接预览一致

Closes #9 (part: items 1-3, accumulated to PR #5)

Co-Authored-By: YoYo <yoyo@euphon.net>
2026-04-07 22:54:45 +00:00
96504ed1d7 Resume pending action after login (favorite, diary, QR upload)
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 13s
Test / e2e-test (push) Failing after 1m4s
Add pendingAction callback to UI store. When user clicks favorite,
save-to-diary, or upload QR while not logged in, the action is stored
and automatically executed after successful login/register instead of
reloading the page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:39:59 +00:00
5eba04a1fa Fix toast rendering: display toast.msg instead of object
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 12s
Test / e2e-test (push) Failing after 1m7s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:35:41 +00:00
4d5e3c46e7 Shorten copy toast to just '已复制'
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) Failing after 1m4s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:34:07 +00:00
3bbe437616 Remove volume selector from recipe card view
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 12s
Test / e2e-test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:33:16 +00:00
edc053ae0e Raise toast z-index to 9000 so it shows above all overlays
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 13s
Test / e2e-test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:32:42 +00:00
b9681141af Fix LoginModal z-index to 6000 so it appears above recipe overlay
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 1m4s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:28:17 +00:00
dee4b1649a 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 12s
Test / e2e-test (push) Has been cancelled
- VOLUME_DROPS 新增「单次」(null,不缩放)
- 新增 scaleIngredients() 按比例缩放成分
- 卡片预览区加入容量切换按钮,切换后实时更新滴数与成本
- priceInfo 与 coconutDrops 均基于缩放后数据

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 22:27:21 +00:00
955512d344 feat: 未登录用户也显示二维码上传提示,点击时引导登录/注册
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
PR Preview / test (pull_request) Successful in 4s
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 12s
Test / e2e-test (push) Failing after 1m8s
2026-04-07 22:25:10 +00:00
81ec5987b3 feat: 配方卡片加入上传个人二维码功能
- RecipeDetailOverlay: 未上传二维码/背景图时,卡片上方显示提示横幅,下方出现「上传我的二维码」按钮,点击跳转到 MyDiary 品牌设置页并记录来源配方
- MyDiary: 新增二维码图片上传区域(直接上传图片文件,存为 base64 → PUT /api/brand qr_code 字段);上传成功后若有待返回配方则自动跳回配方卡片;修复 loadBrandSettings 字段名与后端不一致的问题
- RecipeSearch: 支持 ?openRecipe= 查询参数,页面挂载时自动打开指定配方卡片,实现从 MyDiary 上传后无缝返回

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 22:25:10 +00:00
70413971e3 Merge pull request 'dev' (#2) from dev into main
Some checks failed
Deploy Production / test (push) Successful in 5s
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
Deploy Production / deploy (push) Successful in 5s
Test / e2e-test (push) Failing after 1m7s
Reviewed-on: #2
2026-04-07 22:12:00 +00:00
6804835e85 Persist recipe English name translation to database
Some checks failed
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
Test / e2e-test (push) Failing after 1m7s
PR Preview / test (pull_request) Has been skipped
PR Preview / teardown-preview (pull_request) Successful in 14s
PR Preview / deploy-preview (pull_request) Has been skipped
- Add en_name column to recipes table (migration in database.py)
- Include en_name in recipe API responses and RecipeUpdate model
- Save en_name when admin/senior_editor applies translation
- Load en_name on overlay open, so translation persists across sessions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:08:05 +00:00
2088019ed7 Fix overlay: always show buttons, restrict translation, fix save data
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 1m5s
- Always show favorite/save-to-diary buttons (login check on click)
- Restrict translation editor to senior_editor/admin only (canManage)
- Fix save: map ingredient oil→oil_name for API, reload recipes after
- Ensures next open shows the saved data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:59:41 +00:00
86be739667 Fix card overlay: scrollable buttons, doTERRA casing, English text
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 27s
Test / e2e-test (push) Failing after 1m4s
- Move action buttons (favorite, save-to-diary) inside card view so
  they scroll with content instead of sticking at top
- Remove text-transform:uppercase so doTERRA renders correctly
- Fix English dilution text to match main branch (bottle vs single-use)
- Add close button to editor view header

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:50:07 +00:00
4655040153 Fix recipe detail overlay: layout, buttons, price columns
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 12s
Test / e2e-test (push) Failing after 1m7s
- Remove "卡片预览" tab text, use top bar with action buttons
- Move language toggle (中文/English) to top of card view
- Fix favorite button: check recipe _id before toggling
- Fix save-to-diary: match API fields (name, source_recipe_id)
- Use custom translations in card rendering (getCardOilName/getCardRecipeName)
- Swap price columns: cost first, retail strikethrough after
- Add retail strikethrough price in total cost bar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:41:49 +00:00
d68f5b35ee Rewrite RecipeDetailOverlay to match main branch layout
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 1m5s
Card view: branded recipe card image (html2canvas), language toggle,
save image, copy text, favorite, save to diary, translation editor.
Editor view: volume/dilution controls, ingredient table with add row,
tag management with candidates, notes, total cost.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:30:34 +00:00
cd833a6232 Add confirm password field on registration
All checks were successful
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 13s
Test / e2e-test (push) Successful in 56s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:13:27 +00:00
43f57c55f5 Hash passwords with PBKDF2-SHA256 instead of storing plaintext
All checks were successful
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) Successful in 53s
Existing plaintext passwords are auto-upgraded to hashed on next login.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:11:44 +00:00
f89cfff20b Fix E2E tests to match restored modal overlay UI
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 18s
Test / e2e-test (push) Successful in 1m1s
The recipe detail was reverted to modal with tabs (卡片预览/编辑),
so tests now click the 编辑 tab before checking for editor elements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 20:51:27 +00:00
6563a6f7d2 Grant senior_editor oil editing, PDF export, and public recipe management
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 20s
Test / e2e-test (push) Failing after 1m2s
Add canManage computed (senior_editor + admin) to auth store and use it
for oil edit/delete buttons, PDF export, and public recipe section
visibility. Backend already allowed these operations for senior_editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 11:59:49 +00:00