improved URL import

This commit is contained in:
vabene1111
2024-12-19 19:35:21 +01:00
parent 9b3bfd3d1c
commit a34fddc866
32 changed files with 153 additions and 22 deletions

View File

@@ -190,6 +190,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "",
"Next": "",
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
@@ -260,6 +261,8 @@
"Search": "",
"Search Settings": "",
"Select": "",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "",
"Select_File": "",

View File

@@ -183,6 +183,7 @@
"New_Supermarket": "Създайте нов супермаркет",
"New_Supermarket_Category": "Създаване на нова категория супермаркет",
"New_Unit": "Нова единица",
"Next": "",
"Next_Day": "Следващия ден",
"Next_Period": "Следващ период",
"NoCategory": "",
@@ -253,6 +254,8 @@
"Search": "Търсене",
"Search Settings": "Настройки търсене",
"Select": "Изберете",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Моля, изберете приложение, от което да импортирате",
"Select_Book": "Изберете Книга",
"Select_File": "Избери файл",

View File

@@ -246,6 +246,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "",
"Next": "",
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
@@ -332,6 +333,8 @@
"Second": "",
"Seconds": "",
"Select": "",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "Seleccioneu llibre",
"Select_File": "Seleccioneu arxiu",

View File

@@ -245,6 +245,7 @@
"New_Supermarket": "Vytvořit nový obchod",
"New_Supermarket_Category": "Vytvořit novou kategorii obchodu",
"New_Unit": "Nová jednotka",
"Next": "",
"Next_Day": "Následující den",
"Next_Period": "Další období",
"NoCategory": "",
@@ -330,6 +331,8 @@
"Second": "Vteřina",
"Seconds": "Vteřiny",
"Select": "Vybrat",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Vyberte aplikaci, ze které chcete importovat",
"Select_Book": "Vyber kuchařku",
"Select_File": "Vybrat soubor",

View File

@@ -230,6 +230,7 @@
"New_Supermarket": "Opret nyt supermarked",
"New_Supermarket_Category": "Opret ny supermarkedskategori",
"New_Unit": "Ny enhed",
"Next": "",
"Next_Day": "Næste dag",
"Next_Period": "Næste periode",
"NoCategory": "",
@@ -312,6 +313,8 @@
"Second": "Sekund",
"Seconds": "Sekunder",
"Select": "Vælg",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Vælg venligst en App at importere fra",
"Select_Book": "Vælg bog",
"Select_File": "Vælg fil",

View File

@@ -248,6 +248,7 @@
"New_Supermarket": "Erstelle einen neuen Supermarkt",
"New_Supermarket_Category": "Erstelle eine neue Supermarktkategorie",
"New_Unit": "Neue Einheit",
"Next": "Weiter",
"Next_Day": "Tag vor",
"Next_Period": "nächster Zeitraum",
"NoCategory": "Ohne Kategorie",
@@ -335,6 +336,8 @@
"Second": "Sekunde",
"Seconds": "Sekunden",
"Select": "Auswählen",
"SelectAll": "Alle auswählen",
"SelectNone": "Keine auswählen",
"Select_App_To_Import": "Bitte wählen Sie eine App aus der Sie importieren möchten",
"Select_Book": "Buch auswählen",
"Select_File": "Datei auswählen",

View File

@@ -223,6 +223,7 @@
"New_Supermarket": "Δημιουργία νέου supermarket",
"New_Supermarket_Category": "Δημιουργία νέας κατηγορίας supermarket",
"New_Unit": "Νέα μονάδα μέτρησης",
"Next": "",
"Next_Day": "Επόμενη μέρα",
"Next_Period": "Επόμενη περίοδος",
"NoCategory": "",
@@ -304,6 +305,8 @@
"Second": "Δευτερόλεπτο",
"Seconds": "Δευτερόλεπτα",
"Select": "Επιλογή",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Επιλέξτε μια εφαρμογή από την οποία θα γίνει εισαγωγή",
"Select_Book": "Επιλογή βιβλίου",
"Select_File": "Επιλογή αρχείου",

