Merge branch 'dev' of https://github.com/hay-kot/mealie into feature/recipe-categories

This commit is contained in:
hayden
2021-01-30 17:30:29 -09:00
22 changed files with 435 additions and 154 deletions

View File

@@ -2,11 +2,11 @@
<div class="text-center">
<v-dialog v-model="dialog" width="700">
<template v-slot:activator="{ on, attrs }">
<v-btn color="accent" dark v-bind="attrs" v-on="on"> API Extras </v-btn>
<v-btn color="accent" dark v-bind="attrs" v-on="on"> {{ $t("recipe.api-extras") }} </v-btn>
</template>
<v-card>
<v-card-title> API Extras </v-card-title>
<v-card-title> {{ $t("recipe.api-extras") }} </v-card-title>
<v-card-text :key="formKey">
<v-row
@@ -28,14 +28,14 @@
</v-col>
<v-col cols="12" md="3" sm="6">
<v-text-field
label="Object Key"
:label="$t('recipe.object-key')"
:value="key"
@input="updateKey(index)"
>
</v-text-field>
</v-col>
<v-col cols="12" md="8" sm="6">
<v-text-field label="Object Value" v-model="extras[key]">
<v-text-field :label="$t('recipe.object-value')" v-model="extras[key]">
</v-text-field>
</v-col>
</v-row>
@@ -46,17 +46,17 @@
<v-card-actions>
<v-form ref="addKey">
<v-text-field
label="New Key Name"
:label="$t('recipe.new-key-name')"
v-model="newKeyName"
class="pr-4"
:rules="[rules.required, rules.whiteSpace]"
></v-text-field>
</v-form>
<v-btn color="info" text @click="append"> Add Key</v-btn>
<v-btn color="info" text @click="append"> {{ $t("recipe.add-key") }} </v-btn>
<v-spacer></v-spacer>
<v-btn color="success" text @click="save"> Save </v-btn>
<v-btn color="success" text @click="save"> {{ $t("general.save") }} </v-btn>
</v-card-actions>
</v-card>
</v-dialog>
@@ -74,9 +74,9 @@ export default {
dialog: false,
formKey: 1,
rules: {
required: (v) => !!v || "Key Name Required",
required: (v) => !!v || this.$i18n.t("recipe.key-name-required"),
whiteSpace: (v) =>
!v || v.split(" ").length <= 1 || "No White Space Allowed",
!v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
},
};
},

View File

@@ -16,19 +16,19 @@
<v-row>
<v-col>
<v-text-field
label="Total Time"
:label="$t('recipe.total-time')"
v-model="value.totalTime"
></v-text-field>
</v-col>
<v-col
><v-text-field
label="Prep Time"
:label="$t('recipe.prep-time')"
v-model="value.prepTime"
></v-text-field
></v-col>
<v-col
><v-text-field
label="Cook Time / Perform Time"
:label="$t('recipe.perform-time')"
v-model="value.performTime"
></v-text-field
></v-col>
@@ -163,7 +163,7 @@
<v-icon color="error">mdi-delete</v-icon>
</v-btn>
<v-text-field
label="Title"
:label="$t('recipe.title')"
v-model="value.notes[index]['title']"
></v-text-field>
</v-row>
@@ -223,7 +223,7 @@
<v-text-field
v-model="value.orgURL"
class="mt-10"
label="Original URL"
:label="$t('recipe.original-url')"
></v-text-field>
</v-col>
</v-row>
@@ -248,9 +248,9 @@ export default {
return {
fileObject: null,
rules: {
required: (v) => !!v || "Key Name Required",
whiteSpace: (v) =>
!v || v.split(" ").length <= 1 || "No White Space Allowed",
required: v => !!v || this.$i18n.t("recipe.key-name-required"),
whiteSpace: v =>
!v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
},
categoriesSearchInput: "",
tagsSearchInput: "",