diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 5df2230caf53..dc6f341fc6d9 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -11,6 +11,8 @@ on: jobs: tests: + env: + PRODUCTION: false runs-on: ubuntu-latest steps: #---------------------------------------------- diff --git a/Dockerfile b/Dockerfile index 53025eccd0de..e1321727d013 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apk add --no-cache libxml2-dev \ zlib-dev -ENV ENV True +ENV PRODUCTION true EXPOSE 80 WORKDIR /app/ @@ -48,6 +48,7 @@ COPY ./dev/data/templates /app/data/templates COPY --from=build-stage /app/dist /app/dist VOLUME [ "/app/data/" ] + RUN chmod +x /app/mealie/run.sh CMD /app/mealie/run.sh diff --git a/Dockerfile.dev b/Dockerfile.dev index bce6c5ea0cfc..2c5519117dae 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -2,6 +2,8 @@ FROM python:3 WORKDIR /app/ +ENV PRODUCTION false + RUN apt-get update -y && \ apt-get install -y python-pip python-dev diff --git a/docs/docs/changelog/v0.4.2.md b/docs/docs/changelog/v0.4.2.md new file mode 100644 index 000000000000..f06a46720628 --- /dev/null +++ b/docs/docs/changelog/v0.4.2.md @@ -0,0 +1,34 @@ +# v0.4.2 + +**App Version: v0.4.2** + +**Database Version: v0.4.0** + +!!! error "Breaking Changes" + 1. With a recent refactor some users been experiencing issues with an environmental variable not being set correct. If you are experiencing issues, please provide your comments [Here](https://github.com/hay-kot/mealie/issues/281). + + 2. If you are a developer, you may experience issues with development as a new environmental variable has been introduced. Setting `PRODUCTION=false` will allow you to develop as normal. + +## Bug Fixes +- Fixed Initialization script (v0.4.1a Hot Fix) - Closes #274 +- Fixed nested list error on recipe scrape - Closes #306 +- Fixed ingredient checkboxes - Closes #304 +- Removed link on recent - Closes #297 +- Categories sidebar is auto generated if no pages are created - Closes #291 +- Fix tag issues on creating custom pages - Closes #290 +- Validate paths on export - Closes #275 +- Walk Nextcloud import directory - Closes #254 + +## General Improvements +- Improved Nextcloud Migration. Mealie will now walk the directories in a zip file looking for directories that match the pattern of a Nextcloud Recipe. Closes #254 + - Rewrite Keywords to Tag Fields + - Rewrite url to orgURL +- Improved Chowdown Migration +- Migration report is now similar to the Backup report +- Tags/Categories are now title cased on import "dinner" -> "Dinner" +- Depreciate `ENV` variable to `PRODUCTION` +- Set `PRODUCTION` env variable to default to true +- Unify Logger across the backend +- mealie.log and last_recipe.json are now downloadable from the frontend from the /admin/about +- New download schema where you request a token and then use that token to hit a single endpoint to download a file. This is a notable change if you are using the API to download backups. +- Recipe images can now be added directly from a URL - [See #117 for details](https://github.com/hay-kot/mealie/issues/117) \ No newline at end of file diff --git a/docs/docs/overrides/api.html b/docs/docs/overrides/api.html index f679a924c9b4..a22ab4c13978 100644 --- a/docs/docs/overrides/api.html +++ b/docs/docs/overrides/api.html @@ -14,7 +14,7 @@
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index ab46a17c748e..2b1560f6cb47 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -77,6 +77,7 @@ nav: - Guidelines: "contributors/developers-guide/general-guidelines.md" - Development Road Map: "roadmap.md" - Change Log: + - v0.4.2 Backend/Migrations: "changelog/v0.4.2.md" - v0.4.1 Frontend/UI: "changelog/v0.4.1.md" - v0.4.0 Authentication: "changelog/v0.4.0.md" - v0.3.0 Improvements: "changelog/v0.3.0.md" diff --git a/frontend/src/api/api-utils.js b/frontend/src/api/api-utils.js index 8c4b0e71d132..853d5ac9fa72 100644 --- a/frontend/src/api/api-utils.js +++ b/frontend/src/api/api-utils.js @@ -61,9 +61,16 @@ const apiReq = { processResponse(response); return response; }, + + async download(url) { + const response = await this.get(url); + const token = response.data.fileToken; + + const tokenURL = baseURL + "utils/download?token=" + token; + window.open(tokenURL, "_blank"); + return response.data; + }, }; - - export { apiReq }; export { baseURL }; diff --git a/frontend/src/api/backup.js b/frontend/src/api/backup.js index 3ec9a1285e53..b6afd6e98bb2 100644 --- a/frontend/src/api/backup.js +++ b/frontend/src/api/backup.js @@ -4,7 +4,7 @@ import { store } from "@/store"; const backupBase = baseURL + "backups/"; -const backupURLs = { +export const backupURLs = { // Backup available: `${backupBase}available`, createBackup: `${backupBase}export/database`, @@ -13,6 +13,8 @@ const backupURLs = { downloadBackup: fileName => `${backupBase}${fileName}/download`, }; + + export const backupAPI = { /** * Request all backups available on the server @@ -43,19 +45,19 @@ export const backupAPI = { /** * Creates a backup on the serve given a set of options * @param {object} data - * @returns + * @returns */ async create(options) { let response = apiReq.post(backupURLs.createBackup, options); return response; }, /** - * Downloads a file from the server. I don't actually think this is used? - * @param {string} fileName + * Downloads a file from the server. I don't actually think this is used? + * @param {string} fileName * @returns Download URL */ async download(fileName) { - let response = await apiReq.get(backupURLs.downloadBackup(fileName)); - return response.data; + const url = backupURLs.downloadBackup(fileName); + apiReq.download(url); }, }; diff --git a/frontend/src/api/recipe.js b/frontend/src/api/recipe.js index 50e45e593365..42d5c47eb889 100644 --- a/frontend/src/api/recipe.js +++ b/frontend/src/api/recipe.js @@ -61,6 +61,11 @@ export const recipeAPI = { return response; }, + async updateImagebyURL(slug, url) { + const response = apiReq.post(recipeURLs.updateImage(slug), { url: url }); + return response; + }, + async update(data) { let response = await apiReq.put(recipeURLs.update(data.slug), data); store.dispatch("requestRecentRecipes"); diff --git a/frontend/src/components/Admin/Backup/ImportDialog.vue b/frontend/src/components/Admin/Backup/ImportDialog.vue index 0d54aeaa5b6e..b379dd9827ce 100644 --- a/frontend/src/components/Admin/Backup/ImportDialog.vue +++ b/frontend/src/components/Admin/Backup/ImportDialog.vue @@ -37,14 +37,7 @@ - - {{ $t("general.download") }} - + {{ $t("general.delete") }} @@ -66,9 +59,10 @@ diff --git a/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue b/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue index 8714c6fea921..4c2f8597d49d 100644 --- a/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue +++ b/frontend/src/components/Admin/Backup/ImportSummaryDialog/index.vue @@ -45,7 +45,7 @@ \ No newline at end of file + diff --git a/frontend/src/components/Admin/General/CreatePageDialog.vue b/frontend/src/components/Admin/General/CreatePageDialog.vue index 57f6830ed2f3..2754e58d03f8 100644 --- a/frontend/src/components/Admin/General/CreatePageDialog.vue +++ b/frontend/src/components/Admin/General/CreatePageDialog.vue @@ -17,13 +17,13 @@ diff --git a/frontend/src/components/Admin/General/CustomPageCreator.vue b/frontend/src/components/Admin/General/CustomPageCreator.vue index 9a0ef8e23905..f17b9a7f8189 100644 --- a/frontend/src/components/Admin/General/CustomPageCreator.vue +++ b/frontend/src/components/Admin/General/CustomPageCreator.vue @@ -3,10 +3,10 @@

- Custom Pages + {{$t('settings.custom-pages')}} - Create + {{$t('general.create')}}

@@ -41,11 +41,11 @@ - Delete + {{$t('general.delete')}} - Edit + {{$t('general.edit')}} @@ -55,7 +55,7 @@ - Save + {{$t('general.save')}} @@ -76,8 +76,8 @@ export default { customPages: [], newPageData: { create: true, - title: "New Page", - buttonText: "Create", + title: this.$t('settings.new-page'), + buttonText: this.$t('general.create'), data: { name: "", categories: [], @@ -86,8 +86,8 @@ export default { }, editPageData: { create: false, - title: "Edit Page", - buttonText: "Update", + title: this.$t('settings.edit-page'), + buttonText: this.$t('general.update'), data: {}, }, }; diff --git a/frontend/src/components/Admin/Migration/MigrationCard.vue b/frontend/src/components/Admin/Migration/MigrationCard.vue index 8dad1af08f5a..f0496caca160 100644 --- a/frontend/src/components/Admin/Migration/MigrationCard.vue +++ b/frontend/src/components/Admin/Migration/MigrationCard.vue @@ -1,5 +1,6 @@