fix: 保存配方卡片所有英文翻译(含精油名称) #16
Reference in New Issue
Block a user
Delete Branch "fix/save-oil-translations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
点击「应用」保存翻译后,下次打开配方卡片精油的英文名会重置回默认值,因为只有
en_name(配方名)被持久化了,精油名称的自定义翻译(customOilNameEn)只存在内存里。修复
recipes表新增en_oils列(存 JSON 字符串)RecipeUpdate增加en_oils字段;update_recipe写入 DB;所有 SELECT 和_recipe_to_dict补上该字段en_oilsapplyTranslation()同时提交en_oils;onMounted优先从r.en_oils还原,再 fallback 静态翻译表Closes #15
将 handleLogout 里的 window.location.reload() 改为 router.push('/'), 确保在任何需要登录的页面退出后都能回到配方查询页面。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>🚀 Preview: https://pr-16.oil.oci.euphon.net
DB is a copy of production.
🗑️ Preview torn down.
Pull request closed