diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index bc784bc..d28c917 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -42,7 +42,7 @@ - + @@ -443,7 +443,13 @@ const formCustomVolume = ref(null) const formCustomUnit = ref('drops') const formDilution = ref(6) -const formCocoRow = ref({ oil: '椰子油', drops: 10, _search: '椰子油', _open: false }) +const formCocoRow = ref(null) + +watch(() => formVolume.value, (vol) => { + if (vol && !formCocoRow.value) { + formCocoRow.value = { oil: '椰子油', drops: vol === 'single' ? 10 : 0, _search: '椰子油', _open: false } + } +}) // EO ingredients (everything except coconut) const formEoIngredients = computed(() => @@ -562,6 +568,15 @@ async function deleteGlobalTag(tag) { } } +function toggleTagFilter() { + if (showTagFilter.value) { + showTagFilter.value = false + selectedTags.value = [] + } else { + showTagFilter.value = true + } +} + function toggleTag(tag) { const idx = selectedTags.value.indexOf(tag) if (idx >= 0) selectedTags.value.splice(idx, 1)