diff --git a/src/components/MealCard.vue b/src/components/MealCard.vue index 157abed..3c6d613 100644 --- a/src/components/MealCard.vue +++ b/src/components/MealCard.vue @@ -56,7 +56,7 @@ const isOpen = ref(props.defaultOpen) const slots = [ { id: 'colazione', label: 'Colazione', icon: 'β˜€οΈ' }, - { id: 'pranzo', label: 'Pranzo', icon: '🌀️' }, + { id: 'pranzo', label: 'Pranzo', icon: '🍽️' }, { id: 'cena', label: 'Cena', icon: 'πŸŒ™' }, ] diff --git a/src/pages/Converter.vue b/src/pages/Converter.vue index 548f9cf..7c33691 100644 --- a/src/pages/Converter.vue +++ b/src/pages/Converter.vue @@ -1,67 +1,101 @@ @@ -106,7 +140,7 @@ function onSearch() { function selectItem(r) { selected.value = r - query.value = `${r.food} β€” ${r.method}` + query.value = '' results.value = [] grams.value = null } @@ -116,19 +150,43 @@ function reset() { query.value = '' results.value = [] grams.value = null + direction.value = 'rawToCooked' +} + +function swapDirection() { + direction.value = direction.value === 'rawToCooked' ? 'cookedToRaw' : 'rawToCooked' + grams.value = null } diff --git a/src/pages/MealPlanner.vue b/src/pages/MealPlanner.vue index c9ddbac..f622554 100644 --- a/src/pages/MealPlanner.vue +++ b/src/pages/MealPlanner.vue @@ -1,8 +1,8 @@