ingredient step sorting dialog and headline option on desktop

This commit is contained in:
vabene1111
2025-01-18 14:32:20 +01:00
parent d294341926
commit efa9e8aa3b
34 changed files with 219 additions and 10 deletions

View File

@@ -53,7 +53,7 @@
<div v-if="!mobile">
<vue-draggable v-model="step.ingredients" handle=".drag-handle" :on-sort="sortIngredients" empty-insert-threshold="25" group="ingredients">
<v-row v-for="(ingredient, index) in step.ingredients" dense>
<v-col cols="2">
<v-col cols="2" v-if="!ingredient.isHeader">
<v-text-field :id="`id_input_amount_${step.id}_${index}`" :label="$t('Amount')" type="number" v-model="ingredient.amount" density="compact"
hide-details>
@@ -62,14 +62,18 @@
</template>
</v-text-field>
</v-col>
<v-col cols="3">
<v-col cols="3" v-if="!ingredient.isHeader">
<model-select model="Unit" v-model="ingredient.unit" density="compact" allow-create hide-details></model-select>
</v-col>
<v-col cols="3">
<v-col cols="3" v-if="!ingredient.isHeader">
<model-select model="Food" v-model="ingredient.food" density="compact" allow-create hide-details></model-select>
</v-col>
<v-col cols="3" @keydown.tab="event => handleIngredientNoteTab(event, index)">
<v-text-field :label="$t('Note')" v-model="ingredient.note" density="compact" hide-details></v-text-field>
<v-col :cols="(ingredient.isHeader) ? 11 : 3" @keydown.tab="event => handleIngredientNoteTab(event, index)">
<v-text-field :label="(ingredient.isHeader) ? $t('Headline') : $t('Note')" v-model="ingredient.note" density="compact" hide-details>
<template #prepend v-if="ingredient.isHeader">
<v-icon icon="$dragHandle" class="drag-handle cursor-grab"></v-icon>
</template>
</v-text-field>
</v-col>
<v-col cols="1">
<v-btn variant="plain" icon>
@@ -77,6 +81,14 @@
<v-menu activator="parent">
<v-list>
<v-list-item @click="step.ingredients.splice(index, 1)" prepend-icon="$delete">{{ $t('Delete') }}</v-list-item>
<v-list-item link>
<v-switch v-model="step.ingredients[index].isHeader" :label="$t('Headline')" hide-details></v-switch>
</v-list-item>
<v-list-item @click="editingIngredientIndex = index; dialogIngredientSorter = true" prepend-icon="fa-solid fa-sort">{{
$t('Move')
}}
</v-list-item>
</v-list>
</v-menu>
</v-btn>
@@ -87,7 +99,7 @@
</div>
<v-list v-if="mobile">
<vue-draggable v-model="step.ingredients" handle=".drag-handle" :on-sort="sortIngredients" group="ingredients">
<vue-draggable v-model="step.ingredients" handle=".drag-handle" :on-sort="sortIngredients" group="ingredients" empty-insert-threshold="25">
<v-list-item v-for="(ingredient, index) in step.ingredients" border @click="editingIngredientIndex = index; dialogIngredientEditor = true">
<ingredient-string :ingredient="ingredient"></ingredient-string>
<template #append>
@@ -151,6 +163,36 @@
</v-card>
</v-dialog>
<v-dialog
v-model="dialogIngredientSorter"
:max-width="(mobile) ? '100vw': '25vw'"
:fullscreen="mobile">
<v-card>
<v-closable-card-title :title="$t('Move')" v-model="dialogIngredientSorter"
:sub-title="ingredientToString(step.ingredients[editingIngredientIndex])"></v-closable-card-title>
<v-card-text>
<v-btn block :disabled="editingIngredientIndex== 0" @click="moveIngredient(editingIngredientIndex, props.stepIndex, 0)">{{ $t('First') }}</v-btn>
<v-btn block :disabled="editingIngredientIndex == 0" class="mt-1" @click="moveIngredient(editingIngredientIndex, props.stepIndex, editingIngredientIndex - 1)">{{
$t('Up')
}}
</v-btn>
<v-btn block :disabled="editingIngredientIndex + 1 == step.ingredients.length" class="mt-1"
@click="moveIngredient(editingIngredientIndex, props.stepIndex, editingIngredientIndex + 1)"> {{ $t('Down') }}
</v-btn>
<v-btn block :disabled="editingIngredientIndex + 1 == step.ingredients.length" class="mt-1"
@click="moveIngredient(editingIngredientIndex, props.stepIndex, step.ingredients.length - 1)">{{ $t('Last') }}
</v-btn>
{{ $t('Step') }}
<v-btn block v-for="(s,i) in recipe.steps" :disabled="i == props.stepIndex" class="mt-1"
@click="moveIngredient(editingIngredientIndex, i, recipe.steps[i].ingredients.length)">{{ i + 1 }} {{ s.name }}
</v-btn>
</v-card-text>
<v-card-actions>
</v-card-actions>
</v-card>
</v-dialog>
<v-bottom-sheet v-model="dialogIngredientEditor">
<v-card v-if="editingIngredientIndex >= 0">
<v-closable-card-title :title="$t('Ingredient Editor')" v-model="dialogIngredientEditor"></v-closable-card-title>
@@ -186,7 +228,7 @@
<script setup lang="ts">
import {nextTick, onMounted, ref} from 'vue'
import {ApiApi, Ingredient, ParsedIngredient, Step, Unit} from "@/openapi";
import {ApiApi, Ingredient, ParsedIngredient, Recipe, Step, Unit} from "@/openapi";
import StepMarkdownEditor from "@/components/inputs/StepMarkdownEditor.vue";
import {VNumberInput} from 'vuetify/labs/VNumberInput'
import ModelSelect from "@/components/inputs/ModelSelect.vue";
@@ -196,16 +238,17 @@ import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue";
import IngredientString from "@/components/display/IngredientString.vue";
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore";
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore";
import {ingredientToString} from "@/utils/model_utils";
const emit = defineEmits(['delete'])
const step = defineModel<Step>({required: true})
const recipe = defineModel<Recipe>('recipe', {required: true})
const props = defineProps({
stepIndex: {type: Number, required: true},
})
const {mobile} = useDisplay()
const test = ref([])
const showName = ref(false)
const showTime = ref(false)
@@ -215,8 +258,9 @@ const showFile = ref(false)
const dialogMarkdownEditor = ref(false)
const dialogIngredientEditor = ref(false)
const dialogIngredientParser = ref(false)
const dialogIngredientSorter = ref(false)
const editingIngredientIndex = ref(Number)
const editingIngredientIndex = ref(0)
const ingredientTextInput = ref("")
const defaultUnit = ref<null | Unit>(null)
@@ -237,6 +281,25 @@ onMounted(() => {
}
})
/**
* move the ingredient at the given index of this step to the step and index at that step given in the target
* @param sourceIngredientIndex index of the ingredient to move
* @param targetStepIndex index of the step to place ingredient into
* @param targetIngredientIndex place in the target steps ingredient list to insert into
*/
function moveIngredient(sourceIngredientIndex: number, targetStepIndex: number, targetIngredientIndex: number,) {
let ingredient = step.value.ingredients[sourceIngredientIndex]
step.value.ingredients.splice(sourceIngredientIndex, 1)
recipe.value.steps[targetStepIndex].ingredients.splice(targetIngredientIndex, 0, ingredient)
// close dialog if moved to a new step, update index if its in the same step
if (targetStepIndex != props.stepIndex) {
dialogIngredientSorter.value = false
} else {
editingIngredientIndex.value = targetIngredientIndex
}
}
/**
* sort function called by draggable when ingredient table is sorted
*/

