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

Merge branch 'dev' into master

This commit is contained in:
Kevin Grossmann 2021-01-05 19:02:08 +01:00 committed by GitHub
commit 85e6eebda9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 216 additions and 72 deletions

View file

@ -0,0 +1 @@
VUE_APP_API_BASE_URL=http://10.10.10.12:9921

View file

@ -83,12 +83,19 @@ export default {
onFileChange() {
this.image = URL.createObjectURL(this.fileObject);
},
async createRecipe() {
this.isLoading = true;
this.recipeDetails.image = this.fileObject.name;
if (this.fileObject) {
this.recipeDetails.image = this.fileObject.name;
}
let slug = await api.recipes.create(this.recipeDetails);
await api.recipes.updateImage(slug, this.fileObject);
if (this.fileObject) {
await api.recipes.updateImage(slug, this.fileObject);
}
this.isLoading = false;
this.$router.push(`/recipe/${slug}`);

View file

@ -0,0 +1,37 @@
<template>
<v-dialog v-model="addRecipe" width="650" @click:outside="reset">
<v-card :loading="processing">
<v-card-title class="headline"> From URL </v-card-title>
<v-card-text> </v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="primary" text @click="createRecipe"> Exit </v-btn>
<v-btn color="primary" text @click="confirm"> Confirm </v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
export default {
props: {
type: String,
},
data() {
return {};
},
methods: {
confirm() {
this.$emit("confirm");
},
exit() {
// do something?
}
},
};
</script>
<style>
</style>