Commit Graph

519 Commits

Author SHA1 Message Date
Hayden
2cba2d5fd2 New Crowdin updates (#2809)
* New translations en-us.json (Polish)

* New translations en-us.json (Polish)
2023-12-09 21:22:52 +00:00
Michael Genson
f8ad72ec31 fix: Bulk URL Import Fixes (#2796)
* allow expections when fetching content

* removed extra bracket on import text

* added more fault tolerance and limited concurrency

* fix entries not being saved to report

* disable clicking into in-proress import

* conditionally render expansion
2023-12-07 17:08:47 +00:00
Michael Genson
b28aa82846 add logs to help debug backup issues (#2795) 2023-12-06 22:47:35 +01:00
Michael Genson
1d1d61df77 fix: Missing Title and Metadata (#2770)
* add document title to server spa meta

* removed conflicting useMeta

* replaced head with useMeta

* formalized metadata injection

* small injection refactor

* added tests

* added missing global tag

* fixed setting tab title for logged-in users

* simplified metadata update

* remove duplicate tag and fix for foreign users

* add metadata for shared recipes

* added default recipe image

* fixed shared URL

---------

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2023-12-06 16:01:48 +01:00
Kuchenpirat
f32444b91d fix: handle Recipe Times as dicts and lists (#2764)
* handle dicts

* 🧹

* handle arrays

* change default case & add warning logger

* lint

* typo

* update dict case

* update list case

* add timedelta to cases

* remove timedelta so mypy is happy
2023-12-03 05:15:44 +00:00
Hayden
c1393a6b0c New translations en-us.json (Japanese) 2023-12-01 13:59:17 -06:00
Hayden
5639047167 New translations en-us.json (Japanese) 2023-12-01 13:59:16 -06:00
Michael Genson
ff115284d9 add explicit handling for empty 1:many lists 2023-11-25 16:59:23 +00:00
Hayden
23e398e0df New Crowdin updates (#2747)
* New translations en-us.json (Romanian)

* New translations en-us.json (French)

* New translations en-us.json (Spanish)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Arabic)

* New translations en-us.json (Bulgarian)

* New translations en-us.json (Catalan)

* New translations en-us.json (Czech)

* New translations en-us.json (Danish)

* New translations en-us.json (German)

* New translations en-us.json (Greek)

* New translations en-us.json (Finnish)

* New translations en-us.json (Hebrew)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Italian)

* New translations en-us.json (Japanese)

* New translations en-us.json (Korean)

* New translations en-us.json (Lithuanian)

* New translations en-us.json (Dutch)

* New translations en-us.json (Norwegian)

* New translations en-us.json (Polish)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Russian)

* New translations en-us.json (Slovak)

* New translations en-us.json (Slovenian)

* New translations en-us.json (Serbian (Cyrillic))

* New translations en-us.json (Serbian (Cyrillic))

* New translations en-us.json (Serbian (Cyrillic))

* New translations en-us.json (Serbian (Cyrillic))

* New translations en-us.json (Swedish)

* New translations en-us.json (Turkish)

* New translations en-us.json (Ukrainian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Chinese Traditional)

* New translations en-us.json (Vietnamese)

* New translations en-us.json (Galician)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (Croatian)

* New translations en-us.json (Latvian)

* New translations en-us.json (English, United Kingdom)

* New translations en-us.json (French, Canada)
2023-11-21 18:00:22 +00:00
Hayden
bc575ec5ae feat: auto detect first login (#2722)
* 'hide' default email and password env variables

* first login API endpoint

* run code-generators

* frontend indicators for default username and pw

* remove old env variables from docs

* fix env set variable

* remove password from tests
2023-11-15 15:24:24 +00:00
Hayden
b02188a88c New Crowdin updates (#2703)
* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Japanese)

* New translations en-us.json (Japanese)

* New translations en-us.json (Finnish)

* New translations en-us.json (Finnish)

* New translations en-us.json (Spanish)

* New translations en-us.json (Czech)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Bulgarian)
2023-11-14 06:39:31 -09:00
Michael Genson
d440d51ffe feat: plural foods and units, and aliases (#2674)
* added plural names and alias tables to foods/units

* updated models to include plural names and aliases

* updated parser to include plural and aliases

* fixed migrations

* fixed recursive models

* added plural abbreviation to migration

* updated parser and display prop

* update displays to use plurals

* fix display edgecase and remove print

* added/updated display tests

* fixed model bug and added parser tests

* added tests for aliases

* added new plural options to data management page

* removed unique constraint

* made base dialog more customizable

* added alias management to food and unit data pages

* removed unused awaits

* 🧹
2023-11-14 06:39:07 -09:00
Michael Genson
80968b02bb feat: Remove Explore URLs and make the normal URLs public (#2632)
* add groupSlug to most routes

* fixed more routing issues

* fixed jank and incorrect routes

* remove public explore links

* remove unused groupSlug and explore routes

* nuked explore pages

* fixed public toolstore bug

* fixed various routes missing group slug

* restored public app header menu

* fix janky login redirect

* 404 recipe API call returns to login

* removed unused explore layout

* force redirect when using the wrong group slug

* fixed dead admin links

* removed unused middleware from earlier attempt

* 🧹

* improve cookbooks sidebar
fixed sidebar link not working
fixed sidebar link target
hide cookbooks header when there are none

* added group slug to user

* fix $auth typehints

* vastly simplified groupSlug logic

* allow logged-in users to view other groups

* fixed some edgecases that bypassed isOwnGroup

* fixed static home ref

* 🧹

* fixed redirect logic

* lint warning

* removed group slug from group and user pages
refactored all components to use route groupSlug or user group slug
moved some group pages to recipe pages

* fixed some bad types

* 🧹

* moved groupSlug routes under /g/groupSlug

* move /recipe/ to /r/

* fix backend url generation and metadata injection

* moved shopping lists to root/other route fixes

* changed shared from /recipes/ to /r/

* fixed 404 redirect not awaiting

* removed unused import

* fix doc links

* fix public recipe setting not affecting public API

* fixed backend tests

* fix nuxt-generate command

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-11-05 16:07:02 -09:00
Hayden
2764d9e2dd New Crowdin updates (#2664)
* New translations en-us.json (Hebrew)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (French)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Norwegian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Romanian)

* New translations en-us.json (Spanish)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Bulgarian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Bulgarian)

* New translations en-us.json (Bulgarian)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Norwegian)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (German)

* New translations en-us.json (Bulgarian)

---------

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2023-10-28 20:34:30 +00:00
Hayden
75e95817a3 fix: dynamically load theme from API endpoint (#2688)
* dynamically load theme from API endpoint

* add documentation
2023-10-26 22:09:22 -05:00
boc-the-git
228679952e docs: Replace outdated/dead links (#2660) 2023-10-18 09:00:57 -05:00
Hayden
45141a5c5f New Crowdin updates (#2649)
* New translations en-us.json (French)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Catalan)

* New translations en-us.json (Danish)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Dutch)

* New translations en-us.json (Russian)

* New translations en-us.json (Turkish)

* New translations en-us.json (Ukrainian)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (French, Canada)
2023-10-17 07:59:29 -08:00
Kuchenpirat
15f79d1586 fix: User creation through API when signups are supposed to be disabled (#2622)
* fix user creation when signups are supposed to be diabled

* add user registration tests

* run formatter

* fix test filename

---------

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2023-10-16 18:45:47 +00:00
Michael Genson
eba9ff00ce fix: 500 error when sending unauthorized requests (#2639)
* fixed uncaught null token

* added tests
2023-10-15 16:48:15 -08:00
Futureless671
5f0a9981f3 fix: Corrected generated password reset links (#2633)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2023-10-15 20:40:23 +00:00
boc-the-git
cb1769a352 fix: for list of images, remove empty strings (#2634)
* For list of images, remove empty strings

* Fix formatting

---------

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2023-10-15 20:32:51 +00:00
NullCosmos
f72fcc3031 feat: Implemented Plan to Eat migration (#2635)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2023-10-15 20:01:07 +00:00
Hayden
e8b5d8d66f New Crowdin updates (#2631)
* New translations en-us.json (Hungarian)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (Portuguese, Brazilian)
2023-10-15 14:18:37 -05:00
boc-the-git
5bc78f81ea fix: Exclude DB_PROVIDER from logging (#2625)
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-10-13 16:34:38 +00:00
Michael Genson
b153ddf858 feat: more shopping list enhancements (#2587)
* fix new position calculataion

* ensure consistent list item ordering

* fix recipe ref overflow on small screens

* added recipe ref elevation

* tweaked line height (for long notes)

* removed unused user dependency

* remove old shopping list items when there's >100

* 🤷

* cleaned up function generator

* fixed test

* fix potential type error

* made max position calc more efficient
2023-10-07 13:06:00 -08:00
Hayden
f35bc77a7d New Crowdin updates (#2600)
* New translations en-us.json (Romanian)

* New translations en-us.json (French)

* New translations en-us.json (Spanish)

* New translations en-us.json (Afrikaans)

* New translations en-us.json (Arabic)

* New translations en-us.json (Bulgarian)

* New translations en-us.json (Catalan)

* New translations en-us.json (Czech)

* New translations en-us.json (Danish)

* New translations en-us.json (German)

* New translations en-us.json (Greek)

* New translations en-us.json (Finnish)

* New translations en-us.json (Hebrew)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Italian)

* New translations en-us.json (Japanese)

* New translations en-us.json (Korean)

* New translations en-us.json (Lithuanian)

* New translations en-us.json (Dutch)

* New translations en-us.json (Norwegian)

* New translations en-us.json (Polish)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Russian)

* New translations en-us.json (Slovak)

* New translations en-us.json (Slovenian)

* New translations en-us.json (Serbian (Cyrillic))

* New translations en-us.json (Swedish)

* New translations en-us.json (Turkish)

* New translations en-us.json (Ukrainian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Chinese Traditional)

* New translations en-us.json (Vietnamese)

* New translations en-us.json (Galician)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (Croatian)

* New translations en-us.json (Latvian)

* New translations en-us.json (English, United Kingdom)

* New translations en-us.json (French, Canada)

* New translations en-us.json (Arabic)

* New translations en-us.json (Danish)

* New translations en-us.json (Finnish)

* New translations en-us.json (Lithuanian)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Russian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (French, Canada)

* New translations en-us.json (Finnish)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Lithuanian)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Russian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (Romanian)

* New translations en-us.json (Arabic)

* New translations en-us.json (Danish)

* New translations en-us.json (Finnish)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Lithuanian)

* New translations en-us.json (Portuguese)

* New translations en-us.json (Russian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Romanian)

* New translations en-us.json (Hungarian)

* New translations en-us.json (Lithuanian)

* New translations en-us.json (Russian)

* New translations en-us.json (Chinese Simplified)

* New translations en-us.json (Portuguese, Brazilian)

* New translations en-us.json (German)
2023-10-07 13:05:39 -08:00
Hayden
db021023fb chore:bump dependencies and fix errors (#2601)
* bump dependencies and fix errors

* fix depreciated arg

* properly handle validation errors
2023-10-07 13:02:15 -08:00
Johan Lindell
954a2f5113 fix: "remember me" with long TOKEN_TIME (#2602)
* Fixed "remember me" with long TOKEN_TIME

* Reverted changes in create_access_token
2023-10-07 20:58:45 +00:00
Michael Genson
a98e863bca fix: database unique constraints (#2594)
* fixed missing migration name

* added unique constraints to all m2m tables

* fixed bug trying to create duplicate tags

* added more unique constraints

* fixed duplicate seeder data

* updated tests

* fixed seed rollback error
2023-10-07 11:23:13 -08:00
Michael Genson
26ef351ae7 fix: Recipe Zip Export Can't Be Imported (#2585)
* clean recipe data when importing via zip

* added tests

* simplified recursive logic
2023-10-07 11:18:55 -08:00
Matthew Hill
4bd7bda60d fix: Fix bugs with account locking (#2580)
* fix(security): reset login attempts after successful login

Enforce a maximum number of consecutive failed logins. Successfully logging in should reset the
count.

#2569

* fix(security): fix when user is unlocked

The user should be unlocked when locked_at is set, but the lock has expired.

#2569
2023-09-29 15:58:00 -08:00
Flightkick
bb9afd86c1 fix: Use reserved example.com as bogus instead of email.com domain. (#2551)
`email.com` is not a reserved domain, incorrect configuration could result in unintentional effects.
`example.com` is reserved by IANA for bogus purposes, see RFC 6761.
2023-09-23 07:56:34 -08:00
Michael Genson
3e5596f898 fix: Home Doesn't Load For Non-Admin Users (#2556)
* added non-admin route for fetching current group

* simplified frontend group slug fetching

* exposed public link even if user can't invite

* 🧹
2023-09-19 09:06:39 -08:00
Max Bachmann
15c6df88ab perf: use score_cutoff for fuzzy string matching (#2553) 2023-09-16 15:24:45 -05:00
Michael Genson
2dfbe9f08d feat: Improved Ingredient Matching (#2535)
* added normalization to foods and units

* changed search to reference new normalized fields

* fix tests

* added parsed food matching to backend

* prevent pagination from ordering when searching

* added extra fuzzy matching to sqlite ing matching

* added tests

* only apply search ordering when order_by is null

* enabled post-search fuzzy matching for postgres

* fixed postgres fuzzy search test

* idk why this is failing

* 🤦

* simplified frontend ing matching
and restored automatic unit creation

* tightened food fuzzy threshold

* change to rapidfuzz

* sped up fuzzy matching with process

* fixed units not matching by abbreviation

* fast return for exact matches

* replace db searching with pure fuzz

* added fuzzy normalization

* tightened unit fuzzy matching thresh

* cleaned up comments/var names

* ran matching logic through the dryer

* oops

* simplified order by application logic
2023-09-15 17:19:34 +00:00
Hayden
2ad6af2cce feat: consolidate deployment targets and publish to ghcr.io (#2539)
* WIP: proof of concept

* basic meta tag injection

* add support for scraping public/private links

* make tests go brrrrr

* cleanup initialization

* rewrite build config

* remove recipe meta on frontend

* make type checker happy

* remove other deployment methods

* fix issue with JSON response on un-authenticated request

* docs updates

* update tivy scanner

* fix linter stuff

* change registry tag

* build fixes

* fix same mistake I always make
2023-09-14 06:40:13 -08:00
Michael Genson
aec4cb4f31 feat: Advanced Query Filter Record Ordering (#2530)
* added support for multiple order_by strs

* refactored qf to expose nested attr logic

* added nested attr support to order_by

* added tests

* changed unique user to be function-level

* updated docs

* added support for null handling

* updated docs

* undid fixture changes

* fix leaky tests

* added advanced shopping list item test

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-09-14 14:09:05 +00:00
Michael Genson
2c5e5a8421 feat: Public Recipe Browser (#2525)
* fixed incorrect var ref

* added public recipe pagination route

* refactored frontend public/explore API

* fixed broken public cards

* hid context menu from cards when public

* fixed public app header

* fixed random recipe

* added public food, category, tag, and tool routes

* not sure why I thought that would work

* added public organizer/foods stores

* disabled clicking on tags/categories

* added public link to profile page

* linting

* force a 404 if the group slug is missing or invalid

* oops

* refactored to fit sidebar into explore

* fixed invalid logic for app header

* removed most sidebar options from public

* added backend routes for public cookbooks

* added explore cookbook pages/apis

* codegen

* added backend tests

* lint

* fixes v-for keys

* I do not understand but sure why not

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-09-14 06:01:24 -08:00
Michael Genson
c9cc7a93c8 fix: Tools Shouldn't Be Unique Across Groups (#2505)
* fixed type/abc errors in tests

* fixed false positive multitentant tests

* fix tools not allowing unique slugs across groups

* fixed alembic refs

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-21 20:39:23 +00:00
Michael Genson
d6e4829e6f feat: Display Shopping List Item Recipe Refs (#2501)
* added recipe ref display to shopping list items

* added backend support for recipe notes

* added recipe note to item recipe ref display

* fixed note merge bug with 3+ notes

* tweak display

* lint

* updated alembic refs

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-21 09:18:37 -08:00
Hayden
c60c63852b chore: bump deps (#2513)
* bump dependencies

* run code-generator

* add direct dependency to text-unidecode

* fix dev dependencies group
2023-08-20 16:09:13 -08:00
Michael Genson
095edef95e feat: Improve Public URL Readability (#2482)
* added support for group slugs

* modified frontend to use links with group slug

* fixed test refs

* unused import

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-20 10:38:46 -08:00
Michael Genson
99372aa2b6 feat: Generalize Search to Other Models (#2472)
* generalized search logic to SearchFilter

* added default search behavior for all models

* fix for schema overrides

* added search support to several models

* fix for label search

* tests and fixes

* add config for normalizing characters

* dramatically simplified search tests

* bark bark

* fix normalization bug

* tweaked tests

* maybe this time?

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-20 10:30:21 -08:00
Michael Genson
e55258c5be fx: Nextcloud migration fails to parse null times (#2485)
* support null or custom strings

* made time parsing more robust using isodate

* bark bark
2023-08-09 18:52:49 -08:00
Michael Genson
dd947c316a fix: Tandoor doesn't import all images (#2487)
* use glob to find files for import

* bark bark

* add catch for invalid image files
2023-08-09 18:52:32 -08:00
Michael Genson
dfe4942451 feat: Recipe Timeline Images (#2444)
* refactored recipe image paths/service

* added routes for updating/fetching timeline images

* make generate

* added event image upload and rendering

* switched update to patch to preserve timestamp

* added tests

* tweaked order of requests

* always reload events when opening the timeline

* re-arranged elements to make them look nicer

* delete files when timeline event is deleted
2023-08-06 09:49:30 -08:00
Michael Genson
e434029bac feat: prevent all changes to the default user in demo (#2470) 2023-07-29 13:39:49 -08:00
Michael Genson
0f896107f9 feat: Migrate from Tandoor (#2438)
* added tandoor migration to backend

* added tandoor migration to frontend

* updated tests

* ignore 0 amounts

* refactored ingredient display calculation

* fix parsing tandoor recipes with optional data

* generated frontend types

* fixed inconsistent default handling and from_orm

* removed unused imports
2023-07-23 09:52:09 -08:00
Michael Genson
c25b58e404 fix: Missing Paprika and Nextcloud Migration Data (#2434)
* fixed paprika url key

* fixed paprika total and prep time aliases

* added nextcloud time parsing

* mapped paprika categories to tags

* cleaned up netcloud parsetime
2023-07-23 09:50:47 -08:00
Carter
c783d86a2a feat: LDAP attribute validation (#2400)
* validate user attributes on user creation

add logs for invalid or missing attributes

* only update admin flag when admin status changes

* move ldap functions into separate file

* fix linter issues

* actually use the search_user function

* fix types
2023-07-23 09:49:24 -08:00