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

feat: Migrate from Tandoor (#2438)

* added tandoor migration to backend

* added tandoor migration to frontend

* updated tests

* ignore 0 amounts

* refactored ingredient display calculation

* fix parsing tandoor recipes with optional data

* generated frontend types

* fixed inconsistent default handling and from_orm

* removed unused imports
This commit is contained in:
Michael Genson 2023-07-23 12:52:09 -05:00 committed by GitHub
parent c25b58e404
commit 0f896107f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 559 additions and 236 deletions

View file

@ -80,6 +80,7 @@ const MIGRATIONS = {
copymethat: "copymethat",
paprika: "paprika",
mealie: "mealie_alpha",
tandoor: "tandoor",
};
export default defineComponent({
@ -118,6 +119,10 @@ export default defineComponent({
text: i18n.tc("migration.mealie-pre-v1.title"),
value: MIGRATIONS.mealie,
},
{
text: i18n.tc("migration.tandoor.title"),
value: MIGRATIONS.tandoor,
},
];
const _content = {
@ -267,6 +272,45 @@ export default defineComponent({
},
],
},
[MIGRATIONS.tandoor]: {
text: i18n.tc("migration.tandoor.description-long"),
tree: [
{
id: 1,
icon: $globals.icons.zip,
name: "tandoor_default_export_full_2023-06-29.zip",
children: [
{
id: 2,
name: "1.zip",
icon: $globals.icons.zip,
children: [
{ id: 3, name: "image.jpeg", icon: $globals.icons.fileImage },
{ id: 4, name: "recipe.json", icon: $globals.icons.codeJson },
]
},
{
id: 5,
name: "2.zip",
icon: $globals.icons.zip,
children: [
{ id: 6, name: "image.jpeg", icon: $globals.icons.fileImage },
{ id: 7, name: "recipe.json", icon: $globals.icons.codeJson },
]
},
{
id: 8,
name: "3.zip",
icon: $globals.icons.zip,
children: [
{ id: 9, name: "image.jpeg", icon: $globals.icons.fileImage },
{ id: 10, name: "recipe.json", icon: $globals.icons.codeJson },
]
}
]
}
],
},
};
function setFileObject(fileObject: File) {