View File

@@ -70,7 +70,7 @@
<v-form :disabled="loading || fileApiLoading">
<v-row v-for="(s,i ) in editingObj.steps" :key="s.id">
<v-col>
<step-editor v-model="editingObj.steps[i]" :step-index="i" @delete="deleteStepAtIndex(i)"></step-editor>
<step-editor v-model="editingObj.steps[i]" v-model:recipe="editingObj" :step-index="i" @delete="deleteStepAtIndex(i)"></step-editor>
</v-col>
</v-row>
<v-row>

View File

@@ -83,6 +83,7 @@
"DeviceSettingsHelp": "",
"Disable_Amount": "",
"Documentation": "",
"Down": "",
"Download": "",
"DragToUpload": "",
"Drag_Here_To_Delete": "",
@@ -110,6 +111,7 @@
"File": "",
"Files": "",
"FinishedAt": "",
"First": "",
"Food": "",
"FoodInherit": "",
"FoodNotOnHand": "",
@@ -163,6 +165,7 @@
"Keyword": "",
"Keyword_Alias": "",
"Keywords": "",
"Last": "",
"Link": "",
"Load_More": "",
"Log_Cooking": "",
@@ -348,6 +351,7 @@
"Unit_Alias": "",
"Units": "",
"Unrated": "",
"Up": "",
"UpgradeNow": "",
"Url_Import": "",
"Use_Plural_Food_Always": "",

View File

@@ -80,6 +80,7 @@
"DeviceSettingsHelp": "",
"Disable_Amount": "Деактивиране на сумата",
"Documentation": "Документация",
"Down": "",
"Download": "Изтегляне",
"DragToUpload": "",
"Drag_Here_To_Delete": "Плъзнете тук, за да изтриете",
@@ -107,6 +108,7 @@
"File": "Файл",
"Files": "Файлове",
"FinishedAt": "",
"First": "",
"Food": "Храна",
"FoodInherit": "Хранителни наследствени полета",
"FoodNotOnHand": "Нямате {храна} под ръка.",
@@ -158,6 +160,7 @@
"Keyword": "Ключова дума",
"Keyword_Alias": "Псевдоним на ключова дума",
"Keywords": "Ключови думи",
"Last": "",
"Link": "Връзка",
"Load_More": "Зареди още",
"Log_Cooking": "Дневник на Готвене",
@@ -341,6 +344,7 @@
"Unit_Alias": "Псевдоним на единица",
"Units": "Единици",
"Unrated": "Без оценка",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Импортиране на URL адрес",
"Use_Plural_Food_Always": "",

View File

@@ -115,6 +115,7 @@
"Disable_Amount": "Deshabiliteu quantitat",
"Disabled": "",
"Documentation": "",
"Down": "",
"Download": "",
"DragToUpload": "",
"Drag_Here_To_Delete": "",
@@ -148,6 +149,7 @@
"File": "",
"Files": "",
"FinishedAt": "",
"First": "",
"First_name": "",
"Food": "",
"FoodInherit": "",
@@ -209,6 +211,7 @@
"Keyword_Alias": "",
"Keywords": "",
"Language": "",
"Last": "",
"Last_name": "",
"Learn_More": "",
"Link": "",
@@ -437,6 +440,7 @@
"Unpin": "",
"UnpinnedConfirmation": "",
"Unrated": "",
"Up": "",
"Update_Existing_Data": "",
"Updated": "",
"UpgradeNow": "",