View File

@@ -247,6 +247,7 @@
"New_Supermarket": "Create new supermarket",
"New_Supermarket_Category": "Create new supermarket category",
"New_Unit": "New Unit",
"Next": "Next",
"Next_Day": "Next Day",
"Next_Period": "Next Period",
"NoCategory": "No Category",
@@ -334,6 +335,8 @@
"Second": "Second",
"Seconds": "Seconds",
"Select": "Select",
"SelectAll": "Select all",
"SelectNone": "Select none",
"Select_App_To_Import": "Please select an App to Import from",
"Select_Book": "Select Book",
"Select_File": "Select File",

View File

@@ -247,6 +247,7 @@
"New_Supermarket": "Crear nuevo supermercado",
"New_Supermarket_Category": "Crear nueva categoría de supermercado",
"New_Unit": "Nueva unidad",
"Next": "",
"Next_Day": "Siguiente Día",
"Next_Period": "Siguiente Período",
"NoCategory": "",
@@ -331,6 +332,8 @@
"Second": "Segundo",
"Seconds": "Segundos",
"Select": "Seleccionar",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Por favor, seleccione una Aplicación de la que Importar",
"Select_Book": "Seleccionar libro",
"Select_File": "Seleccionar archivo",

View File

@@ -134,6 +134,7 @@
"New_Meal_Type": "Uusi Ateriatyyppi",
"New_Recipe": "Uusi Resepti",
"New_Unit": "Uusi Yksikkö",
"Next": "",
"Next_Day": "Seuraava Päivä",
"Next_Period": "Seuraava Jakso",
"NoCategory": "",
@@ -186,6 +187,8 @@
"ScalableNumber": "",
"Search": "Haku",
"Search Settings": "Hakuasetukset",
"SelectAll": "",
"SelectNone": "",
"Select_Book": "Valitse Kirja",
"Select_File": "Valitse Tiedosto",
"Selected": "Valittu",

View File

@@ -246,6 +246,7 @@
"New_Supermarket": "Créer un nouveau supermarché",
"New_Supermarket_Category": "Créer une nouvelle catégorie de supermarché",
"New_Unit": "Nouvelle unité",
"Next": "",
"Next_Day": "Prochain jour",
"Next_Period": "Prochaine période",
"NoCategory": "",
@@ -332,6 +333,8 @@
"Second": "Seconde",
"Seconds": "Secondes",
"Select": "Sélectionner",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Veuillez sélectionner une App pour importer depuis",
"Select_Book": "Sélectionner le livre",
"Select_File": "Sélectionner le fichier",

View File

@@ -247,6 +247,7 @@
"New_Supermarket": "צור סופרמרקט חדש",
"New_Supermarket_Category": "צור קטגורית סופרמקט חדשה",
"New_Unit": "יחידה חדשה",
"Next": "",
"Next_Day": "היום הבא",
"Next_Period": "התקופה הבאה",
"NoCategory": "",
@@ -333,6 +334,8 @@
"Second": "שניה",
"Seconds": "שניות",
"Select": "בחר",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "בחור אפליקציה לייבוא מתוך",
"Select_Book": "בחר ספר",
"Select_File": "בחר קובץ",

View File

@@ -225,6 +225,7 @@
"New_Supermarket": "Új szupermarket létrehozása",
"New_Supermarket_Category": "Új szupermarket kategória létrehozása",
"New_Unit": "Új mennyiségi egység",
"Next": "",
"Next_Day": "Következő nap",
"Next_Period": "Következő periódus",
"NoCategory": "",
@@ -306,6 +307,8 @@
"Second": "Másodperc",
"Seconds": "Másodperc",
"Select": "Kiválasztás",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Kérjük, válasszon ki egy alkalmazást, amelyből importálni szeretne",
"Select_Book": "Könyv kiválasztása",
"Select_File": "Fájl kiválasztása",

