Merge branch 'develop' into feature/custom_filters

This commit is contained in:
vabene1111
2022-02-18 17:25:15 +01:00
committed by GitHub
7 changed files with 44 additions and 24 deletions

View File

@@ -656,8 +656,8 @@ export default {
},
warnPageLeave: function (event) {
if (this.recipe_changed) {
event.returnValue = ""
return ""
event.returnValue = "this_string_cant_be_empty_because_of_firefox"
return "this_string_cant_be_empty_because_of_firefox"
}
},
loadRecipe: function () {
@@ -672,8 +672,8 @@ export default {
// set default visibility style for each component of the step
this.recipe.steps.forEach((s) => {
this.$set(s, "time_visible", s.time !== 0)
this.$set(s, "ingredients_visible", s.ingredients.length > 0)
this.$set(s, "instruction_visible", s.instruction !== "")
this.$set(s, "ingredients_visible", s.ingredients.length > 0 || this.recipe.steps.length === 1)
this.$set(s, "instruction_visible", s.instruction !== "" || this.recipe.steps.length === 1)
this.$set(s, "step_recipe_visible", s.step_recipe !== null)
this.$set(s, "file_visible", s.file !== null)
})

View File

@@ -32,15 +32,16 @@
<div class="row">
<!-- ingredients table -->
<div class="col col-md-4" v-if="step.ingredients.length > 0 && (recipe.steps.length > 1 || force_ingredients)">
<table class="table table-sm" >
<div class="col col-md-4"
v-if="step.ingredients.length > 0 && (recipe.steps.length > 1 || force_ingredients)">
<table class="table table-sm">
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor"
@checked-state-changed="$emit('checked-state-changed', $event)"/>
</table>
</div>
<div class="col"
:class="{ 'col-md-8': recipe.steps.length > 1, 'col-md-12': recipe.steps.length <= 1 }">
:class="{ 'col-md-8 col-12': recipe.steps.length > 1, 'col-md-12 col-12': recipe.steps.length <= 1 }">
<!-- step text -->
<div class="row">
<div class="col col-md-12">