View File

@@ -115,6 +115,7 @@
"Disable_Amount": "Skrýt množství",
"Disabled": "Deaktivované",
"Documentation": "Dokumentace",
"Down": "",
"Download": "Stáhnout",
"DragToUpload": "",
"Drag_Here_To_Delete": "Přesunutím sem smazat",
@@ -148,6 +149,7 @@
"File": "Soubor",
"Files": "Soubory",
"FinishedAt": "",
"First": "",
"First_name": "Jméno",
"Food": "Potravina",
"FoodInherit": "Propisovatelná pole potraviny",
@@ -208,6 +210,7 @@
"Keyword_Alias": "Přezdívka štítku",
"Keywords": "Štítky",
"Language": "Jazyk",
"Last": "",
"Last_name": "Příjmení",
"Learn_More": "Zjistit víc",
"Link": "Odkaz",
@@ -431,6 +434,7 @@
"Unpin": "Odepnout",
"UnpinnedConfirmation": "{recipe} byl odepnut.",
"Unrated": "Nehodnocené",
"Up": "",
"Update_Existing_Data": "Aktualizovat existující data",
"UpgradeNow": "",
"Url_Import": "Import pomocí URL odkazu",

View File

@@ -106,6 +106,7 @@
"Disable_Amount": "Deaktiver antal",
"Disabled": "Slået fra",
"Documentation": "Dokumentation",
"Down": "",
"Download": "Download",
"DragToUpload": "",
"Drag_Here_To_Delete": "Træk herhen for at slette",
@@ -136,6 +137,7 @@
"File": "Fil",
"Files": "Filer",
"FinishedAt": "",
"First": "",
"First_name": "Fornavn",
"Food": "Mad",
"FoodInherit": "Nedarvelige mad felter",
@@ -196,6 +198,7 @@
"Keyword_Alias": "Alternativt navn til nøgleord",
"Keywords": "Nøgleord",
"Language": "Sprog",
"Last": "",
"Last_name": "Efternavn",
"Learn_More": "Lær mere",
"Link": "Link",
@@ -409,6 +412,7 @@
"Unpin": "Frigør",
"UnpinnedConfirmation": "{recipe} er frigjort.",
"Unrated": "Ikke bedømt",
"Up": "",
"Update_Existing_Data": "Opdaterer eksisterende data",
"UpgradeNow": "",
"Url_Import": "Importer fra link",

View File

@@ -117,6 +117,7 @@
"Disable_Amount": "Menge deaktivieren",
"Disabled": "Deaktiviert",
"Documentation": "Dokumentation",
"Down": "Runter",
"Download": "Herunterladen",
"DragToUpload": "Drag & Drop oder Klicken zum Auswählen",
"Drag_Here_To_Delete": "Hierher ziehen zum Löschen",
@@ -150,6 +151,7 @@
"File": "Datei",
"Files": "Dateien",
"FinishedAt": "Fertig um",
"First": "Erstes",
"First_name": "Vorname",
"Food": "Lebensmittel",
"FoodInherit": "Lebensmittel vererbbare Felder",
@@ -211,6 +213,7 @@
"Keyword_Alias": "Schlagwort Alias",
"Keywords": "Stichwörter",
"Language": "Sprache",
"Last": "Letztes",
"Last_name": "Nachname",
"Learn_More": "Mehr erfahren",
"Link": "Link",
@@ -440,6 +443,7 @@
"Unpin": "Lösen",
"UnpinnedConfirmation": "{recipe} wurde gelöst.",
"Unrated": "Unbewertet",
"Up": "Hoch",
"Update_Existing_Data": "Vorhandene Daten aktualisieren",
"Updated": "Aktualisiert",
"UpgradeNow": "Jetzt Upgraden",

View File

@@ -105,6 +105,7 @@
"Disable_Amount": "Απενεργοποίηση ποσότητας",
"Disabled": "Απενεροποιημένο",
"Documentation": "Τεκμηρίωση",
"Down": "",
"Download": "Λήψη",
"DragToUpload": "",
"Drag_Here_To_Delete": "Σύρετε εδώ για διαγραφή",
@@ -132,6 +133,7 @@
"File": "Αρχείο",
"Files": "Αρχεία",
"FinishedAt": "",
"First": "",
"First_name": "Όνομα",
"Food": "Φαγητό",
"FoodInherit": "Πεδία φαγητών που κληρονομούνται",
@@ -191,6 +193,7 @@
"Keyword_Alias": "Ψευδώνυμο λέξης-κλειδί",
"Keywords": "Λέξεις κλειδιά",
"Language": "Γλώσσα",
"Last": "",
"Last_name": "Επίθετο",
"Learn_More": "Μάθετε περισσότερα",
"Link": "Σύνδεσμος",
@@ -398,6 +401,7 @@
"Unpin": "Αφαίρεση καρφιτσώματος",
"UnpinnedConfirmation": "Η συνταγή {recipe} αφαιρέθηκε από τις καρφιτσωμένες.",
"Unrated": "Χωρίς βαθμολογία",
"Up": "",
"Update_Existing_Data": "Ενημέρωση υπαρχόντων δεδομένων",
"UpgradeNow": "",
"Url_Import": "Εισαγωγή Url",