View File

@@ -93,6 +93,7 @@
"New_Food": "Նոր սննդամթերք",
"New_Keyword": "Նոր բանալի բառ",
"New_Recipe": "Նոր բաղադրատոմս",
"Next": "",
"NoCategory": "",
"No_Results": "Արդյունքներ չկան",
"NotFound": "",
@@ -130,6 +131,8 @@
"Save_and_View": "Պահպանել և Դիտել",
"ScalableNumber": "",
"Search": "",
"SelectAll": "",
"SelectNone": "",
"Select_Book": "Ընտրել գիրք",
"Select_File": "Ընտրել Ֆայլ",
"Selected": "",

View File

@@ -209,6 +209,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "",
"Next": "",
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
@@ -282,6 +283,8 @@
"Second": "",
"Seconds": "",
"Select": "",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "Pilih Buku",
"Select_File": "Pilih Buku",

View File

@@ -246,6 +246,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "",
"Next": "",
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
@@ -332,6 +333,8 @@
"Second": "",
"Seconds": "",
"Select": "",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "",
"Select_File": "",

View File

@@ -214,6 +214,7 @@
"New_Supermarket": "Crea nuovo supermercato",
"New_Supermarket_Category": "Crea nuova categoria di supermercato",
"New_Unit": "Nuova unità di misura",
"Next": "",
"Next_Day": "Giorno successivo",
"Next_Period": "Periodo successivo",
"NoCategory": "",
@@ -290,6 +291,8 @@
"Second": "Secondo",
"Seconds": "Secondi",
"Select": "Seleziona",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Seleziona una App da cui importare",
"Select_Book": "Seleziona Libro",
"Select_File": "Seleziona file",

View File

@@ -228,6 +228,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "",
"Next": "",
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
@@ -310,6 +311,8 @@
"Second": "",
"Seconds": "",
"Select": "",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "Pasirinkti Knygą",
"Select_File": "Pasirinkti Failą",

View File

@@ -221,6 +221,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "Ny Enhet",
"Next": "",
"Next_Day": "Neste dag",
"Next_Period": "Neste periode",
"NoCategory": "",
@@ -302,6 +303,8 @@
"Second": "Sekund",
"Seconds": "Sekunder",
"Select": "Velg",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "Velg bok",
"Select_File": "Velg fil",

View File

@@ -225,6 +225,7 @@
"New_Supermarket": "Maak nieuwe supermarkt",
"New_Supermarket_Category": "Maak nieuwe supermarktcategorie",
"New_Unit": "Nieuwe Eenheid",
"Next": "",
"Next_Day": "Volgende dag",
"Next_Period": "Volgende periode",
"NoCategory": "",
@@ -306,6 +307,8 @@
"Second": "Seconde",
"Seconds": "Seconden",
"Select": "Selecteer",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Selecteer een app om van te importeren",
"Select_Book": "Selecteer boek",
"Select_File": "Selecteer Bestand",

View File

@@ -248,6 +248,7 @@
"New_Supermarket": "Stwórz nowy supermarket",
"New_Supermarket_Category": "Utwórz nową kategorię supermarketów",
"New_Unit": "Nowa jednostka",
"Next": "",
"Next_Day": "Następny dzień",
"Next_Period": "Następny okres",
"NoCategory": "",
@@ -334,6 +335,8 @@
"Second": "Sekunda",
"Seconds": "Sekundy",
"Select": "Zaznacz",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Wybierz aplikację, z której chcesz zaimportować",
"Select_Book": "Wybierz książkę",
"Select_File": "Wybierz plik",

View File

