159 Commits

Author SHA1 Message Date
boc-the-git
a062a4beaa
feat: Add the ability to flag a food as "on hand", to exclude from shopping list (#3777) 2024-06-28 15:16:04 +00:00
Christian Clauss
e2033b2d67
fix: pre-commit autoupdate && pre-commit run --all-files (#3780) 2024-06-26 10:41:46 +00:00
Asdoos
b220cd6431
feat: Show nutrition on recipe print (#3740)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-06-18 11:08:22 +02:00
Bart Kummel
9f7d74aecf
fix: Make fractions in the ingredient list look a tiny bit nicer (#3725) 2024-06-13 13:04:45 +00:00
boc-the-git
e3c642debf
feat: Set default number of days on meal planner (#3650) 2024-05-26 21:30:15 +00:00
Michael Genson
5c57b3dd1a
feat: OpenAI Ingredient Parsing (#3581) 2024-05-22 09:45:07 +00:00
Zac Warham
68ff5f4b1c
Fixed comment describing method (#3611) 2024-05-17 00:30:01 +00:00
Michael Genson
c82549ccb4
feat: Default To Fractions When Unit Is Empty (#3587)
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2024-05-12 14:15:26 -05:00
Michael Genson
418a8ec72b
fix: Recipe Search Quirks and Session Storage (#3541)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-05-06 15:01:56 +00:00
Michael Genson
3807778e2f
feat: Recipe Actions (#3448)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-05-01 09:20:52 +02:00
Michael Genson
2a541f081a
feat: User-specific Recipe Ratings (#3345) 2024-04-11 21:28:43 -05:00
Kuchenpirat
6449591143
feat: cookbook editor on cookbook page (#3378)
* remove unnecessairy string

* add edit functionality to cookbook page

* restrict to own group
2024-03-26 08:02:20 -05:00
Michael Genson
dfbc890f2c
fix: Recipe Search URL State (#3332)
* fix several state issues with explore page
- update state when there are no query params
- only call search if the query params actually changed
- wait until ready to call API

* store last search query in user prefs

* restore chip tag click to anonymous user
2024-03-25 16:04:42 +00:00
Michael Genson
52c6fe34b2 remove potentially sensitive fields from group self 2024-03-15 19:50:39 +00:00
Michael Genson
b6ccb9fbdb add shared group self to composable 2024-03-15 19:41:26 +00:00
Michael Genson
42523bbfc9
fix: Only call store APIs once (#3306)
* move loading value to inside async function

* share loading state and use it for throttling
2024-03-12 14:36:30 -08:00
Michael Genson
0a344731c8
feat: Timeline Filters (#3284)
* added timeline event filters

* updated empty timeline text

* simplify icons/labels for event types

* added missing translations

* cloned sort improvements to explore page

* added filter indicator

* lint

* removed lint warning

* add top margin to "no events found" text

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>

* fixed reversed sort icons

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>

* fixed sort dir on timeline filter

* sync checkbox state with preferences state

---------

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-03-12 15:20:48 +00:00
Michael Genson
403038a5b2
feat: First Time Setup Wizard (#3204)
* extract user registration form into a composable

* added base wizard component

* added partial setup implementation

* removed unused attrs

* added setup bypass

* made setup page more readable

* add checkbox hints to autoform

* added common settings pages and initial submit logic

* bypass setup in demo

* add full name to user registration

* added fullname and pw handling to setup

* fixed wizard indentation

* added post-setup suggestions

* added tests for backend changes

* renamed Wizard to BaseWizard

* lint fixes

* pass hardcoded default password instead of backend nonsense

* removed old test

* fix e2e

* added setup skip to e2e testing for all admin users

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2024-03-11 13:28:54 +00:00
Hayden
5f6844eceb
feat: Login with OAuth via OpenID Connect (OIDC) (#3280)
* initial oidc implementation

* add dynamic scheme

* e2e test setup

* add caching

* fix

* try this

* add libldap-2.5 to runtime dependencies (#2849)

* New translations en-us.json (Norwegian) (#2851)

* New Crowdin updates (#2855)

* New translations en-us.json (Italian)

* New translations en-us.json (Norwegian)

* New translations en-us.json (Portuguese)

* fix

* remove cache

* cache yarn deps

* cache docker image

* cleanup action

* lint

* fix tests

* remove not needed variables

* run code gen

* fix tests

* add docs

* move code into custom scheme

* remove unneeded type

* fix oidc admin

* add more tests

* add better spacing on login page

* create auth providers

* clean up testing stuff

* type fixes

* add OIDC auth method to postgres enum

* add option to bypass login screen and go directly to iDP

* remove check so we can fallback to another auth method oauth fails

* Add provider name to be shown at the login screen

* add new properties to admin about api

* fix spec

* add a prompt to change auth method when changing password

* Create new auth section. Add more info on auth methods

* update docs

* run ruff

* update docs

* format

* docs gen

* formatting

* initialize logger in class

* mypy type fixes

* docs gen

* add models to get proper fields in docs and fix serialization

* validate id token before using it

* only request a mealie token on initial callback

* remove unused method

* fix unit tests

* docs gen

* check for valid idToken before getting token

* add iss to mealie token

* check to see if we already have a mealie token before getting one

* fix lock file

* update authlib

* update lock file

* add remember me environment variable

* add user group setting to allow only certain groups to log in

---------

Co-authored-by: Carter Mintey <cmintey8@gmail.com>
Co-authored-by: Carter <35710697+cmintey@users.noreply.github.com>
2024-03-10 13:51:36 -05:00
Hayden
b54cdf6425
fix: sync locales in user registration validation (#3278)
* Add ability to inject into Python files

* Update outdated references to gen_global_components.py

* Add code gen for registration locale validation

* sort validators

* update for pydantic 2

* run generator again

---------

Co-authored-by: Gasper Gril <gasper@gril.si>
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2024-03-10 09:58:52 -08:00
Michael Genson
29368d9cc4 move showAll to user preferences 2024-03-06 15:11:43 +00:00
boc-the-git
5d049d5696
Merge branch 'mealie-next' into fix/warn-on-edit-nav 2024-02-08 22:21:35 +11:00
Elijah Mock
70ce34d6c9 Remove logging 2024-02-05 20:22:10 +00:00
Kuchenpirat
13e7dfe920
getAll if array is empty or non existant (#3120) 2024-02-05 07:37:15 -06:00
boc-the-git
abf4b7706f
Merge branch 'mealie-next' into fix/warn-on-edit-nav 2024-02-05 22:30:35 +11:00
Kuchenpirat
52c58e1dc0
feat: bulk deletion on "Manage Data" page (#3056)
* labels bulk delete

* add foods

* bulk delete units

* add categories

* add tags

* add tools

* update translations

* fix types for text

* fix reactivity for stores

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2024-02-04 12:55:14 -06:00
Kuchenpirat
67b7fb007b
feat: Cookbook Create & Delete Improvements (#2902)
* add delete dialog

* put editor into component

* return data on createCookbook store action

* verry basic dialog with create & cancel functions

* 🧹

* cleanup

* add translation

* add dialog-closed to BaseDialog

* update delete dialog messaging

* use cancel instead of dialog-closed
2024-02-04 07:15:25 -09:00
Hayden
8d8a101580
chore: code gen (#3012)
* code-gen

* remove old generator commands

* remove old docker stuff
2024-01-20 16:34:57 +00:00
Michael Genson
10ba4d2d7f
feat: RTL Support for RTL Languages (Hebrew, Arabic) (#2832)
* add language direction to locale generation

* apply language direction when setting language

---------

Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
2024-01-19 16:56:36 +00:00
Elijah Mock
33870dc845
Set up navigation warning while editing recipe 2024-01-06 21:52:56 +00:00
Elijah Mock
265313919c
Vue-ify and add documentation 2024-01-06 21:51:35 +00:00
Elijah Mock
dd5d1b9cba
Add helpers to activate and deactivate warning 2024-01-06 21:49:29 +00:00
Kuchenpirat
6a71af98bd
fix: show copy to clipboard failure (#2886)
* fix for AppButtonCopy

* add some logging

* fix if statement

* refactor, use .then

* check for copied

* Fix recipe share link

* refactor AppButtonCopy

* update tooltip text

* update use-copy

* logging

* fix is supported check

* more fixes for use-copy.ts

---------

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
2023-12-29 15:48:28 +00:00
Michael Genson
1f35a23bfa
fix: Scaled Ingredients Not Changing to Plural (#2726)
* fixed food/unit not updating to plural when scaled

* added test

* fixed weird edgecase that appears only after edits

---------

Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
2023-11-27 16:58:18 +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
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
Michael Genson
bd79c1db2f
chore: Get Rid of Warnings (#2599)
* ignore unsafe html warnings

* remove unused import

* re-order attrs

* removed unused vars/imports

* removed unused import

* refactored v-html

* removed more unused things
2023-10-07 11:23:47 -08:00
Johan Lindell
40ab328bb9
fix: Make sure recipe state is updated correctly (#2566) 2023-09-29 15:59:27 -08: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
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
0a00a6ea0d
fix: removed HTML tags when copying recipe ingredients (#2533) 2023-08-31 09:08:44 -08:00
Hugo van Rijswijk
50a92c165c
feat: improve readability of ingredients list (#2502)
* feat: improve readability of notes in ingredients list

Makes the notes in the ingredients list more readable by making them slightly opaque. This creates a better visual separation between the notes and the rest of the ingredient.

* Use server display if available

* Move note to newline and make quantity more distinct

* Use safeMarkdown for shopping list

* Use component

* Wrap unit in accent color

* Update RecipeIngredientListItem to set food in bold
2023-08-21 15:32:09 +00:00
Michael Genson
e24e28ae03
feat: Improved recipeYield Parsing For Fractions and Decimals (#2507)
* improved recipeYield parsing for fracs/decimals

* added fix for edgecase with weird fractions

* made typescript happy

* lint

* extracted yield calculation into composable

* fixed some gross edgecases

* added tests

* made bare return clearer

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-21 06:54:02 -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
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
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
Jacob Corn
e1d3a247c7
feat: random sort option for front page (#2363)
* Add hook for random sorting

* Add random sorting to front page

* Add multiple tests for random sorting.

* Be extra sure that all recipes are returned.

* Too stable random. seed doesn't reach backend.

* add timestamp to useRecipeSearch

* Update randomization tests for timestamp seeding

* ruff cleanup

* pass timestamp separately in getAll

* remove debugging log items

* remove timestamp from address bar

* remove defaults from backend timestamps

* timestamp should be optional

* fix edge case: query without timestamp

* similar edge case: no timestamp in pagination

* ruff :/

* better edge case handling

* stabilize random search test w/more recipes

* better pagination seeding

* update pagination seed test

* remove redundant random/seed check

* Test for api routes to random sorting.

* please the typing gods

* hack to make query parameters throw correct exc

* ruff

* fix validator message typo

* black reformatting

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-05-29 16:56:20 -08:00
Michael Genson
fe17922bb8
Feature: Global Timeline (#2265)
* extended query filter to accept nested tables

* decoupled timeline api from recipe slug

* modified frontend to use simplified events api

* fixed nested loop index ghosting

* updated existing tests

* gave mypy a snack

* added tests for nested queries

* fixed "last made" render error

* decoupled recipe timeline from dialog

* removed unused props

* tweaked recipe get_all to accept ids

* created group global timeline
added new timeline page to sidebar
reformatted the recipe timeline
added vertical option to recipe card mobile

* extracted timeline item into its own component

* fixed apploader centering

* added paginated scrolling to recipe timeline

* added sort direction config
fixed infinite scroll on dialog
fixed hasMore var not resetting during instantiation

* added sort direction to user preferences

* updated API docs with new query filter feature

* better error tracing

* fix for recipe not found response

* simplified recipe crud route for slug/id
added test for fetching by slug/id

* made query filter UUID validation clearer

* moved timeline menu option below shopping lists

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-04-25 09:46:00 -08:00