App Bar Rewrite (#347)

* Dummy Commit

* consolidate sidebar and app bar

* fix image error

* consolidate sidebar

* new icon for user menu

* fixes #329

* fix double click on mobile

* swap to computed properties

* fix open/close bug

* rewrite search for mobile

* fix ingredient checkbox

* cleanup console.logs

* set default lang + bump version

* draft changelog

* reword

* update env variables

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-04-25 13:47:08 -08:00
committed by GitHub
parent 7e6f3c9310
commit d5a340bde1
26 changed files with 384 additions and 370 deletions

View File

@@ -3,23 +3,22 @@
<h2 class="mb-4">{{ $t("recipe.ingredients") }}</h2>
<v-list-item
dense
v-for="(ingredient, index) in displayIngredients"
v-for="(ingredient, index) in ingredients"
:key="generateKey('ingredient', index)"
@click="ingredient.checked = !ingredient.checked"
@click="toggleChecked(index)"
>
<v-checkbox
hide-details
v-model="ingredient.checked"
:value="checked[index]"
class="pt-0 my-auto py-auto"
color="secondary"
:readonly="true"
>
</v-checkbox>
<v-list-item-content>
<vue-markdown
class="ma-0 pa-0 text-subtitle-1 dense-markdown"
:source="ingredient.text"
:source="ingredient"
>
</vue-markdown>
</v-list-item-content>
@@ -37,18 +36,21 @@ export default {
props: {
ingredients: Array,
},
computed: {
displayIngredients() {
return this.ingredients.map(x => ({
text: x,
checked: false,
}));
},
data() {
return {
checked: [],
};
},
mounted() {
this.checked = this.ingredients.map(() => false);
},
methods: {
generateKey(item, index) {
return utils.generateUniqueKey(item, index);
},
toggleChecked(index) {
this.$set(this.checked, index, !this.checked[index]);
},
},
};
</script>