View File

@@ -116,6 +116,7 @@
"Disable_Amount": "Disable Amount",
"Disabled": "Disabled",
"Documentation": "Documentation",
"Down": "Down",
"Download": "Download",
"DragToUpload": "Drag and Drop or click to select",
"Drag_Here_To_Delete": "Drag here to delete",
@@ -149,6 +150,7 @@
"File": "File",
"Files": "Files",
"FinishedAt": "Finished at",
"First": "First",
"First_name": "First Name",
"Food": "Food",
"FoodInherit": "Food Inheritable Fields",
@@ -210,6 +212,7 @@
"Keyword_Alias": "Keyword Alias",
"Keywords": "Keywords",
"Language": "Language",
"Last": "Last",
"Last_name": "Last Name",
"Learn_More": "Learn More",
"Link": "Link",
@@ -439,6 +442,7 @@
"Unpin": "Unpin",
"UnpinnedConfirmation": "{recipe} has been unpinned.",
"Unrated": "Unrated",
"Up": "Up",
"Update_Existing_Data": "Update Existing Data",
"Updated": "Updated",
"UpgradeNow": "Upgrade now",

View File

@@ -116,6 +116,7 @@
"Disable_Amount": "Deshabilitar cantidad",
"Disabled": "Desactivado",
"Documentation": "Documentación",
"Down": "",
"Download": "Descarga",
"DragToUpload": "",
"Drag_Here_To_Delete": "Arrastrar aquí para eliminar",
@@ -149,6 +150,7 @@
"File": "Archivo",
"Files": "Archivos",
"FinishedAt": "",
"First": "",
"First_name": "Nombre",
"Food": "Alimento",
"FoodInherit": "Campos heredables",
@@ -210,6 +212,7 @@
"Keyword_Alias": "Alias Etiquetas",
"Keywords": "Palabras clave",
"Language": "Lenguaje",
"Last": "",
"Last_name": "Apellidos",
"Learn_More": "Saber Más",
"Link": "Enlace",
@@ -436,6 +439,7 @@
"Unpin": "Desanclar",
"UnpinnedConfirmation": "{recipe} ha sido desanclada.",
"Unrated": "Sin puntuar",
"Up": "",
"Update_Existing_Data": "Actualizar Datos Existentes",
"Updated": "Actualizada",
"UpgradeNow": "",

View File

@@ -59,6 +59,7 @@
"DeviceSettings": "",
"DeviceSettingsHelp": "",
"Disable_Amount": "Poista Määrä käytöstä",
"Down": "",
"Download": "Lataa",
"DragToUpload": "",
"Drag_Here_To_Delete": "Vedä tänne poistaaksesi",
@@ -84,6 +85,7 @@
"File": "Tiedosto",
"Files": "Tiedostot",
"FinishedAt": "",
"First": "",
"Food": "Ruoka",
"Food_Alias": "Ruoan nimimerkki",
"Friday": "",
@@ -113,6 +115,7 @@
"Key_Shift": "Shift",
"Keyword_Alias": "Avainsana-alias",
"Keywords": "Avainsanat",
"Last": "",
"Link": "Linkki",
"Load_More": "Lataa Lisää",
"Log_Cooking": "Kirjaa kokkaus",
@@ -262,6 +265,7 @@
"UnitConversion": "",
"Unit_Alias": "Yksikköalias",
"Unrated": "Luokittelematon",
"Up": "",
"UpgradeNow": "",
"Url_Import": "URL Tuonti",
"Use_Plural_Food_Always": "",

View File

@@ -115,6 +115,7 @@
"Disable_Amount": "Désactiver la quantité",
"Disabled": "Désactivé",
"Documentation": "Documentation",
"Down": "",
"Download": "Télécharger",
"DragToUpload": "",
"Drag_Here_To_Delete": "Glissez ici pour supprimer",
@@ -148,6 +149,7 @@
"File": "Fichier",
"Files": "Fichiers",
"FinishedAt": "",
"First": "",
"First_name": "Prénom",
"Food": "Aliment",
"FoodInherit": "Ingrédient hérité",
@@ -209,6 +211,7 @@
"Keyword_Alias": "Alias de mot-clé",
"Keywords": "Mots-clés",
"Language": "Langue",
"Last": "",
"Last_name": "Nom",
"Learn_More": "Apprenez-en plus",
"Link": "Lien",
@@ -436,6 +439,7 @@
"Unpin": "Détacher",
"UnpinnedConfirmation": "{recipe} a été désépinglée.",
"Unrated": "Non évalué",
"Up": "",
"Update_Existing_Data": "Mettre à jour les données existantes",
"Updated": "Mis à jour",
"UpgradeNow": "",

View File

@@ -116,6 +116,7 @@
"Disable_Amount": "אל תאפשר כמות",
"Disabled": "מושבת",
"Documentation": "תיעוד",
"Down": "",
"Download": "הורדה",
"DragToUpload": "",
"Drag_Here_To_Delete": "משוך לכאן למחיקה",
@@ -149,6 +150,7 @@
"File": "קובץ",
"Files": "קבצים",
"FinishedAt": "",
"First": "",
"First_name": "שם פרטי",
"Food": "אוכל",
"FoodInherit": "ערכי מזון",
@@ -210,6 +212,7 @@
"Keyword_Alias": "שם כינוי למילת מפתח",
"Keywords": "מילות מפתח",
"Language": "שפה",
"Last": "",
"Last_name": "שם משפחה",
"Learn_More": "למד עוד",
"Link": "קישור",
@@ -438,6 +441,7 @@
"Unpin": "שחרר",
"UnpinnedConfirmation": "{recipe} שוחרר מנעיצה.",
"Unrated": "בלתי מדורג",
"Up": "",
"Update_Existing_Data": "עדכון מידע קיים",
"Updated": "עודכן",
"UpgradeNow": "",

