fix: url remains after succesful import

This commit is contained in:
Hayden 2021-01-16 12:12:39 -09:00
commit 47b86e1fcd

View file

@ -2,15 +2,20 @@
<div class="text-center">
<v-dialog v-model="addRecipe" width="650" @click:outside="reset">
<v-card :loading="processing">
<v-card-title class="headline">{{ $t('new-recipe.from-url') }} </v-card-title>
<v-card-title class="headline"
>{{ $t("new-recipe.from-url") }}
</v-card-title>
<v-card-text>
<v-form>
<v-text-field v-model="recipeURL" :label="$t('new-recipe.recipe-url')"></v-text-field>
<v-text-field
v-model="recipeURL"
:label="$t('new-recipe.recipe-url')"
></v-text-field>
</v-form>
<v-alert v-if="error" color="red" outlined type="success">
{{ $t('new-recipe.error-message') }}
{{ $t("new-recipe.error-message") }}
</v-alert>
</v-card-text>
@ -18,8 +23,12 @@
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="grey" text @click="reset"> {{$t('general.close')}} </v-btn>
<v-btn color="success" text @click="createRecipe"> {{ $t('general.submit') }} </v-btn>
<v-btn color="grey" text @click="reset">
{{ $t("general.close") }}
</v-btn>
<v-btn color="success" text @click="createRecipe">
{{ $t("general.submit") }}
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
@ -65,6 +74,7 @@ export default {
this.addRecipe = false;
this.processing = false;
this.recipeURL = "";
this.$router.push(`/recipe/${response.data}`);
},