@@ -178,6 +178,7 @@
"New_Meal_Type": "Novo tipo de refeição",
"New_Recipe": "Nova Receita",
"New_Unit": "Nova Unidade",
"Next": "",
"Next_Day": "Dia seguinte",
"Next_Period": "Próximo período",
"NoCategory": "",
@@ -249,6 +250,8 @@
"Search": "Pesquisar",
"Search Settings": "Definições de Pesquisa",
"Select": "Selecionar",
"SelectAll": "",
"SelectNone": "",
"Select_Book": "Selecionar Livro",
"Select_File": "Selecionar Ficheiro",
"Selected": "Selecionado",

View File

@@ -237,6 +237,7 @@
"New_Supermarket": "Criar novo supermercado",
"New_Supermarket_Category": "Criar nova categoria de supermercado",
"New_Unit": "Nova Unidade",
"Next": "",
"Next_Day": "Próximo Dia",
"Next_Period": "Próximo Período",
"NoCategory": "",
@@ -321,6 +322,8 @@
"Second": "Segundo",
"Seconds": "Segundos",
"Select": "Selecionar",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Selecione um App para importar",
"Select_Book": "Selecionar Livro",
"Select_File": "Selecionar Arquivo",

View File

@@ -218,6 +218,7 @@
"New_Supermarket": "Creați un supermarket nou",
"New_Supermarket_Category": "Creați o nouă categorie de supermarket-uri",
"New_Unit": "Unitate nouă",
"Next": "",
"Next_Day": "Ziua următoare",
"Next_Period": "Perioada următoare",
"NoCategory": "",
@@ -294,6 +295,8 @@
"Second": "Secundă",
"Seconds": "Secunde",
"Select": "Selectare",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Selectați o aplicație din care să importați",
"Select_Book": "Selectare carte",
"Select_File": "Selectare fișier",

View File

@@ -169,6 +169,7 @@
"New_Recipe": "Новый рецепт",
"New_Supermarket": "Создание нового супермаркета",
"New_Unit": "Новая единица",
"Next": "",
"Next_Day": "Следующий день",
"Next_Period": "Следующий период",
"NoCategory": "",
@@ -234,6 +235,8 @@
"Search": "Поиск",
"Search Settings": "Искать настройки",
"Select": "Выбрать",
"SelectAll": "",
"SelectNone": "",
"Select_Book": "Выбрать книгу",
"Select_File": "Выбрать файл",
"Selected": "Выбрать",

View File

@@ -162,6 +162,7 @@
"New_Meal_Type": "Nov tip obroka",
"New_Recipe": "Nov Recept",
"New_Unit": "Nova enota",
"Next": "",
"Next_Day": "Naslednji Dan",
"Next_Period": "Naslednje obdobje",
"NoCategory": "",
@@ -224,6 +225,8 @@
"ScalableNumber": "",
"Search": "Iskanje",
"Search Settings": "Išči nastavitev",
"SelectAll": "",
"SelectNone": "",
"Select_Book": "Izberi knjigo",
"Select_File": "Izberi datoteko",
"Selected": "Izbrano",

View File

@@ -248,6 +248,7 @@
"New_Supermarket": "Skapa ny mataffärs",
"New_Supermarket_Category": "Skapa ny mataffärskategori",
"New_Unit": "Ny enhet",
"Next": "",
"Next_Day": "Nästa dag",
"Next_Period": "Nästa period",
"NoCategory": "",
@@ -334,6 +335,8 @@
"Second": "Sekund",
"Seconds": "Sekunder",
"Select": "Välj",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Vänligen välj en App att importera från",
"Select_Book": "Välj kokbok",
"Select_File": "Välj fil",

View File

@@ -247,6 +247,7 @@
"New_Supermarket": "Yeni Market",
"New_Supermarket_Category": "Yeni Market Kategorisi",
"New_Unit": "Yeni Birim",
"Next": "",
"Next_Day": "Sonraki Gün",
"Next_Period": "Sonraki Dönem",
"NoCategory": "",
@@ -333,6 +334,8 @@
"Second": "Saniye",
"Seconds": "Saniyeler",
"Select": "Seç",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "Lütfen İçe Aktarılacak Uygulamayı seçin",
"Select_Book": "Kitap Seç",
"Select_File": "Dosya Seç",