View File

@@ -104,6 +104,7 @@
"Disable_Amount": "Összeg kikapcsolása",
"Disabled": "Kikapcsolva",
"Documentation": "Dokumentáció",
"Down": "",
"Download": "Letöltés",
"DragToUpload": "",
"Drag_Here_To_Delete": "Törléshez húzza ide",
@@ -132,6 +133,7 @@
"File": "Fájl",
"Files": "Fájlok",
"FinishedAt": "",
"First": "",
"First_name": "Keresztnév",
"Food": "Alapanyag",
"FoodInherit": "",
@@ -192,6 +194,7 @@
"Keyword_Alias": "",
"Keywords": "Kulcsszavak",
"Language": "Nyelv",
"Last": "",
"Last_name": "Vezetéknév",
"Learn_More": "Tudjon meg többet",
"Link": "Link",
@@ -400,6 +403,7 @@
"Units": "Mennyiségi egységek",
"Unpin": "Levétel",
"Unrated": "Nem értékelt",
"Up": "",
"Update_Existing_Data": "Meglévő adatok frissítése",
"UpgradeNow": "",
"Url_Import": "URL import",

View File

@@ -45,6 +45,7 @@
"Description": "Նկարագրություն",
"DeviceSettings": "",
"DeviceSettingsHelp": "",
"Down": "",
"Download": "Ներբեռնել",
"DragToUpload": "",
"Duplicate": "",
@@ -64,6 +65,7 @@
"File": "",
"Files": "",
"FinishedAt": "",
"First": "",
"Food": "Սննդամթերք",
"Friday": "",
"GettingStarted": "",
@@ -84,6 +86,7 @@
"InstructionsEditHelp": "",
"Invite_Link": "",
"Keywords": "",
"Last": "",
"Link": "",
"Load_More": "",
"Log_Cooking": "Գրանցել եփելը",
@@ -192,6 +195,7 @@
"Today": "",
"Tuesday": "",
"UnitConversion": "",
"Up": "",
"UpgradeNow": "",
"Url_Import": "URL ներմուծում",
"Use_Plural_Food_Always": "",

View File

@@ -94,6 +94,7 @@
"Disable_Amount": "Nonaktifkan Jumlah",
"Disabled": "",
"Documentation": "",
"Down": "",
"Download": "Unduh",
"DragToUpload": "",
"Drag_Here_To_Delete": "",
@@ -121,6 +122,7 @@
"File": "Berkas",
"Files": "File",
"FinishedAt": "",
"First": "",
"First_name": "",
"Food": "",
"FoodInherit": "",
@@ -178,6 +180,7 @@
"Keyword_Alias": "",
"Keywords": "Kata Kunci",
"Language": "",
"Last": "",
"Last_name": "",
"Link": "Link",
"Load_More": "Muat lebih banyak",
@@ -373,6 +376,7 @@
"Unit_Alias": "",
"Units": "",
"Unrated": "",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Impor Url",
"Use_Fractions": "",

View File

@@ -115,6 +115,7 @@
"Disable_Amount": "",
"Disabled": "",
"Documentation": "",
"Down": "",
"Download": "",
"DragToUpload": "",
"Drag_Here_To_Delete": "",
@@ -148,6 +149,7 @@
"File": "",
"Files": "",
"FinishedAt": "",
"First": "",
"First_name": "",
"Food": "",
"FoodInherit": "",
@@ -209,6 +211,7 @@
"Keyword_Alias": "",
"Keywords": "",
"Language": "",
"Last": "",
"Last_name": "",
"Learn_More": "",
"Link": "",
@@ -436,6 +439,7 @@
"Unpin": "",
"UnpinnedConfirmation": "",
"Unrated": "",
"Up": "",
"Update_Existing_Data": "",
"Updated": "",
"UpgradeNow": "",

View File

@@ -99,6 +99,7 @@
"Disable_Amount": "Disabilita Quantità",
"Disabled": "Disabilitato",
"Documentation": "Documentazione",
"Down": "",
"Download": "Scarica",
"DragToUpload": "",
"Drag_Here_To_Delete": "Sposta qui per eliminare",
@@ -126,6 +127,7 @@
"File": "File",
"Files": "File",
"FinishedAt": "",
"First": "",
"First_name": "Nome",
"Food": "Alimento",
"FoodInherit": "Campi ereditabili dagli Alimenti",
@@ -183,6 +185,7 @@
"Keyword_Alias": "Alias Parola Chiave",
"Keywords": "Parole chiave",
"Language": "Lingua",
"Last": "",
"Last_name": "Cognome",
"Link": "Link",
"Load_More": "Carica di più",
@@ -384,6 +387,7 @@
"Unpin": "Non fissare",
"UnpinnedConfirmation": "{recipe} non è più fissata.",
"Unrated": "Senza valutazione",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Importa da URL",
"Use_Fractions": "Usa frazioni",

View File

