This commit is contained in:
wengtad 2021-06-18 11:45:22 +08:00 committed by GitHub
parent cdfb3543dc
commit 71a5de3432
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View file

@ -55,6 +55,7 @@ eggs/
lib/
lib64/
parts/
!frontend/src/components/Recipe/Parts/
sdist/
var/
wheels/

View file

@ -25,9 +25,9 @@
</v-card-title>
<v-card-text class="mt-n5">
<div>
<v-text-field :label="$t('general.url')" class="pt-5" clearable v-model="url">
<v-text-field :label="$t('general.url')" class="pt-5" clearable v-model="url" :messages="getMessages()">
<template v-slot:append-outer>
<v-btn class="ml-2" color="primary" @click="getImageFromURL" :loading="loading" :disabled="slug">
<v-btn class="ml-2" color="primary" @click="getImageFromURL" :loading="loading" :disabled="!slug">
{{ $t("general.get") }}
</v-btn>
</template>
@ -66,6 +66,9 @@ export default {
}
this.loading = false;
},
getMessages() {
return this.slug ? [""] : [this.$i18n.t("recipe.save-recipe-before-use")];
},
},
};
</script>

View file

@ -260,6 +260,7 @@
"recipe-updated": "Recipe updated",
"remove-from-favorites": "Remove from Favorites",
"remove-section": "Remove Section",
"save-recipe-before-use": "Save recipe before use",
"section-title": "Section Title",
"servings": "Servings",
"share-recipe-message": "I wanted to share my {0} recipe with you.",