1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

Fix/multiple bug fixes (#1015)

* test-case for #1011

* revert regressions for #1011

* update cache key on new image

* lint

* fix #1012

* typing

* random_recipe fixture

* remove delete button when no listeners are present

* spacing

* update copy to match settings value
This commit is contained in:
Hayden 2022-02-27 12:48:21 -09:00 committed by GitHub
parent 6a5fd8e4f8
commit 568a1a0015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 112 additions and 18 deletions

View file

@ -21,7 +21,13 @@
type="number"
placeholder="Quantity"
>
<v-icon slot="prepend" class="mr-n1" color="error" @click="$emit('delete')">
<v-icon
v-if="$listeners && $listeners.delete"
slot="prepend"
class="mr-n1"
color="error"
@click="$emit('delete')"
>
{{ $globals.icons.delete }}
</v-icon>
</v-text-field>

View file

@ -180,7 +180,7 @@
import draggable from "vuedraggable";
// @ts-ignore vue-markdown has no types
import VueMarkdown from "@adapttive/vue-markdown";
import { ref, toRefs, reactive, defineComponent, watch, onMounted } from "@nuxtjs/composition-api";
import { ref, toRefs, reactive, defineComponent, watch, onMounted, watchEffect } from "@nuxtjs/composition-api";
import { RecipeStep, IngredientReferences, RecipeIngredient } from "~/types/api-types/recipe";
import { parseIngredientText } from "~/composables/recipes";
import { uuid4 } from "~/composables/use-utils";
@ -247,8 +247,9 @@ export default defineComponent({
// ===============================================================
// UI State Helpers
function validateTitle(title: string | undefined) {
return !(title === null || title === "");
return !(title === null || title === "" || title === undefined);
}
watch(props.value, (v) => {
@ -267,6 +268,8 @@ export default defineComponent({
if (element.id !== undefined) {
showTitleEditor.value[element.id] = validateTitle(element.title);
}
showTitleEditor.value = { ...showTitleEditor.value };
});
});
@ -283,17 +286,20 @@ export default defineComponent({
state.disabledSteps.push(stepIndex);
}
}
function isChecked(stepIndex: number) {
if (state.disabledSteps.includes(stepIndex) && !props.edit) {
return "disabled-card";
}
}
function toggleShowTitle(id: string) {
showTitleEditor.value[id] = !showTitleEditor.value[id];
const temp = { ...showTitleEditor.value };
showTitleEditor.value = temp;
}
function updateIndex(data: RecipeStep) {
context.emit("input", data);
}
@ -475,4 +481,3 @@ export default defineComponent({
background: none;
}
</style>

View file

@ -16,15 +16,14 @@
confidence score is displayed on the right of the title item. This is an average of all scores and may not be
wholey accurate.
<div class="mt-6">
<div class="my-4">
Alerts will be displayed if a matching foods or unit is found but does not exists in the database.
</div>
<v-divider class="my-4"> </v-divider>
<div class="mb-n4">
Select Parser
<div class="d-flex align-center mb-n4">
<div class="mb-4">Select Parser</div>
<BaseOverflowButton
v-model="parser"
btn-class="mx-2"
btn-class="mx-2 mb-4"
:items="[
{
text: 'Natural Language Processor ',
@ -270,4 +269,3 @@ export default defineComponent({
},
});
</script>

View file

@ -60,13 +60,13 @@
<v-checkbox
v-model="group.preferences.recipeDisableComments"
class="mt-n4"
label="Allow recipe comments from users in your group"
label="Disable users from commenting on recipes"
@change="groupActions.updatePreferences()"
></v-checkbox>
<v-checkbox
v-model="group.preferences.recipeDisableAmount"
class="mt-n4"
label="Enable organizing recipe ingredients by units and food"
label="Disable organizing recipe ingredients by units and food"
@change="groupActions.updatePreferences()"
></v-checkbox>
</section>