@@ -106,6 +106,7 @@
"Disable_Amount": "Išjungti sumą",
"Disabled": "",
"Documentation": "",
"Down": "",
"Download": "",
"DragToUpload": "",
"Drag_Here_To_Delete": "",
@@ -134,6 +135,7 @@
"File": "",
"Files": "",
"FinishedAt": "",
"First": "",
"First_name": "",
"Food": "",
"FoodInherit": "",
@@ -194,6 +196,7 @@
"Keyword_Alias": "",
"Keywords": "",
"Language": "",
"Last": "",
"Last_name": "",
"Learn_More": "",
"Link": "",
@@ -407,6 +410,7 @@
"Unpin": "",
"UnpinnedConfirmation": "",
"Unrated": "",
"Up": "",
"Update_Existing_Data": "",
"UpgradeNow": "",
"Url_Import": "URL importavimas",

View File

@@ -103,6 +103,7 @@
"Disable_Amount": "Deaktiver mengde",
"Disabled": "",
"Documentation": "",
"Down": "",
"Download": "Last ned",
"DragToUpload": "",
"Drag_Here_To_Delete": "Dra her for å slette",
@@ -130,6 +131,7 @@
"File": "Fil",
"Files": "Filer",
"FinishedAt": "",
"First": "",
"First_name": "Fornavn",
"Food": "Matretter",
"FoodInherit": "Arvbare felt for matvarer",
@@ -189,6 +191,7 @@
"Keyword_Alias": "Nøkkelord Alias",
"Keywords": "Nøkkelord",
"Language": "Språk",
"Last": "",
"Last_name": "Etternavn",
"Learn_More": "Lær mer",
"Link": "Lenke",
@@ -396,6 +399,7 @@
"Unpin": "Løsne",
"UnpinnedConfirmation": "{recipe} har blitt løsnet.",
"Unrated": "Urangert",
"Up": "",
"Update_Existing_Data": "Oppdater eksisterende data",
"UpgradeNow": "",
"Url_Import": "Importer lenke",

View File

@@ -107,6 +107,7 @@
"Disable_Amount": "Schakel hoeveelheid uit",
"Disabled": "Gedeactiveerd",
"Documentation": "Documentatie",
"Down": "",
"Download": "Download",
"DragToUpload": "",
"Drag_Here_To_Delete": "Sleep hierheen om te verwijderen",
@@ -134,6 +135,7 @@
"File": "Bestand",
"Files": "Bestanden",
"FinishedAt": "",
"First": "",
"First_name": "Voornaam",
"Food": "Ingrediënt",
"FoodInherit": "Eten erfbare velden",
@@ -193,6 +195,7 @@
"Keyword_Alias": "Etiket Alias",
"Keywords": "Etiketten",
"Language": "Taal",
"Last": "",
"Last_name": "Achternaam",
"Learn_More": "Meer informatie",
"Link": "Link",
@@ -400,6 +403,7 @@
"Unpin": "Pin losmaken",
"UnpinnedConfirmation": "{recipe} is losgemaakt.",
"Unrated": "Niet beoordeeld",
"Up": "",
"Update_Existing_Data": "Bestaande gegevens bijwerken",
"UpgradeNow": "",
"Url_Import": "Importeer URL",

View File

@@ -117,6 +117,7 @@
"Disable_Amount": "Wyłącz ilość",
"Disabled": "Wyłączone",
"Documentation": "Dokumentacja",
"Down": "",
"Download": "Pobieranie",
"DragToUpload": "",
"Drag_Here_To_Delete": "Przeciągnij tutaj, aby usunąć",
@@ -150,6 +151,7 @@
"File": "Plik",
"Files": "Pliki",
"FinishedAt": "",
"First": "",
"First_name": "Imię",
"Food": "Żywność",
"FoodInherit": "Pola dziedziczone w żywności",
@@ -211,6 +213,7 @@
"Keyword_Alias": "Alias słowa kluczowego",
"Keywords": "Słowa kluczowe",
"Language": "Język",
"Last": "",
"Last_name": "Nazwisko",
"Learn_More": "Dowiedz się więcej",
"Link": "Link",
@@ -439,6 +442,7 @@
"Unpin": "Odepnij",
"UnpinnedConfirmation": "{recipe} została odpięta.",
"Unrated": "Nieoceniony",
"Up": "",
"Update_Existing_Data": "Zaktualizuj istniejące dane",
"Updated": "Zaktualizowano",
"UpgradeNow": "",

View File

@@ -84,6 +84,7 @@
"DeviceSettings": "",
"DeviceSettingsHelp": "",
"Disable_Amount": "Desativar quantidade",
"Down": "",
"Download": "Transferência",
"DragToUpload": "",
"Drag_Here_To_Delete": "Arraste para aqui para eliminar",
@@ -109,6 +110,7 @@
"File": "Ficheiro",
"Files": "Ficheiros",
"FinishedAt": "",
"First": "",
"Food": "Comida",
"FoodInherit": "Campos herdados por comida",
"FoodNotOnHand": "Não têm {food} disponível.",
@@ -155,6 +157,7 @@
"Keyword_Alias": "Alcunha da palavra-chave",
"Keywords": "Palavras-chave",
"Language": "Linguagem",
"Last": "",
"Link": "Ligação",
"Load_More": "Carregar Mais",
"Log_Cooking": "Registrar Culinária",
@@ -335,6 +338,7 @@
"Unit_Alias": "Alcunha da unidade",
"Units": "Unidades",
"Unrated": "Sem classificação",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Importação de URL",
"Use_Fractions": "Usar frações",

