Skip to content

Commit

Permalink
v0.4.2 (#310)
Browse files Browse the repository at this point in the history
* fix links

* actually fix #238

* Feature/mkdocs version bump (#240)

* fix links (#239)

Co-authored-by: hay-kot <[email protected]>

* fix #238

* bump mkdocs version

* light/dark toggle

* light/dark mode css

* API_DOCS defaults to True

* disable build on push for master

Co-authored-by: hay-kot <[email protected]>

* Feature/recipe viewer (#244)

* fix dialog placement

* markdown support in ingredients

* fix line render issue

* fix tag rendering bug

* change ingredients to text area

* no slug error

* add tag pages

* remove console.logs

Co-authored-by: hay-kot <[email protected]>

* changelog v0.4.1

* bug/backup-download (#245)

* fix blocked download

* + download blocked

Co-authored-by: hay-kot <[email protected]>

* Feature/meal planner (#246)

* fixes duplicate recipes in meal-plan #221

* add quick week option

* scope css

* add mealplanner info

Co-authored-by: hay-kot <[email protected]>

* Nextcloud Import Bugs - #248 (#250)

* parses datetime properly + clean category - #248

* add default credentials to docs

Co-authored-by: hay-kot <[email protected]>

* Add bulk import examples to docs. (#252)

* Add bulk import examples to docs.

* Update api-usage.md

* Add Python example for bulk import.

* Change IP address in API example.

* Refactor/app settings (#251)

* fix env setup bugs

* remove unused import

* fix layout issues

* changelog

Co-authored-by: hay-kot <[email protected]>

* env setup fixes

* Feature/about api (#253)

* fix settings

* app info cleanup

Co-authored-by: hay-kot <[email protected]>

* Feature/image minify (#256)

* fix settings

* app info cleanup

* bottom-bar experiment

* remove dup key

* type hints

* add dependency

* updated image with query parameters

* read image options

* add image minification

* add image minification step

* alt image routes

* add image minification

* set mobile bar to top

Co-authored-by: hay-kot <[email protected]>

* Feature/additional endpoints (#257)

* new recipe summary route

* add categories to cards

* add pillow

* show tags instead of categories

* additional debug info

* add todays meal image url

* about page

* fix reactive tag

* changelog + docs

* bump version

Co-authored-by: hay-kot <[email protected]>

* add pillow dependencies (#258)

Co-authored-by: hay-kot <[email protected]>

* Feature/search page (#259)

* add pillow dependencies

* advanced search page

* advanced search apge

* remove extra dependencies

* add pre-run script

Co-authored-by: hay-kot <[email protected]>

* no image assignment

* advanced search

* fix docker dev build

* Do not force theme settings on login form (#260)

* Fix docker dev db persistence (#264)

* Fix docker dev db persistence

* Make run.sh the only startup script for prod + dev

Credits to @hay-kot for run.sh script logic

* Restore dev backend initialization in non-docker setup

* Make run.sh POSIX-friendly

* Allow dev backend to auto-reload in Docker

* Frontend Refactor + Bug Fixes

* merge category and tag selector

* unifiy category selector

* add hint

* spacing

* fix nextcloud migration

* simplify email validator #261

* formatting

* cleanup

* auto-gen

* format

* update run script

* unified category/tag selector

* rename component

* Add advanced search link

* remove old code

* convert keywords to tags

* add proper behavior on rename

* proper image name association on rename

* fix test cleanup

* changelog

* set docker comppand

* minify on migration

Co-authored-by: hay-kot <[email protected]>

* bug-fixes/category-tag-creator (#266)

* fix category labels

* set loader for migration

* v0.4.1

Co-authored-by: hay-kot <[email protected]>

* Hot Fix (#269)

* fix category labels

* set loader for migration

* v0.4.1

* reorganize API docs

Co-authored-by: hay-kot <[email protected]>

* Fix some pytests (#265)

* Fix encoding issue in cleaner unit test

* Add VS Code task to run pytests

* Fix FileExistsError when running Windows

* Add Portuguese Translation (#232)

* Add Portuguese Translation

* add portuguese translation option

* formatting

* add missing }

* specify absolute path

* Feature/migration-rewrite (#278)

* start

* migration rewrite

* update name

* convert chowdown to new methods

* refactor/remove duplicate code

* refactor to unify logger + log to file

* remove toolbox

* Display report on UI

Co-authored-by: hay-kot <[email protected]>

* refactor/image-minification (#285)

* refactor image minification calls

* remove nusiance logs

Co-authored-by: hay-kot <[email protected]>

* feature/debug-info (#286)

* rename 'ENV' to 'PRODUCTION' and default to true

* set env PRODUCTION

* refactor file download process

* add last_recipe.json and log downloads

* changelog + version bump

* set env on workflows

* bump version

Co-authored-by: hay-kot <[email protected]>

* Basic nutrition editor (#288)

* Basic nutrition editor

* fix no image on scrape

* nutrition display

* add recipe images

* update by url

* new upload options

Co-authored-by: hay-kot <[email protected]>

* Sanitize recipe backup filenames (#287)

Fixes #275

* fix page creation fixes #290

* Display categories in sidebar if no pages set (#292)

Fixes  #291

* Enrich page title with context (#296)

- Static pages have their own titles
- The name of the recipe is displayed when viewing it

* fix: translates phrase for locale de (#298)

Co-authored-by: Jonas  Schubert <[email protected]>

* Fix ingredient checkbox click (#305)

Fixes #304
v-list-item already flips the checkbox

* Localize custom pages and search page (#299)

* Localize custom pages and search page

* Fix FR translation for step

* fixes #306

* fixes #297

* Update changelog

* generate docs

Co-authored-by: hay-kot <[email protected]>
Co-authored-by: Nat <[email protected]>
Co-authored-by: sephrat <[email protected]>
Co-authored-by: Pedro Mata Rodrigues <[email protected]>
Co-authored-by: JonasSchubert <[email protected]>
Co-authored-by: Jonas  Schubert <[email protected]>
  • Loading branch information
7 people authored Apr 17, 2021
1 parent 702dabc commit af41bce
Show file tree
Hide file tree
Showing 68 changed files with 3,351 additions and 2,515 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

jobs:
tests:
env:
PRODUCTION: false
runs-on: ubuntu-latest
steps:
#----------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apk add --no-cache libxml2-dev \
zlib-dev


ENV ENV True
ENV PRODUCTION true
EXPOSE 80
WORKDIR /app/

Expand Down Expand Up @@ -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

2 changes: 2 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
34 changes: 34 additions & 0 deletions docs/docs/changelog/v0.4.2.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion docs/docs/overrides/api.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/api/api-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
14 changes: 8 additions & 6 deletions frontend/src/api/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -13,6 +13,8 @@ const backupURLs = {
downloadBackup: fileName => `${backupBase}${fileName}/download`,
};



export const backupAPI = {
/**
* Request all backups available on the server
Expand Down Expand Up @@ -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);
},
};
5 changes: 5 additions & 0 deletions frontend/src/api/recipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
36 changes: 9 additions & 27 deletions frontend/src/components/Admin/Backup/ImportDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@
<v-divider></v-divider>

<v-card-actions>
<v-btn
color="accent"
text
:loading="downloading"
@click="downloadFile(`/api/backups/${name}/download`)"
>
{{ $t("general.download") }}
</v-btn>
<TheDownloadBtn :download-url="downloadUrl" />
<v-spacer></v-spacer>
<v-btn color="error" text @click="raiseEvent('delete')">
{{ $t("general.delete") }}
Expand All @@ -66,9 +59,10 @@

<script>
import ImportOptions from "@/components/Admin/Backup/ImportOptions";
import axios from "axios";
import TheDownloadBtn from "@/components/UI/TheDownloadBtn.vue";
import { backupURLs } from "@/api/backup";
export default {
components: { ImportOptions },
components: { ImportOptions, TheDownloadBtn },
props: {
name: {
default: "Backup Name",
Expand All @@ -92,6 +86,11 @@ export default {
downloading: false,
};
},
computed: {
downloadUrl() {
return backupURLs.downloadBackup(this.name);
},
},
methods: {
updateOptions(options) {
this.options = options;
Expand All @@ -116,23 +115,6 @@ export default {
this.close();
this.$emit(event, eventData);
},
async downloadFile(downloadURL) {
this.downloading = true;
const response = await axios({
url: downloadURL,
method: "GET",
responseType: "blob", // important
});
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement("a");
link.href = url;
link.setAttribute("download", `${this.name}.zip`);
document.body.appendChild(link);
link.click();
this.downloading = false;
},
},
};
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</template>

<script>
import DataTable from "./DataTable";
import DataTable from "@/components/Admin/Backup/ImportSummaryDialog/DataTable";
export default {
components: {
DataTable,
Expand Down Expand Up @@ -145,4 +145,4 @@ export default {
</script>

<style>
</style>
</style>
4 changes: 2 additions & 2 deletions frontend/src/components/Admin/General/CreatePageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<v-text-field
autofocus
v-model="page.name"
label="Page Name"
:label="$t('settings.page-name')"
></v-text-field>
<CategoryTagSelector
v-model="page.categories"
ref="categoryFormSelector"
@mounted="catMounted = true"
tag-selector="false"
:tag-selector="false"
/>
</v-card-text>

Expand Down
18 changes: 9 additions & 9 deletions frontend/src/components/Admin/General/CustomPageCreator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<CreatePageDialog ref="createDialog" @refresh-page="getPages" />
<v-card-text>
<h2 class="mt-1 mb-1 ">
Custom Pages
{{$t('settings.custom-pages')}}
<span>
<v-btn color="success" @click="newPage" small class="ml-3">
Create
{{$t('general.create')}}
</v-btn>
</span>
</h2>
Expand Down Expand Up @@ -41,11 +41,11 @@

<v-card-actions>
<v-btn text small color="error" @click="deletePage(item.id)">
Delete
{{$t('general.delete')}}
</v-btn>
<v-spacer> </v-spacer>
<v-btn small text color="success" @click="editPage(index)">
Edit
{{$t('general.edit')}}
</v-btn>
</v-card-actions>
</v-card>
Expand All @@ -55,7 +55,7 @@
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="success" @click="savePages">
Save
{{$t('general.save')}}
</v-btn>
</v-card-actions>
</v-card>
Expand All @@ -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: [],
Expand All @@ -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: {},
},
};
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Admin/Migration/MigrationCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<v-card outlined class="my-2" :loading="loading">
<MigrationDialog ref="migrationDialog" />
<v-card-title>
{{ title }}
<v-spacer></v-spacer>
Expand Down Expand Up @@ -67,6 +68,7 @@
import UploadBtn from "../../UI/UploadBtn";
import utils from "@/utils";
import { api } from "@/api";
import MigrationDialog from "@/components/Admin/Migration/MigrationDialog.vue";
export default {
props: {
folder: String,
Expand All @@ -76,6 +78,7 @@ export default {
},
components: {
UploadBtn,
MigrationDialog,
},
data() {
return {
Expand All @@ -90,7 +93,8 @@ export default {
async importMigration(file_name) {
this.loading = true;
let response = await api.migrations.import(this.folder, file_name);
this.$emit("imported", response.successful, response.failed);
this.$refs.migrationDialog.open(response);
// this.$emit("imported", response.successful, response.failed);
this.loading = false;
},
readableTime(timestamp) {
Expand Down
Loading

0 comments on commit af41bce

Please sign in to comment.