Commit Graph

690 Commits

Author SHA1 Message Date
Hayden
9b5cf36981 Bug/misc fixes (#618)
* Fixes #617

* set recipe settings default by env variables

* add variables to docker-compse

* update changelog

* bump dependencies

* add fallback name to scraper

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-07-05 16:05:32 -08:00
wengtad
4d853c4ca8 fix db credentials show on logs/frontend (#602) 2021-07-01 12:42:29 -08:00
wengtad
999d0d4322 Optimize Docker (#575)
* reduce docker dev size

* reduce docker prod size

* fix lint

* add gunicorn

* fix bandit reported issues

* add docs external link icon

* add env vars to docs

* add permission to docker

* merge to one backend Dockerfile

* fix codefactor issues

* add docs for puid/pgid

* add docker healthcheck
2021-06-22 10:22:31 -08:00
sephrat
6320ba7ec5 API security hardening (#571)
* Enhance security and safety around user update API

- Prevent a regular user from promoting themself to admin
- Prevent an admin from demoting themself
- Refactor token fixture to admin + regular user tokens

* Restrict user CRUD API to admins

* Secure admin API routes

* Refactor APIrouter into Admin/UserAPIRouter

* Secure theme routes

* Make 'all recipes' routes public

* Secure favorite routes

* Remove redundant checks

* Fix public routes mistakenly flagged user routes

* Make webhooks changeable only by admin

* Allow users to create categories and tags

* Address lint issues
2021-06-22 10:22:15 -08:00
Hayden
f5faff66d3 Feature/import export single recipe (#576)
* remove duplicate keys

* show context menu when not logged in

* remove console.log

* hide menu when printing

* add response to event

* add type definitions

* show context menu always

* add image name enums

* upload/download single recipe

* cleanup menu views+ localization

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-21 16:25:37 -07:00
sephrat
9d64345321 Fix about page (#563)
* Fix error 500 in about page

* Fix log details not showing
2021-06-18 04:50:51 -08:00
Hayden
b545e75f09 Bug fixes/v0.5.1 (#545)
* dump deps

* add job for new groups on interval

* change sort icon

* fix cart icon

* bump version

* changelog

* early return if no comments

* remove comment

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-17 08:57:28 -08:00
Hayden
396d2ccf61 Docs/finale changelog (#530)
* bump version

* add data loss warning

* request correct image

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-16 19:26:15 -08:00
Hayden
d7c883feca Frontend Fixes + Adjust Caddyfile (#518)
* token error handling

* Add additional settings to recipes

* fixes #515

* remove index.html

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-14 19:37:38 -08:00
Hayden
2dc9c8e843 Improve Test Coverage (#511)
* add recipe scaling notes

* test theme rename

* fix coverage call to use poetry

* remove print

* remove async

* consolidate test case data

* fix mealplan tests

* remove redundant else

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-13 13:09:44 -08:00
Hayden
e95ca870b1 Add Database Layer for Recipe Scaling (#506)
* move badge

* fix add individual ingredient

* fix redirect issue

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-12 22:23:23 -08:00
Hayden
c175c8e9a0 add soft fail user dependency (#479)
* add soft fail user dependency

* filter private recipes on get_recipe_summary

* code clean-up

* restrict single recipe

* cleanup dependencies

* add auto_error oauth2 scheme

* update make file

* update make file

* fix early return

* bump python deps

* restrict category/tags

* format deps

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-10 18:31:14 -08:00
wengtad
c2ed4a39ac fix clean_string error (#481) 2021-06-10 08:08:10 -08:00
Hayden
a78fbea711 Feature/improve error message on scrape (#476)
* add better feedback on failed scrape

* fix json download link

* add better recipe parser

* dump deps

* fix force open on mobile

* formatting

* rewrite scraper to use new library

* fix failing tests

* bookmarklet support

* bookmarklet instructions

* recipes changelog

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-09 13:04:54 -08:00
Hayden
59f8b74460 Bug Fixes (#467)
* fixes #463

* fixes #465

* fixes #461

* fixes #458 key error

* Fixes #459

* Fixes comments shown when printing

* fix meal-image not return on API call

* return better status

* reorganize docs

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-06-04 18:45:13 -08:00
Kevin Grossmann
d126f74d35 Fixed backup, updated backup docu (#430)
* Fixed backup, updated docu

* reformatted
2021-06-04 17:27:48 -08:00
Hayden
22d9309112 Bug/general fixes (#450)
* Fix asset link

* remove unused var

* fix no meal-plan returned

* cleanup redundant code

* Fix dates off in UI

* quick set dark/light mode

* user image fixes

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-31 18:44:20 -08:00
hay-kot
785ab184af fix column type 2021-05-29 21:24:23 -08:00
Hayden
2b97af5728 feature/recipe-comments (#448)
* fix favorite color issue

* db and models for comments

* rename files

* initial UI for comments

* fix format

* import / export

* fixes #428

* format

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-29 20:50:17 -08:00
Hayden
6f38fcf81b feature/favorite-recipes (#443)
* add favorites options

* bump dependencies

* add badges to all cards

* typo

* remove console.log

* fix site-loader viewport

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-29 15:54:18 -08:00
Hayden
822663905d feature/mobile-layout (#431)
* lazy load cards

* shopping list recipe search bug

* admin layout fluid

* site loader

* username support

* mobile tabs

* set username at signup

* update user tests

* patch bug on shopping list

* public mealplan links

* support link (I'm a monster)

* icon only on mobile

* padding

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-25 20:01:22 -08:00
Hayden
503fe5cb2e bug/bug-fixes (#424)
* fix image write/caching

* Caddyfile Caching header

* more aggressive caching

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-23 15:05:39 -08:00
Hayden
ef87f2231d feature/mealplanner-rewrite (#417)
* multiple recipes per day

* fix update

* meal-planner rewrite

* disable meal-tests

* spacing

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-22 21:04:19 -08:00
Hayden
dcd9567059 notification import/export (#413)
Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-20 19:16:42 -08:00
Hayden
a1dd6c941b Bug/misc bug fixes (#400)
* potentiall fix #329

* typo

* auto purge events

* image error

* update import dialog

* fix scheduler interval time

* adjust icon position

* check for property

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-08 21:31:19 -08:00
Hayden
14b6ab7ec7 Feature/event notifications (#399)
* additional server events

* sort 'recent recipes' by updated

* remove duplicate code

* fixes #396

* set color

* consolidate tag/category pages

* set colors

* list unorganized recipes

* cleanup old code

* remove flash message, switch to global snackbar

* cancel to close

* cleanup

* notifications first pass

* test notification

* complete notification feature

* use background tasks

* add url param

* update documentation

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-08 18:29:31 -08:00
Hayden
466997febc backend-events + code-cleanup (#395)
* additional server events

* sort 'recent recipes' by updated

* remove duplicate code

* fixes #396

* set color

* consolidate tag/category pages

* set colors

* list unorganized recipes

* cleanup old code

* remove flash message, switch to global snackbar

* cancel to close

* cleanup

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-07 14:33:20 -08:00
Hayden
95ec13161f feature/profile-cards (#391)
* unify format

* pass variables

* remove namespace

* rename

* group-card init

* shuffle + icons

* remove console.logs

* token CRUD

* update changelog

* add profile link

* consolidate mealplan to profile dashboard

* update docs

* add query parameter to search page

* update test routes

* update python depts

* basic token tests

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-06 21:08:27 -08:00
Hayden
1b0de02b71 feature/new-feature-cleanup (#389)
* add json editor to theme editor

* add toolbars tools to recipe sections

* fix recipe yield

* add updated_date to recipe schema

* update time cards

* fix mobile buttons

* fix asset URL

* fix PG errors CRUD

* remove -d from docker-pro

* fix theme tests

* remvoe old typing

* abstract count function

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-05 14:08:13 -08:00
Hayden
c1370afb16 Refactor/backend routers (#388)
* update router

* update caddy file

* setup depends in docker-fole

* make changes for serving on subpath

* set dev config

* fix router signups

* consolidate links

* backup-functionality to dashboard

* new user card

* consolidate theme into profile

* fix theme tests

* fix pg tests

* fix pg tests

* remove unused import

* mobile margin

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-04 20:45:11 -08:00
hay-kot
e13d203524 fix image display 2021-05-03 20:52:33 -08:00
Hayden
5580d177c3 feature/finish-recipe-assets (#384)
* add features to readme

* Copy markdown reference

* prop as whole recipe

* parameter as url instead of query

* add card styling to editor

* move images to /recipes/{slug}/images

* add image to breaking changes

* fix delete and import errors

* fix debug/about response

* logger updates

* dashboard ui

* add server side events

* unorganized routes

* default slot

* add backup viewer to dashboard

* format

* add dialog to backup imports

* initial event support

* delete assets when removed

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-03 19:32:37 -08:00
Hayden
be378cb20c feature/recipe-patch-improvements (#382)
* automated docs update

* recipe rating component

* recipe partial updates - closes #25

* use Vue.delete to update store

* format

* arrow functions

* fix tests

* format

* initial context menu

* localize

* add confirmation dialog

* context menu

* fix bare exception

* update line length

* format all file with prettier

* update changelog

* download as json

* update python dependencies

* update javascript dependencies

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-01 20:46:02 -08:00
Hayden
c196445e61 feature/additional-db (#371)
* add support for setting db_url

* fix tests

* add db_username/password env variables

* init db if super user doesn't exist

* fix tests

* fix tests

* set SQLite default DB_URL

* don't run tests on draft PRs

* add lint/black tests

* add test-all

* spell check settings

* black/flake8

* check format fail

* new badges

* rename workflow

* fix formatting

* remove white-space

* test connection arguments for pg

* format

* add new values to template

* format

* remove old script

* monkeypatch test db

* working docker-compose for postgres

* update docs

* test pg workflow

* format

* add driver

* install w/ poetry

* setup container

* change image

* set database to localhost

* update tests

* set url

* fix url path

* disable cache

* database init

* bust cache

* get by name

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-01 13:35:57 -08:00
sephrat
52e5e9da5d Remove former profile image upon new upload (#381)
* Remove former profile image upon new upload

* Fix test
2021-05-01 13:35:46 -08:00
Hayden
1dc051f562 Refactor/recipe routes (#370)
* format with black

* black format

* flake8

* remove bar exceptions

* remove test for depreciated route

* recipe settings editr

* add sqlite

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-29 21:46:27 -08:00
Hayden
3e80947a4c refactor/docker-updates (#369)
* convert all images to webp

* consolidate docker files

* serve images wiith caddy

* consolidate docker files

* new slim-buster image

* set image url

* add image path

* remove print

* set image path correctly

* cleanup

* caddy proxy path

* docs

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-29 17:47:01 -08:00
sephrat
1e5edc7434 More localization (#358)
* Translate missing items on About page

* Localize import summary dialog

* Make site menu translation reactive

* Localize import options

* Include semi colon in string

* Move API texts to frontend + better status codes

* Provide feedback to user when no meal is planned

* Fix API tests after latest rework

* Add warning for API changes in changelog

* Refactor API texts handling

* Refactor API texts handling #2

* Better API feedback

* Rearrange strings hierarchy

* Add messages upon recipe updated

* Fix 'recipe effected' typo

* Remove snackbar usage in backend

* Translate toolbox

* Provide feedback for tags CRUD

* Fix messed up merge

* Translate sign-up form

* Better feedback for sign-up CRUD

* Refactor log-in API texts handling

* No error message when user is not authenticated

* Remove unimportant console log
2021-04-29 08:22:45 -08:00
Hayden
61e0a52100 refactor/recipe-to-snake-case (#364)
* formatting

* snake case all recipes entries

* set foreign key to int

* run scheduler at startup and not import

* set SQLite file path before imports

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-28 21:17:49 -08:00
Hayden
04255e285f feature/new-recipe-features (#360)
* unify button styles

* fix drag on mobile

* recipe instructions section

* add carbs

* refactor component location

* asset start

* consolidate view/edit components

* asset api

* base dialog event

* Remove 'content'

* remove console.log

* add slug prop

* remove console.log

* recipe assets first pass

* add recipeSettings model

* fix hide/show when no tags/categories

* fix typo

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-28 18:59:37 -08:00
Hayden
846d1eda5b feature/category-tag-crud (#354)
* update tag route

* search.and

* offset for mobile

* relative imports

* get settings

* new page

* category/tag CRUD

* bulk assign frontend

* Bulk assign

* debounce search

* remove dev data

* recipe store refactor

* fix mobile view

* fix failing tests

* commit test data

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-27 11:17:00 -08:00
Hayden
d5a340bde1 App Bar Rewrite (#347)
* Dummy Commit

* consolidate sidebar and app bar

* fix image error

* consolidate sidebar

* new icon for user menu

* fixes #329

* fix double click on mobile

* swap to computed properties

* fix open/close bug

* rewrite search for mobile

* fix ingredient checkbox

* cleanup console.logs

* set default lang + bump version

* draft changelog

* reword

* update env variables

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-25 13:47:08 -08:00
Hayden
8e4b951ecc Get Recipes Route Rewrite (#339)
* deprecate old route

* auto-gen

* recipe card infinite scroll

* fix datatable

* set hard-limit option

* add loader

* set scroll on navigation

* add auto-import

* fix slow initial load

* remove console.logs

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-04-22 22:13:55 -08:00
sephrat
8e27d0b83f Make first day of week in calendar view customizable (#263)
* Make first day of the week customizable

New settings section 'Locale settings'
New setting 'First day of week'
New date picker reusable UI that uses the new setting
Meal planner now uses this new date picker

* Clean up unused code in settings page

* Fix First day of week mapping

* Replace missing v-date-picker with custom card DatePicker

* Mention first day of the week feature in change log
2021-04-20 22:43:36 -08:00
hay-kot
50728a67b4 fixes #314 2021-04-19 19:37:39 -08:00
hay-kot
f14e1e536c add TOKEN_TIME and DEFAULT_EMAIL 2021-04-19 19:36:45 -08:00
hay-kot
6190f0fd1c bump version 2021-04-18 17:45:56 -08:00
hay-kot
a6f89a155e fixes #306 2021-04-16 21:15:11 -08:00
sephrat
e8c121de04 Sanitize recipe backup filenames (#287)
Fixes #275
2021-04-11 13:16:51 -08:00
Hayden
406dae6e97 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 <hay-kot@pm.me>
2021-04-11 13:16:33 -08:00