View File

@@ -113,6 +113,7 @@
"Disable_Amount": "Desabilitar Quantidade",
"Disabled": "Desabilitado",
"Documentation": "Documentação",
"Down": "",
"Download": "Baixar",
"DragToUpload": "",
"Drag_Here_To_Delete": "Arraste aqui para deletar",
@@ -144,6 +145,7 @@
"File": "Arquivo",
"Files": "Arquivos",
"FinishedAt": "",
"First": "",
"First_name": "Primeiro Nome",
"Food": "Comida",
"FoodInherit": "Campos herdados por alimento",
@@ -204,6 +206,7 @@
"Keyword_Alias": "Apelido da palavra-chave",
"Keywords": "Palavras-chave",
"Language": "Idioma",
"Last": "",
"Last_name": "Último Nome",
"Learn_More": "Aprender Mais",
"Link": "Link",
@@ -416,6 +419,7 @@
"Unit_Replace": "Substituir Unidade",
"Units": "Unidades",
"Unrated": "Não classificado",
"Up": "",
"Update_Existing_Data": "Atualizar Dados Existentes",
"UpgradeNow": "",
"Url_Import": "Importar de URL",

View File

@@ -101,6 +101,7 @@
"Disable_Amount": "Dezactivare cantitate",
"Disabled": "Dezactivat",
"Documentation": "Documentație",
"Down": "",
"Download": "Descarcă",
"DragToUpload": "",
"Drag_Here_To_Delete": "Mută aici pentru a șterge",
@@ -128,6 +129,7 @@
"File": "Fișier",
"Files": "Fișiere",
"FinishedAt": "",
"First": "",
"First_name": "Prenume",
"Food": "Mâncare",
"FoodInherit": "Câmpuri moștenite de alimente",
@@ -187,6 +189,7 @@
"Keyword_Alias": "Pseudonim cuvânt cheie",
"Keywords": "Cuvinte cheie",
"Language": "Limba",
"Last": "",
"Last_name": "Nume de familie",
"Link": "Link",
"Load_More": "Încărcați mai mult",
@@ -388,6 +391,7 @@
"Unpin": "Anularea fixării",
"UnpinnedConfirmation": "Fixarea {recipe} a fost anulată.",
"Unrated": "Neevaluat",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Importă URL",
"Use_Fractions": "Folosire fracțiuni",

View File

@@ -74,6 +74,7 @@
"DeviceSettingsHelp": "",
"Disable_Amount": "Деактивировать количество",
"Documentation": "Документация",
"Down": "",
"Download": "Загрузить",
"DragToUpload": "",
"Drag_Here_To_Delete": "Переместить для удаления",
@@ -99,6 +100,7 @@
"File": "Файл",
"Files": "Файлы",
"FinishedAt": "",
"First": "",
"Food": "Еда",
"FoodInherit": "Наследуемые поля продуктов питания",
"FoodNotOnHand": "{food} отсутствует в наличии.",
@@ -144,6 +146,7 @@
"Keyword": "Ключевое слово",
"Keyword_Alias": "Ключевые слова",
"Keywords": "Ключевые слова",
"Last": "",
"Link": "Гиперссылка",
"Load_More": "Загрузить еще",
"Log_Cooking": "Журнал приготовления",
@@ -316,6 +319,7 @@
"Unit_Alias": "Единицы измерения",
"Units": "Единицы",
"Unrated": "Без рейтинга",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Импорт гиперссылки",
"User": "Пользователь",

View File

@@ -74,6 +74,7 @@
"DeviceSettings": "",
"DeviceSettingsHelp": "",
"Disable_Amount": "Onemogoči količino",
"Down": "",
"Download": "Prenesi",
"DragToUpload": "",
"Drag_Here_To_Delete": "Povleci sem za izbris",
@@ -99,6 +100,7 @@
"File": "Datoteka",
"Files": "Datoteke",
"FinishedAt": "",
"First": "",
"Food": "Hrana",
"FoodInherit": "Podedovana polja hrane",
"FoodNotOnHand": "Nimaš {food} v roki.",
@@ -139,6 +141,7 @@
"Key_Shift": "Shift",
"Keyword_Alias": "Vzdevek ključne besede",
"Keywords": "Ključne besede",
"Last": "",
"Learn_More": "Preberite Več",
"Link": "Hiperpovezava",
"Load_More": "Naloži več",
@@ -306,6 +309,7 @@
"UnitConversion": "",
"Unit_Alias": "Vzdevek enote",
"Unrated": "Neocenjeno",
"Up": "",
"Update_Existing_Data": "Posodobitev Obstoječih Podatkov",
"UpgradeNow": "",
"Url_Import": "URL uvoz",

View File

@@ -117,6 +117,7 @@
"Disable_Amount": "Inaktivera belopp",
"Disabled": "Inaktiverad",
"Documentation": "Dokumentation",
"Down": "",
"Download": "Ladda ned",
"DragToUpload": "",
"Drag_Here_To_Delete": "Dra hit för att radera",
@@ -150,6 +151,7 @@
"File": "Fil",
"Files": "Filer",
"FinishedAt": "",
"First": "",
"First_name": "Förnamn",
"Food": "Livsmedel",
"FoodInherit": "Ärftliga livsmedels fält",
@@ -211,6 +213,7 @@
"Keyword_Alias": "Nyckelord alias",
"Keywords": "Nyckelord",
"Language": "Språk",
"Last": "",
"Last_name": "Efternamn",
"Learn_More": "Läs mer",
"Link": "Länk",
@@ -439,6 +442,7 @@
"Unpin": "Lossa",
"UnpinnedConfirmation": "{recipe} har lossats.",
"Unrated": "Ej betygsatt",
"Up": "",
"Update_Existing_Data": "Uppdatera existerande data",
"Updated": "Uppdaterad",
"UpgradeNow": "",

