366 Commits

Author SHA1 Message Date
Sören
82ce4b5e7a
fix "no data" error on create meal plan modal (#2263) 2023-03-24 08:21:12 -08:00
Hayden
329d2c020d
fix: make parser compare lowercase (#2244)
* use case-insensitive matching

* conditionally render delete button
2023-03-23 09:21:22 -08:00
Michael Genson
9199ae4901
fix: update_at sort (#2250) 2023-03-21 11:51:19 -08:00
Michael Genson
d2134b27ba
fix: Shopping List Mobile Usability (#2247)
* removed handle from edit button

* added dragging delay for touch screens
2023-03-21 11:48:00 -08:00
sephrat
9fd1ba6e46
feat(lang): more localization(#2219)
* feat(lang): localize some views

* fix: typo

* fix: Localization broke bug report generation

* feat(lang): localize recipe page instructions
2023-03-21 11:45:27 -08:00
Hayden
9650ba9b00
refator: reuse search page component (#2240)
* wip: fix recipe card section

* refactor basic search to share composable

* fix dialog results

* use search for cat/tag/tool pages

* update organizer to support name edits

* fix composable typing
2023-03-12 12:59:28 -08:00
Philipp Fischbeck
42d078ef02
fix: frontend register url (#2231) 2023-03-12 12:40:31 -08:00
Michael Genson
3118b0e423
feat: Migrate from Copy Me That (#2212)
* implemented copymethat migration

* added migration tree

* added translation support

* genericized example jpgs

* added test data

* fixed test archive

* switched recipe create to service
added test for timeline event creation

* linting

* lxml go brrr
2023-03-12 12:37:24 -08:00
Carter
93eb2af087
feature: add password reset token endpoint to the admin panel (#2171)
* add password reset token endpoint to the admin panel

* add None check on token

* add localization message for passowrd reset link button
2023-03-12 12:33:36 -08:00
Hayden
11cd277975
ui: rework meal-planner (#2203)
* remove unused TS Ignores

* refactor planner into multiple pages

also includes some minor UI adjustments and some feature work to improve the date selector

* use mobile cards for meal-planner

* remove component
2023-03-02 09:45:06 -09:00
Hayden
01e3bb04b9
feat: update inline docs on group page to clarify private/public settings (#2190) 2023-02-26 12:39:36 -09:00
Hayden
d3f893dec2
chore: auto-set-version-on-ci (#2188)
* setup __version__ on build

* make build clickable link

* fix else-if
2023-02-26 11:51:04 -09:00
Sören
84d55eb920
fix: #2169 webhooks not firing (#2178)
* fix webhooks not firing due to missing session

* disable webhook test button because it doesnt do anything

* fix background task administration not working at all

* fix error in test
2023-02-26 10:27:22 -09:00
Sören
30d8e0b16d
feat: use server-side search for mealplanner (#2174) 2023-02-26 10:21:15 -09:00
Sören
541cdc79aa
fix: 2148 infinite scroll on search (#2173)
* refactor recipe card section to use unified query construct

* rework search page so it uses lazy-loading of RecipeCardSection

* remove RecipeQuery again

* prettier reformatting

* remove recipes/all page

* remove max results setting from search

* fix typing issues
2023-02-26 10:20:26 -09:00
Michael Genson
8ca0fe42de
Feature: More Shopping List Improvements (#2164)
* added color back to labels

* improved mobile view
refactored layout to use grid
allowed text wrapping on item labels
removed label overflow
added completion date on checked items

* sort checked items by last updated

* made checking an item off more responsive

* optimized moving checked items
removed unnecessary updateAll call
removed jitter when shopping list refreshes
2023-02-26 10:12:53 -09:00
Carter
2e6ad5da8e
Feature: Add "Authentication Method" to allow existing users to sign in with LDAP (#2143)
* adds authentication method for users

* fix db migration with postgres

* tests for auth method

* update migration ids

* hide auth method on user creation form

* (docs): Added documentation for the new authentication method

* update migration

* add  to auto-form instead of having hidden fields
2023-02-26 10:12:16 -09:00
Michael Genson
a6c46a7420
Feature: Shopping List Label Section Improvements (#2090)
* added backend for shopping list label config

* updated codegen

* refactored shopping list ops to service
removed unique contraint
removed label settings from main route/schema
added new route for label settings

* codegen

* made sure label settings output in position order

* implemented submenu for label order drag and drop

* removed redundant label and tweaked formatting

* added view by label to user preferences

* made items draggable within each label section

* moved reorder labels to its own button

* made dialog scrollable

* fixed broken model

* refactored labels to use a service
moved shopping list label logic to service
modified label seeder to use service

* added tests

* fix for first label missing the tag icon

* fixed wrong mapped type

* added statement to create existing relationships

* fix restore test, maybe
2023-02-21 18:58:41 -09:00
Michael Genson
e14851531d
fixed last made query value (#2157) 2023-02-20 21:52:16 -09:00
Hayden
df8459a95c
feat: use debounced search (optional) (#2150)
* use debounced search (optional)

* replace homepage with search page
2023-02-19 17:13:29 -09:00
Michael Genson
670907b563
feat: Print Preferences (#2131)
* added basic recipe print settings
added print settings dialog
refactored print view to live inside print container

* removed unwanted padding

* changed preferences layout
2023-02-19 15:37:18 -09:00
Hayden
71f8c1066a
feat: server side search (#2112) (#2117)
* feat: server side search API (#2112)

* refactor repository_recipes filter building

* add food filter to recipe repository page_all

* fix query type annotations

* working search

* add tests and make sure title matches are ordered correctly

* remove instruction matching again

* fix formatting and small issues

* fix another linting error

* make search test no rely on actual words

* fix failing postgres compiled query

* revise incorrectly ordered migration

* automatically extract latest migration version

* test migration orderes

* run type generators

* new search function

* wip: new search page

* sortable field options

* fix virtual scroll issue

* fix search casing bug

* finalize search filters/sorts

* remove old composable

* fix type errors

---------

Co-authored-by: Sören <fleshgolem@gmx.net>
2023-02-11 21:26:10 -09:00
Sören
f4b819899d
fix: duplicate network calls on index page (#2085)
* Prevent extra recipe load on index page

* Prevent loading recipes with food for all components but search ones

* add missing change in search page
2023-02-05 09:52:49 -09:00
Hayden
5dc253799d
fix: eslint errors and failing tests (#2078)
* fix eslint errors

* fix failing tests
2023-01-29 13:01:41 -09:00
sephrat
f8b8680b45
Localize hard-coded texts (#2044)
* feat(lang): localize some views

* feat(lang): an attempt at localizing vuetify (WIP)

* feat(lang): localized some more screens

* feat(lang): localized some more screens again

* feat(lang): hack to localize vuetify

* feat(lang): localize data management pages

* fix linting errors

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-01-28 16:39:51 -09:00
RealFoxie
0acc260447
Improve the default search by focussing on title and description (#2053)
* ignore field norm + weights for basic search

* better search config for advanced search

* undo (wrong) automatic formatting
2023-01-28 16:07:49 -09:00
Michael Genson
617cc1fdfb
Refactor Shopping List API (#2021)
* tidied up shopping list item models
redefined recipe refs and updated models
added calculated display attribute to unify shopping list item rendering
added validation to use a food's label if an item's label is null

* fixed schema reference

* refactored shopping list item service
route all operations through one central method to account for edgecases
return item collections for all operations to account for merging
consolidate recipe items before sending them to the shopping list

* made fractions prettier

* replaced redundant display text util

* fixed edgecase for zero quantity items on a recipe

* fix for pre-merging recipe ingredients

* fixed edgecase for merging create_items together

* fixed bug with merged updated items creating dupes

* added test for self-removing recipe ref

* update items are now merged w/ existing items

* refactored service to make it easier to read

* added a lot of tests

* made it so checked items are never merged

* fixed bug with dragging + re-ordering

* fix for postgres cascade issue

* added prevalidator to recipe ref to avoid db error
2023-01-28 15:45:02 -09:00
Philipp Fischbeck
1e4230093e
fix: fix maintenance page i18n (#2033) 2023-01-14 09:31:47 -09:00
Michael Genson
856a009dd8
fix: for several Shopping List bugs (#1912)
* prevent list refresh while re-ordering items

* update position of new items to stay at the bottom

* prevent refresh while loading

* copy item while editing so it isn't refreshed

* added loading count to handle overlapping actions

* fixed recipe reference throttling

* prevent merging checked and unchecked items
2023-01-08 08:23:24 -09:00
Hayden
ace1d2f9ee
fix: force logout when deleting self - closes #1979 (#2000) 2023-01-07 10:30:45 -09:00
Hayden
fc92c39b7c
feat: additional events dispatch (#1999)
* formatting

* add new user type

* add registration event

* publish events on new mealplan

* update UI for supported types + type updates
2023-01-07 10:18:08 -09:00
Hayden
5dab70fe7e
fix: potential-pwa-fix-3 (#1992)
* force redirect when authenticated

* set start_url to empty string per - https://stackoverflow.com/questions/64608408/workbox-is-precaching-urls-without-revision-info-standalone-true-this-is-gene
2023-01-06 10:51:38 -09:00
Michael Genson
19ae89a195
fix: Fixed API Token "Created On" date (#1909)
* exposed created_at on token schema

* fixed token createdAt reference

* made created_at optional for compatibility
2022-12-29 12:49:19 -09:00
Philipp Fischbeck
bd2bad29a8
chore: make admin maintenance pages localizable (#1914) 2022-12-29 12:48:49 -09:00
Philipp
33dffccaa5
feat: duplicate recipes (#1750)
* feature/frontend: Add duplicate button to recipe

* feature/backend: Add recipe duplication endpoint

* feature/frontend: add duplication API call

* Regenerate API docs

* Fix linter errors

* Fix backend linter error

* Move recipe duplication logic to recipe service

* Add test for recipe duplication

* Improve recipe ingredients copy test

* generate types

* import type

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2022-11-30 20:57:26 -09:00
Michael Genson
b7ab16a7df
fix: shopping list frontend throttling on bulk actions (#1853)
* pause refresh when updating list

* throttle recipe +/- to one concurrent request
2022-11-30 20:29:27 -09:00
Jambaldorj Ochirpurev
1c87a87627
feat: warn use when deleting self (#1848)
* add the alert component on User Management

* refactored the warning text into the language file
2022-11-30 20:26:50 -09:00
Hayden
32c4ce4536
fix: planner date picker local and starting day (#1864)
* fix type definitions

* use day of week setting + fix multiple type errors

* add locale for yyyy-mm-dd format
2022-11-27 11:01:56 -09:00
Michael Genson
e7de0c90a1
feature: live shopping list updates (#1730)
* added polling for changes every 5 seconds

* fixed demi import

* stop polling if the refresh fails too many times

* only poll for changes when the user is active
2022-11-10 15:17:49 -09:00
Hayden
97d9e2a109
chore: lint-and-fix-vue-demi-imports (#1762)
* lint for 'vue-demi' imports

* fix invalid imports
2022-10-23 13:02:56 -08:00
Hayden
ce4315f971
chore: drop legacy editor (#1755)
* drop legacy editor

* remove unused components
2022-10-22 12:49:59 -08:00
Hayden
fcc5d99d40
chore: frontend testing setup (#1739)
* add vitest

* initialize lib w/ tests

* move to dev dep

* run tests in CI

* update file names

* move api folder to lib

* move api and api types to same folder

* update generator outpath

* rm husky

* i guess i _did_ need those types

* reorg types

* extract validators into testable components

* (WIP) start composable testing

* fix import type

* fix linter complaint

* simplify icon type def

* fix linter errors (maybe?)

* rename client file for sorting
2022-10-22 11:51:07 -08:00
Hayden
a56bedb022
fix: mis-ordered shoppinglist after checking item (#1749) 2022-10-21 20:35:45 -08:00
Hayden
d53e78317d
fix: advanced search now saved in URL (#1745)
* use query param for toggle state

* close #1678
2022-10-21 17:34:13 -08:00
Michael Genson
d3da551dae
feat: add profile update suggestion to members page (#1669) 2022-09-25 15:19:26 -08:00
Ben Boeckel
2e6b877ba9
docs: fix typos (#1665)
* docs: fix typos

* typos: fix typos found by `codespell` across the codebase

* docs: fix `macOS` spelling

* docs: fix `authentification` terminology

"Authentification" is not a thing.

* docs: fix `localhost` typo in example link

* typos: fix in-code typos

These are potentially higher risk, but no other mentions of these typos
show up in the codebase.
2022-09-25 15:17:27 -08:00
Hayden
39adea4ee3
feat (WIP): bring png OCR scanning support (#1670)
* Add pytesseract

* Add simple ocr endpoint

replace extension argument

* feat/ocr-editor gui

* fix frontend linting issues

* Add service unit tests

* Add split text modes & single ingredient/instruction editing

* make split mode really reactive

* Remove default step and ingredient

* make the linter haappy

* Accept only image uploads

* Add automatic recipe title suggestion

* Correct regex

* fix incorrect array.map method usage

* make the linter happy again

* Swap route to use asset name

* Rearange buttons

* fix test data

* feat: Allow making image the recipe image

* Add translation

* Make the linter happy

* Restrict function setPropertyValueByPath generic

* Restrict template literal type

* Add a more friendly icon to creation page

* update poetry lock file

* Correct sloppy ocr classes

* Make MyPy happy

* Rewrite safer tests

* Add tesseract to backend test CI container dependencies

* Make canvas element a component global

* Remove unwanted spaces in selected text

* Add way to know if recipe was created with ocr

* Access to ocr-editor for ocr recipes

* Update Alembic revision

* Make the frontend build

* Fix scrolling offset bug

* Allow creation of recipes with custom settings

* Fix rebasing mistakes

* Add format_tsv_output test

* Exclude the tests data directory only

* Enforce camelCase for frontend functions

* Remove import of unused component

* Fix type and class initialization

* Add multi-language support

* Highlight words in mount

* Fix image ratio bug

* Better ocr creation page

* Revert awkward feature to scroll in Selection mode

* Rebasing alembic migrations sux

* Remove obsolete getShared function

* Add function docstring

* Move down ocr creation option

* Make toolbar icons more generic

* Show help at the bottom of the page

* move ocr types to own file

* Use template ref for the canvas

* Use i18n.tc to get strings directly

* Correct naming mistake

* Move Ocr editor to own directory

* Create Ocr Editor parts

* Safeguard recipe properties access

* Add loading frontend animation due to longer request time

* minor cleanup chores

Co-authored-by: Miroito <alban.vachette@gmail.com>
2022-09-25 15:00:45 -08:00
Philipp Fischbeck
c3459d540b
fix: properly set "advanced features" during user registration (#1638)
Previously, "advanced features" was per group, not per user. With this change, this is now properly submitted on user registration. The "seed data" setting is also per group.
2022-09-11 09:56:23 -08:00
Mirko Jeličić
2df791b80b
feat: add option to stay in edit mode after loading from URL. (#1524)
* Add option to stay in edit mode after loading from URL.

* Stay in Edit mode now default behaviour after scraping recipe from URL.

* Fix missing param error.

* Fix incorrect read of boolean variable.

* Fix stupid error due to not understanding Vue.

* minor style and bug fixes

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2022-09-10 10:21:57 -08:00
Philipp Fischbeck
1c938cb835
fix: set meta description and image for shared recipes (#1635) 2022-09-10 09:29:21 -08:00