View File

@@ -195,6 +195,7 @@
"New_Supermarket": "",
"New_Supermarket_Category": "",
"New_Unit": "Нова Одиниця",
"Next": "",
"Next_Day": "Наступний День",
"Next_Period": "Наступний період",
"NoCategory": "",
@@ -268,6 +269,8 @@
"Search": "Пошук",
"Search Settings": "Налаштування Пошуку",
"Select": "",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "",
"Select_Book": "Вибрати Книжку",
"Select_File": "Вибрати Файл",

View File

@@ -242,6 +242,7 @@
"New_Supermarket": "创建新超市",
"New_Supermarket_Category": "新建超市类别",
"New_Unit": "新建单位",
"Next": "",
"Next_Day": "第二天",
"Next_Period": "下期",
"NoCategory": "",
@@ -328,6 +329,8 @@
"Second": "秒",
"Seconds": "秒",
"Select": "选择",
"SelectAll": "",
"SelectNone": "",
"Select_App_To_Import": "请选择一个要导入的应用",
"Select_Book": "选择书籍",
"Select_File": "选择文件",

View File

@@ -70,6 +70,7 @@
"Monday": "",
"New": "",
"New_Recipe": "",
"Next": "",
"NoCategory": "",
"NotFound": "",
"NotFoundHelp": "",
@@ -102,6 +103,8 @@
"Save_and_View": "儲存並查看",
"ScalableNumber": "",
"Search": "",
"SelectAll": "",
"SelectNone": "",
"Select_Book": "選擇書籍",
"Select_File": "選擇檔案",
"Selected": "",

View File