View File

@@ -116,6 +116,7 @@
"Disable_Amount": "Tutarı Devre Dışı Bırak",
"Disabled": "Devre Dışı",
"Documentation": "Dokümantasyon",
"Down": "",
"Download": "İndir",
"DragToUpload": "",
"Drag_Here_To_Delete": "Silmek için buraya sürükleyin",
@@ -149,6 +150,7 @@
"File": "Dosya",
"Files": "Dosyalar",
"FinishedAt": "",
"First": "",
"First_name": "İsim",
"Food": "Yiyecek",
"FoodInherit": "Yiyeceğin Devralınabileceği Alanlar",
@@ -210,6 +212,7 @@
"Keyword_Alias": "Anahtar Kelime Takma Adı",
"Keywords": "Anahtar Kelimeler",
"Language": "Dil",
"Last": "",
"Last_name": "Soyisim",
"Learn_More": "Daha Fazla",
"Link": "Bağlantı",
@@ -438,6 +441,7 @@
"Unpin": "Sabitlemeyi Kaldır",
"UnpinnedConfirmation": "{recipe} sabitlemesi kaldırıldı.",
"Unrated": "Derecelendirilmemiş",
"Up": "",
"Update_Existing_Data": "Mevcut Verileri Güncelleyin",
"Updated": "Güncellendi",
"UpgradeNow": "",

View File

@@ -89,6 +89,7 @@
"DeviceSettingsHelp": "",
"Disable_Amount": "Виключити Кількість",
"Documentation": "",
"Down": "",
"Download": "Скачати",
"DragToUpload": "",
"Drag_Here_To_Delete": "Перемістіть сюди, щоб видалити",
@@ -116,6 +117,7 @@
"File": "Файл",
"Files": "Файли",
"FinishedAt": "",
"First": "",
"Food": "Їжа",
"FoodInherit": "Пола Успадкованої Їжі",
"FoodNotOnHand": "У вас немає {food} на руках.",
@@ -169,6 +171,7 @@
"Keyword_Alias": "",
"Keywords": "Ключові слова",
"Language": "Мова",
"Last": "",
"Link": "Посилання",
"Load_More": "Завантажити більше",
"Log_Cooking": "",
@@ -357,6 +360,7 @@
"Unit_Alias": "",
"Units": "",
"Unrated": "Без рейтингу",
"Up": "",
"UpgradeNow": "",
"Url_Import": "Імпорт за посиланням",
"Use_Fractions": "Використовувати дроби",

View File

@@ -113,6 +113,7 @@
"Disable_Amount": "禁用金额",
"Disabled": "禁用",
"Documentation": "文档",
"Down": "",
"Download": "下载",
"DragToUpload": "",
"Drag_Here_To_Delete": "拖动此处可删除",
@@ -145,6 +146,7 @@
"File": "文件",
"Files": "文件",
"FinishedAt": "",
"First": "",
"First_name": "名",
"Food": "食物",
"FoodInherit": "食物可继承的字段",
@@ -206,6 +208,7 @@
"Keyword_Alias": "关键词别名",
"Keywords": "关键词",
"Language": "语言",
"Last": "",
"Last_name": "姓",
"Learn_More": "了解更多",
"Link": "链接",
@@ -430,6 +433,7 @@
"Unpin": "取消固定",
"UnpinnedConfirmation": "{recipe} 已取消固定。",
"Unrated": "未评分",
"Up": "",
"Update_Existing_Data": "更新现有数据",
"UpgradeNow": "",
"Url_Import": "导入网址",

View File

@@ -37,6 +37,7 @@
"Deleted": "",
"DeviceSettings": "",
"DeviceSettingsHelp": "",
"Down": "",
"Download": "",
"DragToUpload": "",
"Duplicate": "",
@@ -53,6 +54,7 @@
"File": "",
"Files": "",
"FinishedAt": "",
"First": "",
"Friday": "",
"GettingStarted": "",
"HeaderWarning": "",
@@ -69,6 +71,7 @@
"InstructionsEditHelp": "",
"Invite_Link": "",
"Keywords": "",
"Last": "",
"Link": "",
"Load_More": "",
"Log_Cooking": "",
@@ -162,6 +165,7 @@
"Today": "",
"Tuesday": "",
"UnitConversion": "",
"Up": "",
"UpgradeNow": "",
"Url_Import": "",
"Use_Plural_Food_Always": "",

View File

@@ -0,0 +1,22 @@
import {Ingredient} from "@/openapi";
/**
* returns a string representing an ingredient
* @param ingredient
*/
export function ingredientToString(ingredient: Ingredient) {
let content = []
if(ingredient.amount != 0){
content.push(ingredient.amount)
}
if(ingredient.unit){
content.push(ingredient.unit.name)
}
if(ingredient.food){
content.push(ingredient.food.name)
}
if(ingredient.note){
content.push(`(${ingredient.note})`)
}
return content.join(' ')
}