feat: Header重排、共享配方到公共库、待审核配方、权限优化 #17

Merged
fam merged 39 commits from fix/ui-polish-round2 into main 2026-04-09 18:37:12 +00:00
Owner

改动

Header

  • 登录按钮固定右侧,flex布局适配所有屏幕
  • 登录后不显示版本号
  • 商业认证用户显示🏢标识
  • 手机端响应式

配方共享

  • 个人配方卡片加📤共享按钮
  • 非管理员提交需审核

管理配方

  • 待审核栏动态计算
  • 采纳/删除操作
  • senior_editor可编辑精油和公共配方

🤖 Generated with Claude Code

## 改动 ### Header - 登录按钮固定右侧,flex布局适配所有屏幕 - 登录后不显示版本号 - 商业认证用户显示🏢标识 - 手机端响应式 ### 配方共享 - 个人配方卡片加📤共享按钮 - 非管理员提交需审核 ### 管理配方 - 待审核栏动态计算 - 采纳/删除操作 - senior_editor可编辑精油和公共配方 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hera added 1 commit 2026-04-09 08:24:42 +00:00
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
3a65cb7209
Header:
- 登录按钮固定右侧,flex布局自适应所有屏幕
- 登录后不显示版本号,用户名在右侧
- 商业认证用户显示🏢标识
- 手机端响应式适配

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

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

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 08:58:56 +00:00
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
029071dbab
- 新增 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:04:14 +00:00
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
fc16436ebd
之前用 querySelector 找 modal 内元素,选择器匹配失败导致
手机端没有触发 navigator.share。现在用 Vue ref 直接引用
卡片 DOM 元素,传给 captureAndSave。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:08:25 +00:00
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
26a47aaf23
navigator.share 在部分手机浏览器不可用时,改为弹出全屏图片
让用户长按保存到相册。三层 fallback:
1. navigator.share({files}) → 系统分享面板
2. 图片弹窗 → 长按保存(手机通用)
3. 下载链接(桌面)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:17:58 +00:00
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
50756528ee
html2canvas截图→dataUrl→saveImageFromUrl,跟配方卡片saveImage一模一样。
不再用captureAndSave封装。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:23:19 +00:00
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
309dee9848
- html2canvas 参数: backgroundColor=null, scale=3, allowTaint=false
  (与 RecipeDetailOverlay.generateCardImage 完全一致)
- useSaveImage 精简为只有 share + download 两条路径
- 截图失败时显示具体错误信息便于调试

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:40:29 +00:00
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
2469f15656
完全复制 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:45:28 +00:00
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
5d8f1f1e1f
配方卡片能正常弹分享面板是因为按钮不在截图区域内。
现在稀释比例/使用禁忌/知识卡的保存按钮也移到 modal-overlay
层级(卡片 div 外面),html2canvas 截图时不会受按钮影响。
generateImageFromRef 也不再需要隐藏/恢复按钮的逻辑。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 09:52:36 +00:00
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
5b5b73bba8
根因: navigator.share 需要在用户手势同步上下文中调用。
之前点保存→html2canvas截图(异步)→share(手势已过期),失败。

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

保存按钮放回卡片内部。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 10:12:33 +00:00
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
1018c1db11
- 用 localStorage 记录上次弹窗时间,30天内不再弹
- 📲 上传二维码按钮始终显示(只要用户没上传QR)
- 弹窗取消按钮文案改为「下次再说」

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hera added 1 commit 2026-04-09 10:12:54 +00:00
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
e3285f0961
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 10:16:27 +00:00
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
751ef9d07d
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 10:24:10 +00:00
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
e0526f93b3
- 三个上传框横排(二维码/背景图/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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 10:28:19 +00:00
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
95368049fe
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 10:33:14 +00:00
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
9be123e927
- Brand → 我的品牌, Account → 我的账户
- 保存品牌设置时显示"已保存" toast
- 图片压缩: 先试PNG,超限再降JPEG质量,缩小到600px
- 上传过程中显示"正在上传..."
- 失败显示具体错误信息

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 10:40:18 +00:00
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
03a112c734
上传图片:
- 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 11:01:11 +00:00
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
1044873336
- 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 11:48:54 +00:00
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
4a3fadb048
预览图(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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 12:09:29 +00:00
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
2417ea2525
配方卡片:
- QR从.export-card的absolute定位改为.card-content内float right
- QR自然跟"来自大地的礼物"文字顶端对齐
- 右侧边缘跟内容区域对齐(不再需要手动算padding偏移)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 12:18:05 +00:00
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
765bc0facc
配方卡片:
- 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 12:25:16 +00:00
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
472b554cd0
- 预览QR文字加 white-space: pre-line 保留换行
- 配方卡片结构: QR+品牌名(absolute右上) → 内容区(padding-right避让)
  → 精油列表(每行9px间距) → 总成本(绿色条) → Logo左+日期右
- 两者布局完全一致

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 12:35:37 +00:00
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
e459a52b5b
- 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 12:53:15 +00:00
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
d1723797e0
完全删除之前的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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 15:36:04 +00:00
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
9f25da6232
配方卡片:
- 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 15:50:32 +00:00
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
0dd2cc00d3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 15:58:16 +00:00
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
4d5c9874a9
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:09:55 +00:00
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
2a823e5bac
显示优化:
- 中文名和英文名各一行,nowrap+ellipsis不换行
- 去掉📖 emoji标记
- 去掉右侧容量标签
- 划掉的零售价后面加/瓶,跟会员价一致

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

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

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:19:20 +00:00
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
4826c00e27
精油名:
- 用 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:28:38 +00:00
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
3912e2d122
价格字号:
- 用 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:38:07 +00:00
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
73a041d9c8
精油价目:
- 字号恢复固定大小(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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:46:30 +00:00
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
321b1ea585
下架:
- 改用原生 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:50:28 +00:00
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
e04d572f27
根因: 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 16:56:47 +00:00
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
9dbaf95839
根因: 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 17:04:02 +00:00
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
b69abe0fdb
核心设计: 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>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 17:31:52 +00:00
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
f355eaac4d
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 17:34:01 +00:00
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
a77aecba75
桌面: 显示文字按钮'+ 新增''📥 导出PDF'
手机(@media max-width:480px): 隐藏文字按钮,显示  📄 emoji按钮
搜索框min-width缩小到140px给按钮留空间

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 17:35:16 +00:00
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
8a653b684e
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 17:36:14 +00:00
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
3133a2f10c
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
hera added 1 commit 2026-04-09 17:38:05 +00:00
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
86db3e1868
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

🚀 Preview: https://pr-17.oil.oci.euphon.net

DB is a copy of production.

🚀 **Preview**: https://pr-17.oil.oci.euphon.net DB is a copy of production.
fam approved these changes 2026-04-09 17:39:45 +00:00
fam merged commit 86db3e1868 into main 2026-04-09 18:37:12 +00:00
Author
Owner

🗑️ Preview torn down.

🗑️ Preview torn down.
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hera/oil-formula-calculator#17