@@ -27,7 +27,7 @@
</template>
</v-text-field>
<v-textarea :placeholder="$t('paste_json')"></v-textarea>
<!-- <v-textarea :placeholder="$t('paste_json')"></v-textarea> -->
<v-alert variant="tonal" v-if="importResponse.duplicates && importResponse.duplicates.length > 0">
<v-alert-title>{{ $t('Duplicate') }}</v-alert-title>
@@ -58,6 +58,15 @@
</v-stepper-window-item>
<v-stepper-window-item value="3">
<v-row>
<v-col class="text-center">
<v-btn-group border divided>
<v-btn prepend-icon="fa-solid fa-square-check" @click="setAllKeywordsImportStatus(true)">{{ $t('SelectAll') }}</v-btn>
<v-btn prepend-icon="fa-solid fa-square-minus" @click="setAllKeywordsImportStatus(false)">{{ $t('SelectNone') }}</v-btn>
</v-btn-group>
</v-col>
</v-row>
<v-list>
<v-list-item border v-for="k in importResponse.recipe.keywords" :key="k" :class="{'bg-success': k.importKeyword}"
@click="k.importKeyword = !k.importKeyword">
@@ -102,23 +111,8 @@
<v-icon size="small" class="drag-handle cursor-grab" icon="$dragHandle"></v-icon>
{{ i.amount }} {{ i.unit.name }} {{ i.food.name }}
<template #append>
<v-btn size="small" color="edit">
<v-btn size="small" color="edit" @click="editingIngredient = i; dialog=true">
<v-icon icon="$edit"></v-icon>
<v-dialog max-width="450px" activator="parent" v-model="dialog">
<v-card>
<v-closable-card-title v-model="dialog" :title="$t('Ingredient Editor')"></v-closable-card-title>
<v-card-text>
<v-text-field :label="$t('Original_Text')" v-model="i.originalText" disabled></v-text-field>
<v-text-field :label="$t('Amount')" v-model="i.amount"></v-text-field>
<v-text-field :label="$t('Unit')" v-model="i.unit.name"></v-text-field>
<v-text-field :label="$t('Food')" v-model="i.food.name"></v-text-field>
<v-text-field :label="$t('Note')" v-model="i.note"></v-text-field>
</v-card-text>
<v-card-actions>
<v-btn class="float-right" color="save" @click="dialog = false">{{$t('Save')}}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-btn>
</template>
</v-list-item>
@@ -135,18 +129,49 @@
</v-col>
</v-row>
<v-dialog max-width="450px" v-model="dialog">
<v-card>
<v-closable-card-title v-model="dialog" :title="$t('Ingredient Editor')"></v-closable-card-title>
<v-card-text>
<v-text-field :label="$t('Original_Text')" v-model="editingIngredient.originalText" disabled></v-text-field>
<v-text-field :label="$t('Amount')" v-model="editingIngredient.amount"></v-text-field>
<v-text-field :label="$t('Unit')" v-model="editingIngredient.unit.name"></v-text-field>
<v-text-field :label="$t('Food')" v-model="editingIngredient.food.name"></v-text-field>
<v-text-field :label="$t('Note')" v-model="editingIngredient.note"></v-text-field>
</v-card-text>
<v-card-actions>
<v-btn class="float-right" color="save" @click="dialog = false">{{ $t('Save') }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-stepper-window-item>
<v-stepper-window-item value="5">
<v-card :loading="loading">
<v-card-title></v-card-title>
<v-btn @click="createRecipeFromImport()">{{ $t('Import') }}</v-btn>
<v-card-title>{{ importResponse.recipe.name }}</v-card-title>
<v-row>
<v-col cols="12" md="6">
<v-img v-if="importResponse.recipe.imageUrl" :src="importResponse.recipe.imageUrl"></v-img>
</v-col>
<v-col cols="12" md="6">
<v-text-field :label="$t('Name')" v-model="importResponse.recipe.name"></v-text-field>
<v-number-input :label="$t('Servings')" v-model="importResponse.recipe.servings"></v-number-input>
<v-text-field :label="$t('ServingsText')" v-model="importResponse.recipe.servingsText"></v-text-field>
<v-textarea :label="$t('Description')" v-model="importResponse.recipe.description" clearable></v-textarea>
<v-btn class="mt-5" size="large" @click="createRecipeFromImport()" color="success" :loading="loading">{{ $t('Import') }}</v-btn>
</v-col>
</v-row>
</v-card>
</v-stepper-window-item>
</v-stepper-window>
<v-stepper-actions @click:next="next"
@click:prev="prev">
@click:prev="prev"
:next-text="$t('Next')"
:prev-text="$t('Back')"
:disabled="Object.keys(importResponse).length == 0">
</v-stepper-actions>
</template>
@@ -161,12 +186,14 @@
<script lang="ts" setup>
import {nextTick, ref} from "vue";
import {ApiApi, RecipeFromSourceResponse, SourceImportStep} from "@/openapi";
import {ApiApi, RecipeFromSourceResponse, type SourceImportIngredient, SourceImportStep} from "@/openapi";
import {ErrorMessageType, MessageType, useMessageStore} from "@/stores/MessageStore";
import {useRouter} from "vue-router";
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore";
import {VueDraggable} from "vue-draggable-plus";
import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue";
import KeywordsBar from "@/components/display/KeywordsBar.vue";
import {VNumberInput} from 'vuetify/labs/VNumberInput'
const router = useRouter()
@@ -176,6 +203,7 @@ const loading = ref(false)
const importUrl = ref("")
const importResponse = ref({} as RecipeFromSourceResponse)
const editingIngredient = ref({} as SourceImportIngredient)
/**
* call server to load recipe from a given URl
@@ -353,6 +381,16 @@ function autoSortIngredients() {
}
}
/**
* set the import status for all keywords to the given status
* @param status if keyword should be imported or not
*/
function setAllKeywordsImportStatus(status: boolean) {
importResponse.value.recipe?.keywords.forEach(keyword => {
keyword.importKeyword = status
})
}
</script>
<style scoped>