diff --git a/frontend/src/composables/useOilTranslation.js b/frontend/src/composables/useOilTranslation.js index 0cdcaea..8a12960 100644 --- a/frontend/src/composables/useOilTranslation.js +++ b/frontend/src/composables/useOilTranslation.js @@ -14,14 +14,27 @@ const OIL_EN = { '柠檬草': 'Lemongrass', '杜松浆果': 'Juniper Berry', '甜橙': 'Wild Orange', '香茅': 'Citronella', '薄荷': 'Peppermint', '扁柏': 'Arborvitae', '古巴香脂': 'Copaiba', '椰子油': 'Coconut Oil', - '芳香调理': 'AromaTouch', '保卫复方': 'On Guard', - '乐活复方': 'Balance', '舒缓复方': 'Past Tense', - '净化复方': 'Purify', '呼吸复方': 'Breathe', - '舒压复方': 'Adaptiv', '多特瑞': 'doTERRA', + '芳香调理': 'AromaTouch', '保卫复方': 'On Guard', '保卫': 'On Guard', + '乐活复方': 'Balance', '乐活': 'DigestZen', + '舒缓复方': 'Past Tense', '舒缓': 'Deep Blue', + '净化复方': 'Purify', '净化清新': 'Purify', + '呼吸复方': 'Breathe', '顺畅呼吸': 'Breathe', + '舒压复方': 'Adaptiv', '安定情绪': 'Balance', + '安宁神气': 'Serenity', '多特瑞': 'doTERRA', + '野橘': 'Wild Orange', '柑橘清新': 'Citrus Bliss', + '新瑞活力': 'MetaPWR', '元气': 'Zendocrine', + '温柔呵护': 'ClaryCalm', '西洋蓍草': 'Yarrow|Pom', + '西班牙牛至': 'Oregano', } export function oilEn(name) { - return OIL_EN[name] || '' + if (OIL_EN[name]) return OIL_EN[name] + // Try without common suffixes + const base = name.replace(/复方$|呵护$/, '') + if (base !== name && OIL_EN[base]) return OIL_EN[base] + // Try adding suffixes + if (OIL_EN[name + '复方']) return OIL_EN[name + '复方'] + return '' } export function recipeNameEn(name) { diff --git a/frontend/src/views/OilReference.vue b/frontend/src/views/OilReference.vue index e5ec392..bda5bff 100644 --- a/frontend/src/views/OilReference.vue +++ b/frontend/src/views/OilReference.vue @@ -134,16 +134,12 @@
@@ -1045,10 +1041,12 @@ async function saveCardImage(name) { .form-input { flex: 1; + width: 100%; min-width: 100px; padding: 8px 12px; border: 1.5px solid var(--border, #e0d4c0); border-radius: 8px; + box-sizing: border-box; font-size: 13px; font-family: inherit; outline: none; @@ -1218,6 +1216,23 @@ async function saveCardImage(name) { color: var(--text-light); white-space: nowrap; } +.oil-price-line { + font-size: clamp(10px, 2.2vw, 13px); + color: var(--sage-dark); + font-weight: 600; + white-space: nowrap; +} +.oil-price-unit { + font-size: clamp(8px, 1.6vw, 10px); + font-weight: 400; + color: var(--text-light); +} +.oil-retail-line { + font-size: clamp(8px, 1.6vw, 11px); + color: var(--text-light); + text-decoration: line-through; + white-space: nowrap; +} .oil-chip-actions { position: absolute;