1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-05 05:25:26 +02:00

Refactor/recipe routes (#370)

* format with black

* black format

* flake8

* remove bar exceptions

* remove test for depreciated route

* recipe settings editr

* add sqlite

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-04-29 21:46:27 -08:00 committed by GitHub
parent 5dafe8fbb5
commit 1dc051f562
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 179 additions and 224 deletions

View file

@ -0,0 +1,55 @@
<template>
<div class="text-center">
<v-menu offset-y top nudge-top="6" :close-on-content-click="false">
<template v-slot:activator="{ on, attrs }">
<v-btn color="accent" dark v-bind="attrs" v-on="on">
<v-icon left>
mdi-cog
</v-icon>
{{ $t("general.settings") }}
</v-btn>
</template>
<v-card>
<v-card-title class="py-2">
<div>
Recipe Settings
</div>
</v-card-title>
<v-divider class="mx-2"></v-divider>
<v-card-text class="mt-n5">
<v-switch
dense
v-for="(itemValue, key) in value"
:key="key"
v-model="value[key]"
flat
inset
:label="labels[key]"
hide-details
></v-switch>
</v-card-text>
</v-card>
</v-menu>
</div>
</template>
<script>
export default {
components: {},
props: {
value: Object,
},
data: () => ({
labels: {
public: "Public Recipe",
showNutrition: "Show Nutrition Values",
showAssets: "Show Assets",
landscapeView: "Landscape View (Coming Soon)",
},
}),
methods: {},
};
</script>
<style lang="scss" scoped>
</style>

View file

@ -8,6 +8,11 @@
:slug="value.slug"
@refresh="$emit('upload')"
/>
<SettingsMenu
class="my-1 mx-1"
@upload="uploadImage"
:value="value.settings"
/>
</v-row>
<v-row dense>
<v-col>
@ -122,6 +127,7 @@ import Instructions from "@/components/Recipe/Parts/Instructions";
import Ingredients from "@/components/Recipe/Parts/Ingredients";
import Assets from "@/components/Recipe/Parts/Assets.vue";
import Notes from "@/components/Recipe/Parts/Notes.vue";
import SettingsMenu from "@/components/Recipe/Parts/Helpers/SettingsMenu.vue";
export default {
components: {
BulkAdd,
@ -133,6 +139,7 @@ export default {
Ingredients,
Assets,
Notes,
SettingsMenu,
},
props: {
value: Object,