diff --git a/.gitignore b/.gitignore index 338786e21..4fcab0443 100644 --- a/.gitignore +++ b/.gitignore @@ -10,19 +10,19 @@ mealie/temp/api.html .temp/ -app_data/backups/* -app_data/debug/* -app_data/img/* -app_data/migration/* -app_data/users/* +dev/data/backups/* +dev/data/debug/* +dev/data/img/* +dev/data/migration/* +dev/data/users/* #Exception to keep folders !mealie/dist/.gitkeep -!app_data/backups/.gitkeep -!app_data/backups/dev_sample_data* -!app_data/debug/.gitkeep -!app_data/migration/.gitkeep -!app_data/img/.gitkeep +!dev/data/backups/.gitkeep +!dev/data/backups/dev_sample_data* +!dev/data/debug/.gitkeep +!dev/data/migration/.gitkeep +!dev/data/img/.gitkeep .DS_Store node_modules @@ -153,5 +153,5 @@ ENV/ node_modules/ mealie/data/debug/last_recipe.json *.sqlite -app_data/db/test.db +dev/data/db/test.db scratch.py diff --git a/.vscode/tasks.json b/.vscode/tasks.json index df56f017d..9b7582bd1 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -35,7 +35,7 @@ }, { "label": "Dev: Start Frontend", - "command": "make vue", + "command": "make frontend", "type": "shell", "presentation": { "reveal": "always", @@ -45,7 +45,7 @@ }, { "label": "Dev: Start Docs Server", - "command": "make mdocs", + "command": "make docs", "type": "shell", "presentation": { "reveal": "always", diff --git a/Dockerfile b/Dockerfile index 42ebf796c..4b6df2a0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,9 @@ RUN apk add --update --no-cache --virtual .build-deps \ COPY ./mealie /app/mealie +RUN poetry install --no-dev COPY ./Caddyfile /app -COPY ./app_data/templates /app/data/templates +COPY ./dev/data/templates /app/data/templates COPY --from=build-stage /app/dist /app/dist VOLUME [ "/app/data/" ] diff --git a/app_data/backups/.gitkeep b/dev/data/backups/.gitkeep similarity index 100% rename from app_data/backups/.gitkeep rename to dev/data/backups/.gitkeep diff --git a/app_data/backups/dev_sample_data_2021-Feb-13.zip b/dev/data/backups/dev_sample_data_2021-Feb-13.zip similarity index 100% rename from app_data/backups/dev_sample_data_2021-Feb-13.zip rename to dev/data/backups/dev_sample_data_2021-Feb-13.zip diff --git a/app_data/debug/.gitkeep b/dev/data/debug/.gitkeep similarity index 100% rename from app_data/debug/.gitkeep rename to dev/data/debug/.gitkeep diff --git a/app_data/img/.gitkeep b/dev/data/img/.gitkeep similarity index 100% rename from app_data/img/.gitkeep rename to dev/data/img/.gitkeep diff --git a/app_data/migration/.gitkeep b/dev/data/migration/.gitkeep similarity index 100% rename from app_data/migration/.gitkeep rename to dev/data/migration/.gitkeep diff --git a/app_data/templates/recipes.md b/dev/data/templates/recipes.md similarity index 100% rename from app_data/templates/recipes.md rename to dev/data/templates/recipes.md diff --git a/frontend/src/components/Admin/Backup/ImportDialog.vue b/frontend/src/components/Admin/Backup/ImportDialog.vue index 0749a5aab..497d77404 100644 --- a/frontend/src/components/Admin/Backup/ImportDialog.vue +++ b/frontend/src/components/Admin/Backup/ImportDialog.vue @@ -23,59 +23,15 @@ - - - - - - - - + + + + + @@ -104,7 +60,9 @@ + + \ No newline at end of file diff --git a/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue b/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue index 5ba5b0926..a0bdfb9ae 100644 --- a/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue +++ b/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue @@ -13,73 +13,55 @@ -
+
-

Recipes

-
-
- Success: {{ recipeNumbers.success }} -
-
- Failed: {{ recipeNumbers.failure }} -
-
-
-
- -
-

Themes

-
-
- Success: {{ themeNumbers.success }} -
-
- Failed: {{ themeNumbers.failure }} -
-
-
-
- -
-

Settings

-
-
- Success: {{ settingsNumbers.success }} -
-
- Failed: {{ settingsNumbers.failure }} +

{{ values.title }}

+
Success: {{ values.success }}
+
Failed: {{ values.failure }}
- Recipes - Themes - Settings + {{ $t("general.recipes") }} + {{ $t("general.themes") }} + {{ $t("general.settings") }} + {{ $t("general.users") }} + {{ $t("general.groups") }} - + + + + + + + + + @@ -98,7 +80,9 @@ export default { recipeData: [], themeData: [], settingsData: [], - recipeHeaders: [ + userData: [], + groupData: [], + importHeaders: [ { text: "Status", value: "status", @@ -117,39 +101,52 @@ export default { computed: { recipeNumbers() { - let numbers = { success: 0, failure: 0 }; - this.recipeData.forEach(element => { - if (element.status) { - numbers.success++; - } else numbers.failure++; - }); - return numbers; + return this.calculateNumbers(this.$t("general.recipes"), this.recipeData); }, settingsNumbers() { - let numbers = { success: 0, failure: 0 }; - this.settingsData.forEach(element => { - if (element.status) { - numbers.success++; - } else numbers.failure++; - }); - return numbers; + return this.calculateNumbers( + this.$t("general.settings"), + this.settingsData + ); }, themeNumbers() { - let numbers = { success: 0, failure: 0 }; - this.themeData.forEach(element => { - if (element.status) { - numbers.success++; - } else numbers.failure++; - }); - return numbers; + return this.calculateNumbers(this.$t("general.themes"), this.themeData); + }, + userNumbers() { + return this.calculateNumbers(this.$t("general.users"), this.userData); + }, + groupNumbers() { + return this.calculateNumbers(this.$t("general.groups"), this.groupData); + }, + allNumbers() { + return [ + this.recipeNumbers, + this.settingsNumbers, + this.themeNumbers, + this.userNumbers, + this.groupNumbers, + ]; }, }, methods: { + calculateNumbers(title, list_array) { + if (!list_array) return; + let numbers = { title: title, success: 0, failure: 0 }; + list_array.forEach(element => { + if (element.status) { + numbers.success++; + } else numbers.failure++; + }); + return numbers; + }, open(importData) { + console.log(importData); this.recipeData = importData.recipeImports; - this.themeData = importData.themeReport; - this.settingsData = importData.settingsReport; + this.themeData = importData.themeImports; + this.settingsData = importData.settingsImports; + this.userData = importData.userImports; + this.groupData = importData.groupImports; this.dialog = true; }, }, diff --git a/frontend/src/components/Admin/Backup/NewBackupCard.vue b/frontend/src/components/Admin/Backup/NewBackupCard.vue index 0abbd9125..1a51e77f3 100644 --- a/frontend/src/components/Admin/Backup/NewBackupCard.vue +++ b/frontend/src/components/Admin/Backup/NewBackupCard.vue @@ -15,57 +15,48 @@ {{ $t("general.create") }} - - - - -

{{ $t("general.options") }}:

- -
- -

{{ $t("general.templates") }}:

- -
-
-
+ +
+ + + +

{{ $t("general.options") }}:

+ +
+ +

{{ $t("general.templates") }}:

+ +
+
+
+
+