From 6d8fe3c1627086d1288fd4a939aaf24c6085b8c5 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Fri, 4 Mar 2022 15:54:11 +0100 Subject: [PATCH] wip --- ...0219_1655.py => 0173_recipe_source_url.py} | 9 +-- cookbook/views/api.py | 4 +- vue/src/apps/ImportView/ImportView.vue | 72 ++++++++++++++----- 3 files changed, 60 insertions(+), 25 deletions(-) rename cookbook/migrations/{0172_auto_20220219_1655.py => 0173_recipe_source_url.py} (50%) diff --git a/cookbook/migrations/0172_auto_20220219_1655.py b/cookbook/migrations/0173_recipe_source_url.py similarity index 50% rename from cookbook/migrations/0172_auto_20220219_1655.py rename to cookbook/migrations/0173_recipe_source_url.py index 36238f5f9..dc84e64eb 100644 --- a/cookbook/migrations/0172_auto_20220219_1655.py +++ b/cookbook/migrations/0173_recipe_source_url.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.12 on 2022-02-19 15:55 +# Generated by Django 3.2.12 on 2022-03-04 13:39 from django.db import migrations, models @@ -6,15 +6,10 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('cookbook', '0171_alter_searchpreference_trigram_threshold'), + ('cookbook', '0172_ingredient_original_text'), ] operations = [ - migrations.AddField( - model_name='ingredient', - name='original_text', - field=models.CharField(blank=True, default=None, max_length=512, null=True), - ), migrations.AddField( model_name='recipe', name='source_url', diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 39df3b076..1463c3f33 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -1145,7 +1145,7 @@ def recipe_from_source(request): 'error': True, 'msg': _('Connection Refused.') }, status=400) - recipe_json, recipe_tree, recipe_html, images = get_recipe_from_source(data, url, request) + recipe_json, recipe_tree, recipe_html, recipe_images = get_recipe_from_source(data, url, request) if len(recipe_tree) == 0 and len(recipe_json) == 0: return JsonResponse({ 'error': True, @@ -1156,7 +1156,7 @@ def recipe_from_source(request): 'recipe_json': recipe_json, 'recipe_tree': recipe_tree, 'recipe_html': recipe_html, - 'recipe_images': images, + 'recipe_images': recipe_images, }) else: diff --git a/vue/src/apps/ImportView/ImportView.vue b/vue/src/apps/ImportView/ImportView.vue index bd559fc3b..34bc58314 100644 --- a/vue/src/apps/ImportView/ImportView.vue +++ b/vue/src/apps/ImportView/ImportView.vue @@ -11,14 +11,15 @@
- + + Website + role="tabpanel" v-model="collapse_visible.url"> + - Additional - Options + Options + role="tabpanel" v-model="collapse_visible.options"> -
@@ -64,6 +64,7 @@ recipe
+ No additional images found in source. @@ -107,10 +108,14 @@
Split + Merge all + {{ s.instruction }} + v-bind:key="s.instruction"> + Delete + Merge
@@ -121,12 +126,28 @@ + - Import + Advanced Options + + + + + + + + + + + + + + Import + role="tabpanel" v-model="collapse_visible.import"> @@ -139,10 +160,9 @@ - - +