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

feat: Add Suggestion To Use Bulk URL Import (#2852)

* fixed warning

* re-arranged menu options

* fixed broken link

* added bulk url suggestion

* simply bulk import url var

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson 2024-01-09 08:37:22 -06:00 committed by GitHub
parent 143f44ad68
commit 1e4fde88ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 8 deletions

View file

@ -20,7 +20,7 @@
<AdvancedOnly>
<v-container class="d-flex justify-center align-center my-4">
<a :to="`/group/migrations`"> {{ $t('recipe.looking-for-migrations') }}</a>
<router-link :to="`/group/migrations`"> {{ $t('recipe.looking-for-migrations') }}</router-link>
</v-container>
</AdvancedOnly>
</div>
@ -42,6 +42,11 @@ export default defineComponent({
text: i18n.tc("recipe.import-with-url"),
value: "url",
},
{
icon: $globals.icons.link,
text: i18n.tc("recipe.bulk-url-import"),
value: "bulk",
},
{
icon: $globals.icons.edit,
text: i18n.tc("recipe.create-recipe"),
@ -52,11 +57,6 @@ export default defineComponent({
text: i18n.tc("recipe.import-with-zip"),
value: "zip",
},
{
icon: $globals.icons.link,
text: i18n.tc("recipe.bulk-url-import"),
value: "bulk",
},
{
icon: $globals.icons.robot,
text: i18n.tc("recipe.debug-scraper"),

View file

@ -4,7 +4,8 @@
<div>
<v-card-title class="headline"> {{ $t('recipe.scrape-recipe') }} </v-card-title>
<v-card-text>
{{ $t('recipe.scrape-recipe-description') }}
<p>{{ $t('recipe.scrape-recipe-description') }}</p>
<p>{{ $t('recipe.scrape-recipe-have-a-lot-of-recipes') }} <a :href="bulkImporterTarget">{{ $t('recipe.scrape-recipe-suggest-bulk-importer') }}</a>.</p>
<v-text-field
v-model="recipeUrl"
:label="$t('new-recipe.recipe-url')"
@ -94,6 +95,8 @@ export default defineComponent({
const router = useRouter();
const tags = useTagStore();
const bulkImporterTarget = computed(() => `/g/${groupSlug.value}/r/create/bulk`);
function handleResponse(response: AxiosResponse<string> | null, edit = false, refreshTags = false) {
if (response?.status !== 201) {
state.error = true;
@ -167,6 +170,7 @@ export default defineComponent({
}
return {
bulkImporterTarget,
recipeUrl,
importKeywordsAsTags,
stayInEditMode,