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:
commit
85e6eebda9
21 changed files with 216 additions and 72 deletions
1
frontend/.env.development
Normal file
1
frontend/.env.development
Normal file
|
@ -0,0 +1 @@
|
|||
VUE_APP_API_BASE_URL=http://10.10.10.12:9921
|
|
@ -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}`);
|
||||
|
|
37
frontend/src/components/UI/Confirmation.vue
Normal file
37
frontend/src/components/UI/Confirmation.vue
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue