Compare commits

..

61 Commits

Author SHA1 Message Date
vabene1111
9119d773f1 Merge branch 'develop' 2025-07-31 19:28:03 +02:00
vabene1111
4ea5cdb8b9 Merge branch 'develop' of https://github.com/TandoorRecipes/recipes into develop 2025-07-31 19:27:56 +02:00
vabene1111
f36e5f1d89 re-enabled latest push 2025-07-31 19:27:51 +02:00
Justin Straver
bce95ff604 Translated using Weblate (Slovenian)
Currently translated at 99.6% (794 of 797 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sl/
2025-07-31 17:26:43 +00:00
Justin Straver
0f0a5b32cd Translated using Weblate (Dutch)
Currently translated at 99.4% (793 of 797 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-31 17:26:43 +00:00
Justin Straver
0bd0b794df Translated using Weblate (Spanish)
Currently translated at 95.6% (762 of 797 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/es/
2025-07-31 17:26:43 +00:00
Justin Straver
5267ac12b0 Translated using Weblate (German)
Currently translated at 99.1% (790 of 797 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2025-07-31 17:26:43 +00:00
Justin Straver
02678ffe30 Translated using Weblate (English)
Currently translated at 100.0% (797 of 797 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/en/
2025-07-31 17:26:43 +00:00
Justin Straver
2907e29a11 Translated using Weblate (Dutch)
Currently translated at 99.2% (791 of 797 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-31 16:42:55 +00:00
vabene1111
9d49c4d550 Merge branch 'develop' of http://translate.tandoor.dev/git/tandoor/recipes-backend into develop
# Conflicts:
#	vue3/src/locales/it.json
#	vue3/src/locales/ru.json
2025-07-31 18:04:43 +02:00
vabene1111
e2c6eec628 updated release flow 2025-07-31 17:52:47 +02:00
vabene1111
63716e4397 removed debug code 2025-07-31 17:43:42 +02:00
vabene1111
27e5955c78 Merge branch 'develop' 2025-07-31 17:29:28 +02:00
vabene1111
e9e6cdccca improved help page and dialog 2025-07-31 17:28:36 +02:00
vabene1111
8c8096e348 add ability to disable frontend plugins 2025-07-31 16:17:28 +02:00
vabene1111
9fcbbc17e8 port change logic 2025-07-31 16:04:30 +02:00
vabene1111
0a2f83cf85 localhost in nginx config 2025-07-31 15:49:48 +02:00
vabene1111
01fff0783f additions to help page 2025-07-29 18:04:40 +02:00
vabene1111
7ccdb90f9b updated docs for tandoor 2 setup 2025-07-29 17:37:42 +02:00
vabene1111
c2e522d9f2 service worker 2025-07-29 16:57:51 +02:00
vabene1111
92578dd6a2 new nginx config directory 2025-07-29 16:01:32 +02:00
vabene1111
3103f28fc8 maybe now ? 2025-07-28 22:19:06 +02:00
vabene1111
a5df1275ec try a different way 2025-07-28 22:09:58 +02:00
vabene1111
a4308f9864 run nginx as part of boot script 2025-07-28 22:06:55 +02:00
vabene1111
21526fb676 nginx run 2025-07-28 21:48:19 +02:00
vabene1111
5dc3116c44 service worker settings 2025-07-28 21:45:45 +02:00
vabene1111
2a6a87ec16 run nginx 2025-07-28 21:37:22 +02:00
vabene1111
8149b05185 delete http.d by default 2025-07-28 21:32:59 +02:00
vabene1111
61afbbdfbe tweaking nginx 2025-07-28 21:22:43 +02:00
vabene1111
a37455ccda fix delete failure? 2025-07-28 20:32:22 +02:00
vabene1111
6d711aff41 first try adding nginx directly to container 2025-07-28 20:28:07 +02:00
vabene1111
d4adb975ec fixed theming test 2025-07-28 20:16:37 +02:00
Aleksey
9b581d58bd Translated using Weblate (Russian)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/ru/
2025-07-28 17:58:41 +00:00
Vincenzo Reale
79db8a2fe0 Translated using Weblate (Italian)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/it/
2025-07-28 17:58:41 +00:00
Aleksey
f722d4751b Translated using Weblate (Russian)
Currently translated at 17.4% (85 of 488 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/ru/
2025-07-28 17:58:40 +00:00
vabene1111
368ed2aaf3 updated pytest and fixed ingredient parser 2025-07-28 19:29:20 +02:00
vabene1111
50400e1d20 fixed theming issue 2025-07-28 18:20:30 +02:00
vabene1111
750115cab5 improved properties dialog 2025-07-28 18:20:24 +02:00
vabene1111
9d8acdc41f removed duplicate package.json 2025-07-28 17:37:16 +02:00
vabene1111
7ab36f1a7a small fixes 2025-07-28 17:36:55 +02:00
Justin Straver
b8d0e32550 Translated using Weblate (Dutch)
Currently translated at 99.4% (791 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-23 21:11:45 +00:00
Justin Straver
d9f0889b36 Translated using Weblate (English)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/en/
2025-07-23 21:11:44 +00:00
Justin Straver
35f40f175c Translated using Weblate (Dutch)
Currently translated at 99.6% (792 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-23 08:15:32 +00:00
Aija Kozlovska
291ff86c42 Translated using Weblate (Latvian)
Currently translated at 70.0% (342 of 488 strings)

Translation: Tandoor/Recipes Backend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/lv/
2025-07-21 09:43:37 +00:00
Matjaž T
d2b0aeab52 Translated using Weblate (Slovenian)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/sl/
2025-07-21 07:29:54 +00:00
Vincenzo Reale
3cab6e538e Translated using Weblate (Italian)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/it/
2025-07-21 07:29:54 +00:00
Justin Straver
db67ab6b30 Translated using Weblate (English)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/en/
2025-07-20 16:23:25 +00:00
Justin Straver
b5b31b3dc6 Translated using Weblate (Dutch)
Currently translated at 99.6% (792 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 15:05:13 +00:00
Justin Straver
a15dd2ccbc Translated using Weblate (German)
Currently translated at 99.3% (790 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/de/
2025-07-20 15:05:13 +00:00
Justin Straver
62cc54f9f5 Translated using Weblate (English)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/en/
2025-07-20 15:05:13 +00:00
Justin Straver
75c5bba7e5 Translated using Weblate (Dutch)
Currently translated at 100.0% (795 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 14:51:34 +00:00
Justin Straver
642a0493af Translated using Weblate (Dutch)
Currently translated at 95.2% (757 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 14:23:53 +00:00
Justin Straver
8d8e0be328 Translated using Weblate (Dutch)
Currently translated at 89.3% (710 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 14:07:24 +00:00
Justin Straver
744b588cea Translated using Weblate (Dutch)
Currently translated at 87.2% (694 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 13:56:22 +00:00
Justin Straver
d3a21b9ff0 Translated using Weblate (Dutch)
Currently translated at 87.1% (693 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 11:08:36 +00:00
Justin Straver
3a9c40c566 Translated using Weblate (Dutch)
Currently translated at 79.3% (631 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 09:49:52 +00:00
Justin Straver
387e0a5250 Translated using Weblate (Dutch)
Currently translated at 78.8% (627 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 09:42:17 +00:00
Justin Straver
4ea28ba22a Translated using Weblate (Dutch)
Currently translated at 74.8% (595 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 09:19:02 +00:00
Justin Straver
20660f547c Translated using Weblate (Dutch)
Currently translated at 74.7% (594 of 795 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 09:17:57 +00:00
Justin Straver
2ee63d8568 Translated using Weblate (Dutch)
Currently translated at 74.4% (590 of 793 strings)

Translation: Tandoor/Recipes Frontend
Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/nl/
2025-07-20 08:37:14 +00:00
vabene1111
2179d7d1f7 playing with plugins 2025-07-18 15:49:46 +02:00
117 changed files with 7868 additions and 6477 deletions

View File

@@ -74,9 +74,8 @@ jobs:
flavor: |
latest=false
suffix=${{ matrix.suffix }}
# disable latest for tagged releases while in beta
# type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
tags: |
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
@@ -94,29 +93,29 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
# notify-stable:
# name: Notify Stable
# runs-on: ubuntu-latest
# needs: build-container
# if: startsWith(github.ref, 'refs/tags/')
# steps:
# - name: Set tag name
# run: |
# # Strip "refs/tags/" prefix
# echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# # Send stable discord notification
# - name: Discord notification
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
# uses: Ilshidur/action-discord@0.3.2
# with:
# args: '🚀 Version {{ VERSION }} of tandoor has been released 🥳 Check it out https://github.com/vabene1111/recipes/releases/tag/{{ VERSION }}'
notify-stable:
name: Notify Stable
runs-on: ubuntu-latest
needs: build-container
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Set tag name
run: |
# Strip "refs/tags/" prefix
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# Send stable discord notification
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: '🚀 Version {{ VERSION }} of tandoor has been released 🥳 Check it out https://github.com/vabene1111/recipes/releases/tag/{{ VERSION }}'
notify-beta:
name: Notify Beta
runs-on: ubuntu-latest
needs: build-container
if: startsWith(github.ref, 'refs/tags/')
if: github.ref == 'refs/heads/beta'
steps:
# Send beta discord notification
- name: Discord notification

View File

@@ -38,7 +38,7 @@ jobs:
./cookbook/static
./staticfiles
key: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }}
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue3/src/*') }}
# Build Vue frontend & Dependencies
- name: Set up Node ${{ matrix.node-version }}

2
.gitignore vendored
View File

@@ -89,3 +89,5 @@ venv/
.idea/easy-i18n.xml
cookbook/static/vue3
vue3/node_modules
cookbook/tests/other/docs/reports/tests/tests.html
cookbook/tests/other/docs/reports/tests/pytest.xml

View File

@@ -1,7 +1,7 @@
FROM python:3.13-alpine3.21
#Install all dependencies.
RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg libwebp libxml2-dev libxslt-dev openldap git libgcc libstdc++
RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg libwebp libxml2-dev libxslt-dev openldap git libgcc libstdc++ nginx
#Print all logs without buffering it.
ENV PYTHONUNBUFFERED 1
@@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED 1
ENV DOCKER true
#This port will be used by gunicorn.
EXPOSE 8080
EXPOSE 80 8080
#Create app dir and install requirements.
RUN mkdir /opt/recipes
@@ -40,6 +40,10 @@ RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-de
#Copy project and execute it.
COPY . ./
# delete default nginx config and link it to tandoors config
RUN rm -rf /etc/nginx/http.d
RUN ln -s /opt/recipes/http.d /etc/nginx/http.d
# commented for now https://github.com/TandoorRecipes/recipes/issues/3478
#HEALTHCHECK --interval=30s \
# --timeout=5s \

16
boot.sh
View File

@@ -5,7 +5,11 @@ TANDOOR_PORT="${TANDOOR_PORT:-8080}"
GUNICORN_WORKERS="${GUNICORN_WORKERS:-3}"
GUNICORN_THREADS="${GUNICORN_THREADS:-2}"
GUNICORN_LOG_LEVEL="${GUNICORN_LOG_LEVEL:-'info'}"
NGINX_CONF_FILE=/opt/recipes/nginx/conf.d/Recipes.conf
if [ "${TANDOOR_PORT}" -eq 80 ]; then
echo "TANDOOR_PORT set to 8080 because 80 is now taken by the integrated nginx"
TANDOOR_PORT=8080
fi
display_warning() {
echo "[WARNING]"
@@ -14,11 +18,6 @@ display_warning() {
echo "Checking configuration..."
# Nginx config file must exist if gunicorn is not active
if [ ! -f "$NGINX_CONF_FILE" ] && [ $GUNICORN_MEDIA -eq 0 ]; then
display_warning "Nginx configuration file could not be found at the default location!\nPath: ${NGINX_CONF_FILE}"
fi
# SECRET_KEY (or a valid file at SECRET_KEY_FILE) must be set in .env file
if [ -f "${SECRET_KEY_FILE}" ]; then
@@ -92,6 +91,11 @@ chmod -R 755 /opt/recipes/mediafiles
ipv6_disable=$(cat /sys/module/ipv6/parameters/disable)
# start nginx
echo "Starting nginx"
nginx
echo "Starting gunicorn"
# Check if IPv6 is enabled, only then run gunicorn with ipv6 support
if [ "$ipv6_disable" -eq 0 ]; then
exec gunicorn -b "[::]:$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi

View File

@@ -176,7 +176,6 @@ class IngredientParser:
# if something like this is detected move it to the beginning so the parser can handle it
if len(ingredient) < 1000 and re.search(r'^([^\W\d_])+(.)*[1-9](\d)*\s*([^\W\d_])+', ingredient):
match = re.search(r'[1-9](\d)*\s*([^\W\d_])+', ingredient)
print(f'reording from {ingredient} to {ingredient[match.start():match.end()] + " " + ingredient.replace(ingredient[match.start():match.end()], "")}')
ingredient = ingredient[match.start():match.end()] + ' ' + ingredient.replace(ingredient[match.start():match.end()], '')
# if the string contains parenthesis early on remove it and place it at the end
@@ -211,44 +210,46 @@ class IngredientParser:
# three arguments if it already has a unit there can't be
# a fraction for the amount
if len(tokens) > 2:
never_unit_applied = False
if not self.ignore_rules:
tokens, never_unit_applied = self.automation.apply_never_unit_automation(tokens)
if never_unit_applied:
unit = tokens[1]
food, note = self.parse_food(tokens[2:])
else:
try:
if unit is not None:
# a unit is already found, no need to try the second argument for a fraction
# probably not the best method to do it, but I didn't want to make an if check and paste the exact same thing in the else as already is in the except
raise ValueError
# try to parse second argument as amount and add that, in case of '2 1/2' or '2 ½'
if tokens[1]:
amount += self.parse_fraction(tokens[1])
# assume that units can't end with a comma
if len(tokens) > 3 and not tokens[2].endswith(','):
# try to use third argument as unit and everything else as food, use everything as food if it fails
try:
food, note = self.parse_food(tokens[3:])
unit = tokens[2]
except ValueError:
food, note = self.parse_food(tokens[2:])
else:
if never_unit_applied:
unit = tokens[1]
food, note = self.parse_food(tokens[2:])
else:
try:
if unit is not None:
# a unit is already found, no need to try the second argument for a fraction
# probably not the best method to do it, but I didn't want to make an if check and paste the exact same thing in the else as already is in the except
raise ValueError
# try to parse second argument as amount and add that, in case of '2 1/2' or '2 ½'
if tokens[1]:
amount += self.parse_fraction(tokens[1])
# assume that units can't end with a comma
if len(tokens) > 3 and not tokens[2].endswith(','):
# try to use third argument as unit and everything else as food, use everything as food if it fails
try:
food, note = self.parse_food(tokens[3:])
unit = tokens[2]
except ValueError:
food, note = self.parse_food(tokens[2:])
except ValueError:
# assume that units can't end with a comma
if not tokens[1].endswith(','):
# try to use second argument as unit and everything else as food, use everything as food if it fails
try:
food, note = self.parse_food(tokens[2:])
if unit is None:
unit = tokens[1]
else:
note = tokens[1]
except ValueError:
food, note = self.parse_food(tokens[1:])
else:
else:
food, note = self.parse_food(tokens[2:])
except ValueError:
# assume that units can't end with a comma
if not tokens[1].endswith(','):
# try to use second argument as unit and everything else as food, use everything as food if it fails
try:
food, note = self.parse_food(tokens[2:])
if unit is None:
unit = tokens[1]
else:
note = tokens[1]
except ValueError:
food, note = self.parse_food(tokens[1:])
else:
food, note = self.parse_food(tokens[1:])
else:
# only two arguments, first one is the amount
# which means this is the food
@@ -269,6 +270,7 @@ class IngredientParser:
if food and not self.ignore_rules:
food = self.automation.apply_food_automation(food)
if len(food) > Food._meta.get_field('name').max_length: # test if food name is to long
# try splitting it at a space and taking only the first arg
if len(food.split()) > 1 and len(food.split()[0]) < Food._meta.get_field('name').max_length:
@@ -281,6 +283,4 @@ class IngredientParser:
if len(food.strip()) == 0:
raise ValueError(f'Error parsing string {ingredient}, food cannot be empty')
print(f'parsed {ingredient} to {amount} - {unit} - {food} - {note}')
return amount, unit, food, note[:Ingredient._meta.get_field('note').max_length].strip()

View File

@@ -62,9 +62,14 @@ class FoodPropertyHelper:
computed_properties[pt.id]['food_values'] = self.add_or_create(
computed_properties[p.property_type.id]['food_values'], c.food.id, (c.amount / i.food.properties_food_amount) * p.property_amount, c.food)
if not found_property:
if i.amount == 0 or i.no_amount: # don't count ingredients without an amount as missing
computed_properties[pt.id]['missing_value'] = computed_properties[pt.id]['missing_value'] or False # don't override if another food was already missing
# if no amount and food does not exist yet add it but don't count as missing
if i.amount == 0 or i.no_amount and i.food.id not in computed_properties[pt.id]['food_values']:
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': 0}
# if amount is present but unit is missing indicate it in the result
elif i.unit is None:
if i.food.id not in computed_properties[pt.id]['food_values']:
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': 0}
computed_properties[pt.id]['food_values'][i.food.id]['missing_unit'] = True
else:
computed_properties[pt.id]['missing_value'] = True
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': None}

View File

@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-01 15:04+0200\n"
"PO-Revision-Date: 2024-11-05 10:58+0000\n"
"PO-Revision-Date: 2025-07-21 09:43+0000\n"
"Last-Translator: Aija Kozlovska <kozlovska.aija@gmail.com>\n"
"Language-Team: Latvian <http://translate.tandoor.dev/projects/tandoor/"
"recipes-backend/lv/>\n"
@@ -20,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\n"
"X-Generator: Weblate 5.6.2\n"
"X-Generator: Weblate 5.8.4\n"
#: .\cookbook\forms.py:45
msgid ""
@@ -83,8 +83,8 @@ msgid ""
"Leave empty for dropbox and enter only base url for nextcloud (<code>/remote."
"php/webdav/</code> is added automatically)"
msgstr ""
"Atstājiet tukšu Dropbox un ievadiet tikai Nextcloud bāzes URL (<kods> /"
"remote.php/webdav/ </code> tiek pievienots automātiski)"
"Atstājiet tukšu Dropbox un ievadiet tikai Nextcloud bāzes URL (<code> /remote"
".php/webdav/ </code> tiek pievienots automātiski)"
#: .\cookbook\forms.py:188
msgid ""
@@ -147,48 +147,65 @@ msgid ""
"Determines how fuzzy a search is if it uses trigram similarity matching (e."
"g. low values mean more typos are ignored)."
msgstr ""
"Nosaka cik precīza ir meklēšana gadījumā, ja tiek izmantota trigram līdzība ("
"jo zemāka vērtība, jo vairāk rakstīšanas kļūdas tiek ignorētas)."
#: .\cookbook\forms.py:340
msgid ""
"Select type method of search. Click <a href=\"/docs/search/\">here</a> for "
"full description of choices."
msgstr ""
"Izvēlies meklēšanas veidu. Spied <a href=\"/docs/search/\">šeit</a>, lai "
"apskatītu visas iespējas."
#: .\cookbook\forms.py:341
msgid ""
"Use fuzzy matching on units, keywords and ingredients when editing and "
"importing recipes."
msgstr ""
"Izmanto aptuveno meklēšanu vienībām, atslēgas vārdiem un sastāvdaļām "
"importējot un labojot receptes."
#: .\cookbook\forms.py:342
msgid ""
"Fields to search ignoring accents. Selecting this option can improve or "
"degrade search quality depending on language"
msgstr ""
"Lauki, kurus meklējot ignorēt akcentus. Šī varianta izvēlēšanās var uzlabot "
"vai pasliktināt meklēšanas kvalitāti atkarībā no valodas"
#: .\cookbook\forms.py:343
msgid ""
"Fields to search for partial matches. (e.g. searching for 'Pie' will return "
"'pie' and 'piece' and 'soapie')"
msgstr ""
"Lauki, kuros meklēt aptuveno līdzību. (piem. meklējot vārdu 'Kūka' tiks "
"atrasts arī 'kūka' un 'ābolkūka')"
#: .\cookbook\forms.py:344
msgid ""
"Fields to search for beginning of word matches. (e.g. searching for 'sa' "
"will return 'salad' and 'sandwich')"
msgstr ""
"Lauki, kuros meklēt vārdu līdzības sākumu. (piem meklējot 'la' atradīt "
"'lapas' un 'laims')"
#: .\cookbook\forms.py:345
msgid ""
"Fields to 'fuzzy' search. (e.g. searching for 'recpie' will find 'recipe'.) "
"Note: this option will conflict with 'web' and 'raw' methods of search."
msgstr ""
"Lauki, kuriem izmantot aptuveno meklēšanu. (piem. meklējot 'recpte' tiks "
"atrasts 'recepte'.) Piezīme: šis variants konfliktēs ar 'web' un 'raw' "
"meklēšanas metodēm."
#: .\cookbook\forms.py:346
msgid ""
"Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods "
"only function with fulltext fields."
msgstr ""
"Lauki priekš pilnās teksta meklēšanas. Piezīme: 'web', 'phrase' un 'raw' "
"meklēšanas metodes darbojās tikai ar pilno teksta meklēšanu."
#: .\cookbook\forms.py:350
#, fuzzy
@@ -198,11 +215,11 @@ msgstr "Meklēt"
#: .\cookbook\forms.py:350
msgid "Fuzzy Lookups"
msgstr ""
msgstr "Aptuvenā meklēšana"
#: .\cookbook\forms.py:350
msgid "Ignore Accent"
msgstr ""
msgstr "Ignorēt akcentus"
#: .\cookbook\forms.py:350
msgid "Partial Match"
@@ -745,8 +762,8 @@ msgid ""
" ."
msgstr ""
"Lūdzu apstipriniet, ka\n"
" <a href=\"mailto:%(email)s\">%(email)s</a> ir lietotāja "
"%(user_display) e-pasta adrese\n"
" <a href=\"mailto:%(email)s\">%(email)s</a> ir e-pasta adrese "
"lietotājam %(user_display)\n"
" ."
#: .\cookbook\templates\account\email_confirm.html:22
@@ -1331,7 +1348,7 @@ msgstr ""
#: .\cookbook\templates\markdown_info.html:57
#: .\cookbook\templates\markdown_info.html:73
msgid "or by leaving a blank line in between."
msgstr "vai atstājot tukšu rindu starp ."
msgstr "vai atstājot tukšu rindu starp."
#: .\cookbook\templates\markdown_info.html:59
#: .\cookbook\templates\markdown_info.html:74
@@ -1443,7 +1460,7 @@ msgstr "Nav Tiesību"
#: .\cookbook\templates\no_groups_info.html:17
msgid "You do not have any groups and therefor cannot use this application."
msgstr "Jūs neesat nevienā grupā un tādēļ nevarat izmantot šo lietotni!"
msgstr "Jūs neesat nevienā grupā un tādēļ nevarat izmantot šo lietotni."
#: .\cookbook\templates\no_groups_info.html:18
#: .\cookbook\templates\no_perm_info.html:15
@@ -1460,7 +1477,7 @@ msgid ""
"You do not have the required permissions to view this page or perform this "
"action."
msgstr ""
"Jums nav nepieciešamo atļauju, lai skatītu šo vietni vai veiktu šo darbību!"
"Jums nav nepieciešamo atļauju, lai skatītu šo vietni vai veiktu šo darbību."
#: .\cookbook\templates\offline.html:6
msgid "Offline"
@@ -1548,6 +1565,16 @@ msgid ""
"html#TEXTSEARCH-PARSING-QUERIES>Postgresql's website.</a>\n"
" "
msgstr ""
" \n"
" Pilnā teksta meklēšanas mēģinājums vienkāršot dotos vārdus, lai "
"tie sakristu ar tipiskajiem variantiem. Piemēram: 'griezt', 'griezšana', "
"'griezums' tiks vienkāršots uz 'griez'.\n"
" Lai kontrolētu meklētāja darbību ievadot vairākus meklējamos "
"vārdus, ir pieejamas vairākas zemāk aprakstītās metodes.\n"
" Pilno tehnisko informāciju par tām var apskatīt <a "
"href=https://www.postgresql.org/docs/current/textsearch-controls.html"
"#TEXTSEARCH-PARSING-QUERIES>Postgresql mājas lapā.</a>\n"
" "
#: .\cookbook\templates\search_info.html:29
msgid ""
@@ -2547,22 +2574,12 @@ msgid "Unable to determine PostgreSQL version."
msgstr ""
#: .\cookbook\views\views.py:317
#, fuzzy
#| msgid ""
#| "\n"
#| " This application is not running with a Postgres database "
#| "backend. This is ok but not recommended as some\n"
#| " features only work with postgres databases.\n"
#| " "
msgid ""
"This application is not running with a Postgres database backend. This is ok "
"but not recommended as some features only work with postgres databases."
msgstr ""
"\n"
" Šī lietojumprogramma nedarbojas, izmantojot Postgres datubāzi. "
"Tas ir labi, bet nav ieteicams, jo dažas\n"
" funkcijas darbojas tikai ar Postgres datu bāzēm.\n"
" "
"Šī lietojumprogramma nedarbojas, izmantojot Postgres datubāzi. Tas ir labi, "
"bet nav ieteicams, jo dažas funkcijas darbojas tikai ar Postgres datu bāzēm."
#: .\cookbook\views\views.py:360
#, fuzzy

View File

@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-01 15:04+0200\n"
"PO-Revision-Date: 2024-11-12 17:58+0000\n"
"Last-Translator: Владислав <vlad@kelonmyosa.ru>\n"
"PO-Revision-Date: 2025-07-28 17:58+0000\n"
"Last-Translator: Aleksey <streltsov3@gmail.com>\n"
"Language-Team: Russian <http://translate.tandoor.dev/projects/tandoor/"
"recipes-backend/ru/>\n"
"Language: ru\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 5.6.2\n"
"X-Generator: Weblate 5.8.4\n"
#: .\cookbook\forms.py:45
msgid ""
@@ -90,22 +90,24 @@ msgid ""
"<a href=\"https://www.home-assistant.io/docs/authentication/#your-account-"
"profile\">Long Lived Access Token</a> for your HomeAssistant instance"
msgstr ""
"<a href=\"https://www.home-assistant.io/docs/authentication/#your-account-"
"profile\">Длительный токен доступа</a> для вашей установки HomeAssistant"
#: .\cookbook\forms.py:193
msgid "Something like http://homeassistant.local:8123/api"
msgstr ""
msgstr "Что-то вроде http://homeassistant.local:8123/api"
#: .\cookbook\forms.py:205
msgid "http://homeassistant.local:8123/api for example"
msgstr ""
msgstr "Например, http://homeassistant.local:8123/api"
#: .\cookbook\forms.py:222 .\cookbook\views\edit.py:117
msgid "Storage"
msgstr ""
msgstr "Хранилище"
#: .\cookbook\forms.py:222
msgid "Active"
msgstr ""
msgstr "Активный"
#: .\cookbook\forms.py:226
msgid "Search String"
@@ -125,16 +127,12 @@ msgid "Email address already taken!"
msgstr "Этот email уже используется!"
#: .\cookbook\forms.py:275
#, fuzzy
#| msgid ""
#| "An email address is not required but if present the invite link will be "
#| "send to the user."
msgid ""
"An email address is not required but if present the invite link will be sent "
"to the user."
msgstr ""
"email не требуется, но если он присутствует, пользователю будет отправлена "
"ссылка для приглашения."
"Адрес электронной почты не обязателен, но если он указан, ссылка-приглашение "
"будет отправлена пользователю."
#: .\cookbook\forms.py:287
msgid "Name already taken."
@@ -149,6 +147,9 @@ msgid ""
"Determines how fuzzy a search is if it uses trigram similarity matching (e."
"g. low values mean more typos are ignored)."
msgstr ""
"Определяет степень нечёткости поиска при использовании сопоставления по "
"триграммам (например, низкие значения означают, что больше опечаток "
"игнорируется)."
#: .\cookbook\forms.py:340
#, fuzzy
@@ -183,24 +184,33 @@ msgid ""
"Fields to search for partial matches. (e.g. searching for 'Pie' will return "
"'pie' and 'piece' and 'soapie')"
msgstr ""
"Поля для поиска по частичному совпадению. (например, поиск по слову «Pie» "
"вернёт «pie», «piece» и «soapie»)"
#: .\cookbook\forms.py:344
msgid ""
"Fields to search for beginning of word matches. (e.g. searching for 'sa' "
"will return 'salad' and 'sandwich')"
msgstr ""
"Поля для поиска по совпадению начала слова. (например, поиск по «sa» вернёт "
"«salad» и «sandwich»)"
#: .\cookbook\forms.py:345
msgid ""
"Fields to 'fuzzy' search. (e.g. searching for 'recpie' will find 'recipe'.) "
"Note: this option will conflict with 'web' and 'raw' methods of search."
msgstr ""
"Поля для нечёткого поиска. (например, поиск по слову «recpie» найдёт "
"«recipe»). Примечание: эта опция конфликтует с методами поиска «web» и "
"«raw»."
#: .\cookbook\forms.py:346
msgid ""
"Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods "
"only function with fulltext fields."
msgstr ""
"Поля для полнотекстового поиска. Примечание: методы поиска «web», «phrase» "
"и «raw» работают только с полнотекстовыми полями."
#: .\cookbook\forms.py:350
msgid "Search Method"
@@ -208,38 +218,40 @@ msgstr "Способ поиска"
#: .\cookbook\forms.py:350
msgid "Fuzzy Lookups"
msgstr ""
msgstr "Нечёткое сопоставление"
#: .\cookbook\forms.py:350
msgid "Ignore Accent"
msgstr ""
msgstr "Игнорировать акценты"
#: .\cookbook\forms.py:350
msgid "Partial Match"
msgstr ""
msgstr "Частичное совпадение"
#: .\cookbook\forms.py:350
msgid "Starts With"
msgstr ""
msgstr "Начинается с"
#: .\cookbook\forms.py:351
msgid "Fuzzy Search"
msgstr ""
msgstr "Неточный поиск"
#: .\cookbook\forms.py:351
msgid "Full Text"
msgstr ""
msgstr "Полный текст"
#: .\cookbook\helper\AllAuthCustomAdapter.py:41
msgid ""
"In order to prevent spam, the requested email was not send. Please wait a "
"few minutes and try again."
msgstr ""
"Во избежание спама запрошенное электронное письмо не было отправлено. "
"Подождите несколько минут и попробуйте снова."
#: .\cookbook\helper\permission_helper.py:164
#: .\cookbook\helper\permission_helper.py:187 .\cookbook\views\views.py:117
msgid "You are not logged in and therefore cannot view this page!"
msgstr ""
msgstr "Вы не вошли в систему и поэтому не можете просматривать эту страницу!"
#: .\cookbook\helper\permission_helper.py:168
#: .\cookbook\helper\permission_helper.py:174
@@ -252,7 +264,7 @@ msgstr ""
#: .\cookbook\helper\permission_helper.py:341 .\cookbook\views\data.py:35
#: .\cookbook\views\views.py:127 .\cookbook\views\views.py:131
msgid "You do not have the required permissions to view this page!"
msgstr ""
msgstr "У вас нет необходимых разрешений для просмотра этой страницы!"
#: .\cookbook\helper\permission_helper.py:192
#: .\cookbook\helper\permission_helper.py:215
@@ -260,102 +272,108 @@ msgstr ""
#: .\cookbook\helper\permission_helper.py:252
msgid "You cannot interact with this object as it is not owned by you!"
msgstr ""
"Вы не можете взаимодействовать с этим объектом, так как он не принадлежит "
"вам!"
#: .\cookbook\helper\permission_helper.py:402
msgid "You have reached the maximum number of recipes for your space."
msgstr ""
msgstr "Вы достигли максимального количества рецептов для вашего пространства."
#: .\cookbook\helper\permission_helper.py:414
msgid "You have more users than allowed in your space."
msgstr ""
msgstr "У вас больше пользователей, чем разрешено в вашем пространстве."
#: .\cookbook\helper\recipe_url_import.py:310
msgid "reverse rotation"
msgstr ""
msgstr "обратное вращение"
#: .\cookbook\helper\recipe_url_import.py:311
msgid "careful rotation"
msgstr ""
msgstr "осторожное вращение"
#: .\cookbook\helper\recipe_url_import.py:312
msgid "knead"
msgstr ""
msgstr "замесить"
#: .\cookbook\helper\recipe_url_import.py:313
msgid "thicken"
msgstr ""
msgstr "загустить"
#: .\cookbook\helper\recipe_url_import.py:314
msgid "warm up"
msgstr ""
msgstr "разогреть"
#: .\cookbook\helper\recipe_url_import.py:315
msgid "ferment"
msgstr ""
msgstr "ферментировать"
#: .\cookbook\helper\recipe_url_import.py:316
msgid "sous-vide"
msgstr ""
msgstr "су-вид"
#: .\cookbook\helper\shopping_helper.py:150
msgid "You must supply a servings size"
msgstr ""
msgstr "Вы должны указать размер порции"
#: .\cookbook\helper\template_helper.py:95
#: .\cookbook\helper\template_helper.py:97
msgid "Could not parse template code."
msgstr ""
msgstr "Не удалось разобрать код шаблона."
#: .\cookbook\integration\copymethat.py:44
#: .\cookbook\integration\melarecipes.py:37
msgid "Favorite"
msgstr ""
msgstr "Избранное"
#: .\cookbook\integration\copymethat.py:50
msgid "I made this"
msgstr ""
msgstr "Я это сделал"
#: .\cookbook\integration\integration.py:209
msgid ""
"Importer expected a .zip file. Did you choose the correct importer type for "
"your data ?"
msgstr ""
"Импортер требует файл .zip. Вы выбрали правильный тип импортера для ваших "
"данных?"
#: .\cookbook\integration\integration.py:212
msgid ""
"An unexpected error occurred during the import. Please make sure you have "
"uploaded a valid file."
msgstr ""
"Во время импорта произошла непредвиденная ошибка. Пожалуйста, убедитесь, что "
"вы загрузили корректный файл."
#: .\cookbook\integration\integration.py:217
msgid "The following recipes were ignored because they already existed:"
msgstr ""
msgstr "Следующие рецепты были проигнорированы, так как уже существуют:"
#: .\cookbook\integration\integration.py:221
#, python-format
msgid "Imported %s recipes."
msgstr ""
msgstr "Импортировано %s рецептов."
#: .\cookbook\integration\openeats.py:28
msgid "Recipe source:"
msgstr ""
msgstr "Источник рецепта:"
#: .\cookbook\integration\paprika.py:49
msgid "Notes"
msgstr ""
msgstr "Заметки"
#: .\cookbook\integration\paprika.py:52
msgid "Nutritional Information"
msgstr ""
msgstr "Пищевая ценность"
#: .\cookbook\integration\paprika.py:56
msgid "Source"
msgstr ""
msgstr "Источник"
#: .\cookbook\integration\recettetek.py:54
#: .\cookbook\integration\recipekeeper.py:70
msgid "Imported from"
msgstr ""
msgstr "Импортировано из"
#: .\cookbook\integration\saffron.py:23
#, fuzzy
@@ -364,65 +382,67 @@ msgstr "Порции"
#: .\cookbook\integration\saffron.py:25
msgid "Waiting time"
msgstr ""
msgstr "Время ожидания"
#: .\cookbook\integration\saffron.py:27
msgid "Preparation Time"
msgstr ""
msgstr "Время подготовки"
#: .\cookbook\integration\saffron.py:29 .\cookbook\templates\index.html:7
msgid "Cookbook"
msgstr ""
msgstr "Книга рецептов"
#: .\cookbook\integration\saffron.py:31
msgid "Section"
msgstr ""
msgstr "Раздел"
#: .\cookbook\management\commands\fix_duplicate_properties.py:15
msgid "Fixes foods with "
msgstr ""
msgstr "Исправляет продукты с "
#: .\cookbook\management\commands\rebuildindex.py:14
msgid "Rebuilds full text search index on Recipe"
msgstr ""
msgstr "Перестраивает полнотекстовый индекс поиска для рецептов"
#: .\cookbook\management\commands\rebuildindex.py:18
msgid "Only Postgresql databases use full text search, no index to rebuild"
msgstr ""
"Полнотекстовый поиск используется только в базах данных Postgresql, индекс "
"перестраивать не нужно"
#: .\cookbook\management\commands\rebuildindex.py:29
msgid "Recipe index rebuild complete."
msgstr ""
msgstr "Перестройка индекса рецептов завершена."
#: .\cookbook\management\commands\rebuildindex.py:31
msgid "Recipe index rebuild failed."
msgstr ""
msgstr "Перестройка индекса рецептов не удалась."
#: .\cookbook\migrations\0047_auto_20200602_1133.py:14
msgid "Breakfast"
msgstr ""
msgstr "Завтрак"
#: .\cookbook\migrations\0047_auto_20200602_1133.py:19
msgid "Lunch"
msgstr ""
msgstr "Обед"
#: .\cookbook\migrations\0047_auto_20200602_1133.py:24
msgid "Dinner"
msgstr ""
msgstr "Ужин"
#: .\cookbook\migrations\0047_auto_20200602_1133.py:29 .\cookbook\models.py:919
msgid "Other"
msgstr ""
msgstr "Другое"
#: .\cookbook\migrations\0190_auto_20230525_1506.py:17
msgid "Fat"
msgstr ""
msgstr "Толстый"
#: .\cookbook\migrations\0190_auto_20230525_1506.py:17
#: .\cookbook\migrations\0190_auto_20230525_1506.py:18
#: .\cookbook\migrations\0190_auto_20230525_1506.py:19
msgid "g"
msgstr ""
msgstr "г"
#: .\cookbook\migrations\0190_auto_20230525_1506.py:18
msgid "Carbohydrates"

View File

@@ -37,8 +37,20 @@
<link id="id_custom_space_css" href="{{ theme_values.custom_theme }}" rel="stylesheet">
{% endif %}
<style>
{% if request.user.userpreference.theme == 'TANDOOR_DARK' %}
/* vueform/multiselect */
/* when append to body is true the multiselects dropdown does not recognize the .v-theme--dark condition and renders a white background otherwise */
.multiselect-dropdown, .multiselect-options, .multiselect-option {
background: #212121 !important;
}
{% endif %}
</style>
</head>
<body>
<div id="app"></div>
{% vite_hmr_client %}
@@ -48,16 +60,16 @@
localStorage.setItem('BASE_PATH', "{% base_path request 'base' %}")
{#window.addEventListener("load", () => {#}
{# if ("serviceWorker" in navigator) {#}
{# navigator.serviceWorker.register("{% url 'service_worker' %}", {scope: "{% base_path request 'base' %}" + '/'}).then(function (reg) {#}
{# }).catch(function (err) {#}
{# console.warn('Error whilst registering service worker', err);#}
{# });#}
{# } else {#}
{# console.warn('service worker not in navigator');#}
{# }#}
{#});#}
window.addEventListener("load", () => {
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("{% url 'service_worker' %}", {scope: "{% base_path request 'base' %}" + '/'}).then(function (reg) {
}).catch(function (err) {
console.warn('Error whilst registering service worker', err);
});
} else {
console.warn('service worker not in navigator');
}
});
</script>

File diff suppressed because one or more lines are too long

View File

@@ -25,10 +25,6 @@ def get_theming_values(request):
space = Space.objects.filter(id=FORCE_THEME_FROM_SPACE).first()
themes = {
UserPreference.BOOTSTRAP: 'themes/bootstrap.min.css',
UserPreference.FLATLY: 'themes/flatly.min.css',
UserPreference.DARKLY: 'themes/darkly.min.css',
UserPreference.SUPERHERO: 'themes/superhero.min.css',
UserPreference.TANDOOR: 'themes/tandoor.min.css',
UserPreference.TANDOOR_DARK: 'themes/tandoor_dark.min.css',
}

View File

@@ -1,157 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><testsuites name="pytest tests"><testsuite name="pytest" errors="4" failures="0" skipped="0" tests="4" time="34.750" timestamp="2025-07-17T12:15:15.274960+02:00" hostname="DESKTOP-RM10LP5"><testcase classname="cookbook.tests.other.test_automations" name="test_never_unit_automation[arg0]" time="22.035"><error message="failed on setup with &quot;TypeError: type 'Factory' is not subscriptable&quot;">args = ()
kwargs = {'request': &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg0]&gt;&gt;}
k = 'space_1__name'
@functools.wraps(fixture_function)
def wrapper(*args: P.args, **kwargs: P.kwargs) -&gt; T:
for k in set(kwargs.keys()) - function_args:
del kwargs[k]
&gt; return fixture_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:49: in fn
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
request = &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg0]&gt;&gt;
factory_name = 'space_factory'
def model_fixture(request: SubRequest, factory_name: str) -&gt; object:
"""Model fixture implementation."""
factoryboy_request: FactoryboyRequest = request.getfixturevalue("factoryboy_request")
# Try to evaluate as much post-generation dependencies as possible
factoryboy_request.evaluate(request)
assert request.fixturename # NOTE: satisfy mypy
fixture_name = request.fixturename
prefix = "".join((fixture_name, SEPARATOR))
factory_class: type[Factory[object]] = request.getfixturevalue(factory_name)
# Create model fixture instance
&gt; NewFactory: type[Factory[object]] = cast(type[Factory[object]], type("Factory", (factory_class,), {}))
^^^^^^^^^^^^^^^
E TypeError: type 'Factory' is not subscriptable
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixture.py:360: TypeError</error></testcase><testcase classname="cookbook.tests.other.test_automations" name="test_never_unit_automation[arg2]" time="22.047"><error message="failed on setup with &quot;TypeError: type 'Factory' is not subscriptable&quot;">args = ()
kwargs = {'request': &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg2]&gt;&gt;}
k = 'space_1__name'
@functools.wraps(fixture_function)
def wrapper(*args: P.args, **kwargs: P.kwargs) -&gt; T:
for k in set(kwargs.keys()) - function_args:
del kwargs[k]
&gt; return fixture_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:49: in fn
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
request = &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg2]&gt;&gt;
factory_name = 'space_factory'
def model_fixture(request: SubRequest, factory_name: str) -&gt; object:
"""Model fixture implementation."""
factoryboy_request: FactoryboyRequest = request.getfixturevalue("factoryboy_request")
# Try to evaluate as much post-generation dependencies as possible
factoryboy_request.evaluate(request)
assert request.fixturename # NOTE: satisfy mypy
fixture_name = request.fixturename
prefix = "".join((fixture_name, SEPARATOR))
factory_class: type[Factory[object]] = request.getfixturevalue(factory_name)
# Create model fixture instance
&gt; NewFactory: type[Factory[object]] = cast(type[Factory[object]], type("Factory", (factory_class,), {}))
^^^^^^^^^^^^^^^
E TypeError: type 'Factory' is not subscriptable
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixture.py:360: TypeError</error></testcase><testcase classname="cookbook.tests.other.test_automations" name="test_never_unit_automation[arg3]" time="22.106"><error message="failed on setup with &quot;TypeError: type 'Factory' is not subscriptable&quot;">args = ()
kwargs = {'request': &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg3]&gt;&gt;}
k = 'space_1__name'
@functools.wraps(fixture_function)
def wrapper(*args: P.args, **kwargs: P.kwargs) -&gt; T:
for k in set(kwargs.keys()) - function_args:
del kwargs[k]
&gt; return fixture_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:49: in fn
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
request = &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg3]&gt;&gt;
factory_name = 'space_factory'
def model_fixture(request: SubRequest, factory_name: str) -&gt; object:
"""Model fixture implementation."""
factoryboy_request: FactoryboyRequest = request.getfixturevalue("factoryboy_request")
# Try to evaluate as much post-generation dependencies as possible
factoryboy_request.evaluate(request)
assert request.fixturename # NOTE: satisfy mypy
fixture_name = request.fixturename
prefix = "".join((fixture_name, SEPARATOR))
factory_class: type[Factory[object]] = request.getfixturevalue(factory_name)
# Create model fixture instance
&gt; NewFactory: type[Factory[object]] = cast(type[Factory[object]], type("Factory", (factory_class,), {}))
^^^^^^^^^^^^^^^
E TypeError: type 'Factory' is not subscriptable
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixture.py:360: TypeError</error></testcase><testcase classname="cookbook.tests.other.test_automations" name="test_never_unit_automation[arg1]" time="22.143"><error message="failed on setup with &quot;TypeError: type 'Factory' is not subscriptable&quot;">args = ()
kwargs = {'request': &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg1]&gt;&gt;}
k = 'space_1__name'
@functools.wraps(fixture_function)
def wrapper(*args: P.args, **kwargs: P.kwargs) -&gt; T:
for k in set(kwargs.keys()) - function_args:
del kwargs[k]
&gt; return fixture_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixturegen.py:49: in fn
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
request = &lt;SubRequest 'space_1' for &lt;Function test_never_unit_automation[arg1]&gt;&gt;
factory_name = 'space_factory'
def model_fixture(request: SubRequest, factory_name: str) -&gt; object:
"""Model fixture implementation."""
factoryboy_request: FactoryboyRequest = request.getfixturevalue("factoryboy_request")
# Try to evaluate as much post-generation dependencies as possible
factoryboy_request.evaluate(request)
assert request.fixturename # NOTE: satisfy mypy
fixture_name = request.fixturename
prefix = "".join((fixture_name, SEPARATOR))
factory_class: type[Factory[object]] = request.getfixturevalue(factory_name)
# Create model fixture instance
&gt; NewFactory: type[Factory[object]] = cast(type[Factory[object]], type("Factory", (factory_class,), {}))
^^^^^^^^^^^^^^^
E TypeError: type 'Factory' is not subscriptable
..\..\..\venv\Lib\site-packages\pytest_factoryboy\fixture.py:360: TypeError</error></testcase></testsuite></testsuites>

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,4 @@
import pytest
from django.contrib import auth
from django.test import RequestFactory
from django_scopes import scope
@@ -5,7 +6,11 @@ from django_scopes import scope
from cookbook.helper.ingredient_parser import IngredientParser
def test_ingredient_parser(u1_s1):
@pytest.mark.parametrize("arg", [
[True],
[False],
])
def test_ingredient_parser(arg, u1_s1):
expectations = {
"2¼ l Wasser": (2.25, "l", "Wasser", ""),
"3¼l Wasser": (3.25, "l", "Wasser", ""),
@@ -67,7 +72,8 @@ def test_ingredient_parser(u1_s1):
"1 Porreestange(n) , ca. 200 g": (1.0, None, 'Porreestange(n)', 'ca. 200 g'), # leading space before comma
# test for over long food entries to get properly split into the note field
"1 Lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut l Lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut l": (
1.0, 'Lorem', 'ipsum', 'dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut l Lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut l'),
1.0, 'Lorem', 'ipsum',
'dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut l Lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut l'),
"1 LoremipsumdolorsitametconsetetursadipscingelitrseddiamnonumyeirmodtemporinviduntutlLoremipsumdolorsitametconsetetursadipscingelitrseddiamnonumyeirmodtemporinviduntutl": (
1.0, None, 'LoremipsumdolorsitametconsetetursadipscingelitrseddiamnonumyeirmodtemporinviduntutlLoremipsumdolorsitametconsetetursadipscingeli',
'LoremipsumdolorsitametconsetetursadipscingelitrseddiamnonumyeirmodtemporinviduntutlLoremipsumdolorsitametconsetetursadipscingelitrseddiamnonumyeirmodtemporinviduntutl'),
@@ -86,7 +92,7 @@ def test_ingredient_parser(u1_s1):
request = RequestFactory()
request.user = user
request.space = space
ingredient_parser = IngredientParser(request, False, ignore_automations=True)
ingredient_parser = IngredientParser(request, False, ignore_automations=arg[0])
count = 0
with scope(space=space):

View File

@@ -42,7 +42,7 @@ def test_theming_function(space_1, u1_s1):
assert get_theming_values(request)['sticky_nav'] == ''
assert get_theming_values(request)['app_name'] == 'Tandoor Recipes'
space_1.space_theme = Space.BOOTSTRAP
space_1.space_theme = Space.TANDOOR
space_1.nav_bg_color = '#000000'
space_1.nav_text_color = UserPreference.DARK
space_1.app_name = 'test_app_name'
@@ -53,7 +53,7 @@ def test_theming_function(space_1, u1_s1):
request.space = space_1
# space settings apply when set
assert get_theming_values(request)['theme'] == static('themes/bootstrap.min.css')
assert get_theming_values(request)['theme'] == static('themes/tandoor.min.css')
assert get_theming_values(request)['nav_bg_color'] == '#000000'
assert get_theming_values(request)['nav_text_class'] == 'navbar-light'
assert get_theming_values(request)['app_name'] == 'test_app_name'

View File

@@ -120,7 +120,7 @@ urlpatterns = [
path('api-token-auth/', CustomAuthToken.as_view()),
path('offline/', views.offline, name='view_offline'),
#path('service-worker.js', (TemplateView.as_view(template_name="sw.js", content_type='application/javascript')), name='service_worker'),
path('service-worker.js', views.service_worker, name='service_worker'),
path('manifest.json', views.web_manifest, name='web_manifest'),
]

View File

@@ -16,7 +16,7 @@ from django.core.cache import caches
from django.core.exceptions import ValidationError
from django.core.management import call_command
from django.db import models
from django.http import HttpResponseRedirect, JsonResponse
from django.http import HttpResponseRedirect, JsonResponse, HttpResponse
from django.shortcuts import get_object_or_404, render
from django.templatetags.static import static
from django.urls import reverse, reverse_lazy
@@ -31,7 +31,7 @@ from cookbook.helper.permission_helper import CustomIsGuest, GroupRequiredMixin,
from cookbook.models import InviteLink, ShareLink, Space, UserSpace
from cookbook.templatetags.theming_tags import get_theming_values
from cookbook.version_info import VERSION_INFO
from recipes.settings import PLUGINS
from recipes.settings import PLUGINS, BASE_DIR
def index(request, path=None, resource=None):
@@ -41,7 +41,7 @@ def index(request, path=None, resource=None):
if User.objects.count() < 1 and 'django.contrib.auth.backends.RemoteUserBackend' not in settings.AUTHENTICATION_BACKENDS:
return HttpResponseRedirect(reverse_lazy('view_setup'))
if request.user.is_authenticated or re.search(r'/recipe/\d+/', request.path[:512]) and request.GET.get('share') :
if request.user.is_authenticated or re.search(r'/recipe/\d+/', request.path[:512]) and request.GET.get('share'):
return render(request, 'frontend/tandoor.html', {})
else:
return HttpResponseRedirect(reverse('account_login') + '?next=' + request.path)
@@ -134,15 +134,16 @@ def no_perm(request):
return HttpResponseRedirect(reverse('account_login') + '?next=' + request.GET.get('next', '/search/'))
return render(request, 'no_perm_info.html')
def recipe_pdf_viewer(request, pk):
with scopes_disabled():
recipe = get_object_or_404(Recipe, pk=pk)
if share_link_valid(recipe, request.GET.get('share', None)) or (has_group_permission(
request.user, ['guest']) and recipe.space == request.space):
return render(request, 'pdf_viewer.html', {'recipe_id': pk, 'share': request.GET.get('share', None)})
return HttpResponseRedirect(reverse('index'))
def system(request):
if not request.user.is_superuser:
return HttpResponseRedirect(reverse('index'))
@@ -451,6 +452,13 @@ def offline(request):
return render(request, 'offline.html', {})
def service_worker(request):
with open(os.path.join(BASE_DIR, 'cookbook', 'static', 'vue3', 'service-worker.js'), 'rb') as service_worker_file:
response = HttpResponse(content=service_worker_file)
response['Content-Type'] = 'text/javascript'
return response
def test(request):
if not settings.DEBUG:
return HttpResponseRedirect(reverse('index'))
@@ -516,4 +524,3 @@ def get_orphan_files(delete_orphans=False):
orphans = find_orphans()
return [img[1] for img in orphans]

View File

@@ -1,6 +1,9 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
These are instructions for pacman based distributions, like ArchLinux. The package is available from the [AUR](https://aur.archlinux.org/packages/tandoor-recipes-git) or from [GitHub](https://github.com/jdecourval/tandoor-recipes-pkgbuild).
## Features

View File

@@ -1,28 +1,32 @@
!!! success "Recommended Installation"
Setting up this application using Docker is recommended. This does not mean that other options are bad, just that
support is much easier for this setup.
Setting up this application using Docker is recommended. This does not mean that other options are bad, but its the only method
that is officially maintained and gets regularly tested.
It is possible to install this application using many different Docker configurations.
This guide shows you some basic setups using Docker and docker compose. For configuration options see the [configuration page](https://docs.tandoor.dev/system/configuration/).
Please read the instructions on each example carefully and decide if this is the way for you.
## **Versions**
## **DockSTARTer**
There are different versions (tags) released on [Docker Hub](https://hub.docker.com/r/vabene1111/recipes/tags).
The main goal of [DockSTARTer](https://dockstarter.com/) is to make it quick and easy to get up and running with Docker.
You may choose to rely on DockSTARTer for various changes to your Docker system or use DockSTARTer as a stepping stone and learn to do more advanced configurations.
Follow the guide for installing DockSTARTer and then run `ds` then select 'Configuration' and 'Select Apps' to get Tandoor up and running quickly and easily.
- **latest** Default image. The one you should use if you don't know that you need anything else.
- **beta** Partially stable version that gets updated every now and then. Expect to have some problems.
- **develop** If you want the most bleeding-edge version with potentially many breaking changes, feel free to use this version (not recommended!).
- **X.Y.Z** each released version has its own image. If you need to revert to an old version or want to make sure you stay on one specific use these tags.
!!! danger "No Downgrading"
There is currently no way to migrate back to an older version as there is no mechanism to downgrade the database.
You could probably do it but I cannot help you with that. Choose wisely if you want to use the unstable images.
That said **beta** should usually be working if you like frequent updates and new stuff.
## **Docker**
The docker image (`vabene1111/recipes`) simply exposes the application on the container's port `8080`.
It can be run and accessed on port 80 using:
The docker image (`vabene1111/recipes`) simply exposes the application on the container's port `80` through the integrated nginx webserver.
```shell
docker run -d \
-v "$(pwd)"/staticfiles:/opt/recipes/staticfiles \
-v "$(pwd)"/mediafiles:/opt/recipes/mediafiles \
-p 80:8080 \
-p 80:80 \
-e SECRET_KEY=YOUR_SECRET_KEY \
-e DB_ENGINE=django.db.backends.postgresql \
-e POSTGRES_HOST=db_recipes \
@@ -34,25 +38,7 @@ docker run -d \
vabene1111/recipes
```
Please make sure, if you run your image this way, to consult
the [.env.template](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template)
file in the GitHub repository to verify if additional environment variables are required for your setup.
Also, don't forget to replace the placeholders for ```SECRET_KEY``` and ```POSTGRES_PASSWORD```!
## **Versions**
There are different versions (tags) released on [Docker Hub](https://hub.docker.com/r/vabene1111/recipes/tags).
- **latest** Default image. The one you should use if you don't know that you need anything else.
- **beta** Partially stable version that gets updated every now and then. Expect to have some problems.
- **develop** If you want the most bleeding edge version with potentially many breaking changes feel free to use this version (not recommended!).
- **X.Y.Z** each released version has its own image. If you need to revert to an old version or want to make sure you stay on one specific use these tags.
!!! danger "No Downgrading"
There is currently no way to migrate back to an older version as there is no mechanism to downgrade the database.
You could probably do it but I cannot help you with that. Choose wisely if you want to use the unstable images.
That said **beta** should usually be working if you like frequent updates and new stuff.
Please make sure to replace the ```SECRET_KEY``` and ```POSTGRES_PASSWORD``` placeholders!
## **Docker Compose**
@@ -63,7 +49,7 @@ The main, and also recommended, installation option for this application is Dock
```shell
wget https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O .env
```
3. **Edit it accordingly** (you NEED to set `SECRET_KEY` and `POSTGRES_PASSWORD`).
3. **Edit it accordingly** (you NEED to set `SECRET_KEY` and `POSTGRES_PASSWORD`), see [configuration page](https://docs.tandoor.dev/system/configuration/).
4. Start your container using `docker-compose up -d`.
### **Plain**
@@ -79,9 +65,6 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d
{% include "./docker/plain/docker-compose.yml" %}
~~~
!!!note
Don't forget to [download and configure](#docker-compose) your ```.env``` file!
### **Reverse Proxy**
Most deployments will likely use a reverse proxy.
@@ -105,8 +88,6 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d
{% include "./docker/traefik-nginx/docker-compose.yml" %}
~~~
!!!note
Don't forget to [download and configure](#docker-compose) your ```.env``` file!
#### **jwilder's Nginx-proxy**
@@ -134,206 +115,25 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d
{% include "./docker/nginx-proxy/docker-compose.yml" %}
~~~
!!!note
Don't forget to [download and configure](#docker-compose) your ```.env``` file!
## **DockSTARTer**
#### **Nginx Swag by LinuxServer**
The main goal of [DockSTARTer](https://dockstarter.com/) is to make it quick and easy to get up and running with Docker.
You may choose to rely on DockSTARTer for various changes to your Docker system or use DockSTARTer as a stepping stone and learn to do more advanced configurations.
Follow the guide for installing DockSTARTer and then run `ds` then select 'Configuration' and 'Select Apps' to get Tandoor up and running quickly and easily.
[This container](https://github.com/linuxserver/docker-swag) is an all in one solution created by LinuxServer.io.
It contains templates for popular apps, including Tandoor Recipes, so you don't have to manually configure nginx and discard the template provided in Tandoor repo. Tandoor config is called `recipes.subdomain.conf.sample` which you can adapt for your instance.
If you're running Swag on the default port, you'll just need to change the container name to yours.
If your running Swag on a custom port, some headers must be changed:
- Create a copy of `proxy.conf`
- Replace `proxy_set_header X-Forwarded-Host $host;` and `proxy_set_header Host $host;` to
- `proxy_set_header X-Forwarded-Host $http_host;` and `proxy_set_header Host $http_host;`
- Update `recipes.subdomain.conf` to use the new file
- Restart the linuxserver/swag container and Recipes will work correctly
More information [here](https://github.com/TandoorRecipes/recipes/issues/959#issuecomment-962648627).
In both cases, also make sure to mount `/media/` in your swag container to point to your Tandoor Recipes Media directory.
Please refer to the [appropriate documentation](https://github.com/linuxserver/docker-swag#usage) for the container setup.
For step-by-step instructions to set this up from scratch, see [this example](swag.md).
#### **Pure Nginx**
If you have Nginx installed locally on your host system without using any third party integration like Swag or similar, this is for you.
You can use the Docker-Compose file from [Plain](#plain).
!!!warning "Adjust Docker-Compose file"
Replace `80:80` with `PORT:80` with PORT being your desired outward-facing port.
In the nginx config example below, 8080 is used.
An example configuration with LetsEncrypt to get you started can be seen below.
Please note, that since every setup is different, you might need to adjust some things.
!!!warning "Placeholders"
Don't forget to replace the domain and port.
```nginx
server {
if ($host = recipes.mydomain.tld) { # replace domain
return 301 https://$host$request_uri;
}
server_name recipes.mydomain.tld; # replace domain
listen 80;
return 404;
}
server {
server_name recipes.mydomain.tld; # replace domain
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/recipes.mydomain.tld/fullchain.pem; # replace domain
ssl_certificate_key /etc/letsencrypt/live/recipes.mydomain.tld/privkey.pem; # replace domain
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_set_header Host $http_host; # try $host instead if this doesn't work
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:8080; # replace port
proxy_redirect http://127.0.0.1:8080 https://recipes.domain.tld; # replace port and domain
}
}
```
Tandoor does not support directly serving of images, as explained in the [Nginx vs Gunicorn"](#nginx-vs-gunicorn) section. If you are already using nginx to serve as a reverse proxy, you can configure it to serve images as well.
Add the following directly after the `location /` context:
```
location /media/ {
root /media/;
index index.html index.htm;
}
```
Make sure you also update your `docker-compose.yml` file to mount the `mediafiles` directory. If you are using the [Plain](#plain) deployment, you do not need to make any changes. If you are using nginx to act as a reverse proxy for other apps, it may not be optimal to have `mediafiles` mounted to `/media`. In that case, adjust the directory declarations as needed, utilizing nginx's [`alias`](https://nginx.org/en/docs/http/ngx_http_core_module.html#alias) if needed.
!!!note
Use `alias` if your mount point directory is not the same as the URL request path. Tandoor media files are requested from `$http_host/media/recipes/xxx.jpg`. This means if you are mounting to a directory that does **NOT** end in `./media`, you will need to use `alias`.
!!!note
Don't forget to [download and configure](#docker-compose) your ```.env``` file!
#### **Apache**
You can use the Docker-Compose file from [Plain](#plain).
!!!warning "Adjust Docker-Compose file"
Replace `80:80` with `PORT:80` with PORT being your desired outward-facing port.
In the Apache config example below, 8080 is used.
If you use e.g. LetsEncrypt for SSL encryption, you can use the example configuration from [solaris7590](https://github.com/TandoorRecipes/recipes/issues/1312#issuecomment-1020034375) below.
!!!warning "Placeholders"
Don't forget to replace the domain and port.
```apache
<IfModule mod_ssl.c>
<VirtualHost *:80>
ServerAdmin webmaster@mydomain.de # replace domain
ServerName mydomain.de # replace domain
Redirect permanent / https://mydomain.de/ # replace domain
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@mydomain.de # replace domain
ServerName mydomain.de # replace domain
SSLEngine on
RequestHeader set X-Forwarded-Proto "https"
Header always set Access-Control-Allow-Origin "*"
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:8080/ # replace port
ProxyPassReverse / http://localhost:8080/ # replace port
SSLCertificateFile /etc/letsencrypt/live/mydomain.de/fullchain.pem # replace domain/path
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.de/privkey.pem # replace domain/path
Include /etc/letsencrypt/options-ssl-apache.conf
ErrorLog ${APACHE_LOG_DIR}/recipes_error.log
CustomLog ${APACHE_LOG_DIR}/recipes_access.log combined
</VirtualHost>
</IfModule>
```
If you're having issues with the example configuration above, you can try [beedaddy](https://github.com/TandoorRecipes/recipes/issues/1312#issuecomment-1015252663)'s example config.
!!!note
Don't forget to [download and configure](#docker-compose) your ```.env``` file!
#### **Others**
If you use none of the above mentioned reverse proxies or want to use an existing one on your host machine (like a local nginx or Caddy), simply use the [Plain](#plain) setup above and change the outbound port to one of your liking.
An example port config (inside the respective docker-compose.yml) would be: `8123:80` instead of the `80:80` or if you want to be sure, that Tandoor is **just** accessible via your proxy and don't wanna bother with your firewall, then `127.0.0.1:8123:80` is a viable option too.
!!!note
Don't forget to [download and configure](#docker-compose) your ```.env``` file!
DockSTARTer might not be updated for Tandoor 2 configurations
## **Additional Information**
### **Nginx vs Gunicorn**
All examples use an additional `nginx` container to serve mediafiles and act as the forward facing webserver.
This is **technically not required** but **very much recommended**.
I do not 100% understand the deep technical details but the [developers of gunicorn](https://serverfault.com/questions/331256/why-do-i-need-nginx-and-something-like-gunicorn/331263#331263),
the WSGi server that handles the Python execution, explicitly state that it is not recommended to deploy without nginx.
You will also likely not see any decrease in performance or a lot of space used as nginx is a very light container.
!!! info
Even if you run behind a reverse proxy as described above, using an additional nginx container is the recommended option.
If you run a small private deployment and don't care about performance, security and whatever else feel free to run
without a nginx container.
!!! warning
When running without nginx make sure to enable `GUNICORN_MEDIA` in the `.env`. Without it, media files will be uploaded
but not shown on the page.
For additional information please refer to the [0.9.0 Release](https://github.com/vabene1111/recipes/releases?after=0.9.0)
and [Issue 201](https://github.com/vabene1111/recipes/issues/201) where these topics have been discussed.
See also refer to the [official gunicorn docs](https://docs.gunicorn.org/en/stable/deploy.html).
### **Nginx Config**
Starting with Tandoor 2 the Docker container includes a nginx service. Its default configuration is pulled from the [http.d](https://github.com/TandoorRecipes/recipes/tree/develop/http.d) folder
in the repository.
In order to give the user (you) the greatest amount of freedom when choosing how to deploy this application the
webserver is not directly bundled with the Docker image.
You can setup a volume to link to the ```/opt/recipes/http.d``` folder inside your container to change the configuration. Keep in mind that you will not receive any updates on the configuration
if you manually change it/bind the folder as a volume.
This has the downside that it is difficult to supply the configuration to the webserver (e.g. nginx). Up until
version `0.13.0`, this had to be done manually by downloading the nginx config file and placing it in a directory that
was then mounted into the nginx container.
From version `0.13.0`, the config file is supplied using the application image (`vabene1111/recipes`). It is then mounted
to the host system and from there into the nginx container.
This is not really a clean solution, but I could not find any better alternative that provided the same amount of
usability. If you know of any better way, feel free to open an issue.
### **Volumes vs Bind Mounts**
Since I personally prefer to have my data where my `docker-compose.yml` resides, bind mounts are used in the example
configuration files for all user generated data (e.g. Postgresql and media files).
!!!warning
Please note that [there is a difference in functionality](https://docs.docker.com/storage/volumes/)
between the two and you cannot always simply interchange them.
You can move everything to volumes if you prefer it this way, **but you cannot convert the nginx config file to a bind
mount.**
If you do so you will have to manually create the nginx config file and restart the container once after creating it.
### **Required Headers**
@@ -362,12 +162,13 @@ ProxyPassReverse / http://localhost:8080/ # replace port
### **Setup issues on Raspberry Pi**
!!! danger
Tandoor 2 does no longer build images for arm/v7 architectures. You can certainly get Tandoor working there but it has simply been to much effort to maintain these architectures over the past years
to justify the continued support of this mostly deprecated platform.
!!!info
Always wait at least 2-3 minutes after the very first start, since migrations will take some time!
!!!info
In the past there was a special `*-raspi` version of the image. This no longer exists. The normal Tags all support Arm/v7 architectures which should work on all Raspberry Pi's above Version 1 and the first generation Zero.
See [Wikipedia Raspberry Pi specifications](https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications).
If you're having issues with installing Tandoor on your Raspberry Pi or similar device,
follow these instructions:
@@ -380,7 +181,7 @@ follow these instructions:
### Sub Path nginx config
If hosting under a sub-path you might want to change the default nginx config (which gets mounted through the named volume from the application container into the nginx container)
If hosting under a sub-path you might want to change the default nginx config
with the following config.
```nginx
@@ -407,3 +208,10 @@ location /static/ {
}
```
### Tandoor 1 vs Tandoor 2
Tandoor 1 includes gunicorn, a python WSGI server that handles python code well but is not meant to serve mediafiles. Thus, it has always been recommended to set up a nginx webserver
(not just a reverse proxy) in front of Tandoor to handle mediafiles. The gunicorn server by default is exposed on port 8080.
Tandoor 2 now occasionally bundles nginx inside the container and exposes port 80 where mediafiles are handled by nginx and all the other requests are (mostly) passed to gunicorn.
A [GitHub Issue](https://github.com/TandoorRecipes/recipes/issues/3851) has been created to allow for discussions and FAQ's on this issue while this change is fresh. It will later be updated in the docs here if necessary.

View File

@@ -16,28 +16,11 @@ services:
- ./.env
volumes:
- staticfiles:/opt/recipes/staticfiles
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/opt/recipes/nginx/conf.d
- ./mediafiles:/opt/recipes/mediafiles
depends_on:
- db_recipes
networks:
- default
nginx_recipes:
image: nginx:mainline-alpine
restart: always
env_file:
- ./.env
depends_on:
- web_recipes
volumes:
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/etc/nginx/conf.d:ro
- staticfiles:/static:ro
- ./mediafiles:/media:ro
networks:
- default
- nginx-proxy
networks:
@@ -47,5 +30,4 @@ networks:
name: nginx-proxy
volumes:
nginx_config:
staticfiles:

View File

@@ -14,27 +14,9 @@ services:
- ./.env
volumes:
- staticfiles:/opt/recipes/staticfiles
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/opt/recipes/nginx/conf.d
- ./mediafiles:/opt/recipes/mediafiles
depends_on:
- db_recipes
nginx_recipes:
image: nginx:mainline-alpine
restart: always
ports:
- 80:80
env_file:
- ./.env
depends_on:
- web_recipes
volumes:
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/etc/nginx/conf.d:ro
- staticfiles:/static:ro
- ./mediafiles:/media:ro
volumes:
nginx_config:
staticfiles:

View File

@@ -16,40 +16,23 @@ services:
- ./.env
volumes:
- staticfiles:/opt/recipes/staticfiles
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/opt/recipes/nginx/conf.d
- ./mediafiles:/opt/recipes/mediafiles
depends_on:
- db_recipes
networks:
- default
nginx_recipes:
image: nginx:mainline-alpine
restart: always
env_file:
- ./.env
volumes:
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/etc/nginx/conf.d:ro
- staticfiles:/static:ro
- ./mediafiles:/media:ro
labels: # traefik example labels
- "traefik.enable=true"
- "traefik.http.routers.recipes.rule=Host(`recipes.mydomain.com`, `recipes.myotherdomain.com`)"
- "traefik.http.routers.recipes.entrypoints=web_secure" # your https endpoint
- "traefik.http.routers.recipes.tls.certresolver=le_resolver" # your cert resolver
depends_on:
- web_recipes
networks:
- default
- traefik
networks:
default:
traefik: # This is your external traefik network
external: true
volumes:
nginx_config:
staticfiles:

View File

@@ -3,6 +3,9 @@
Many thanks to [alexbelgium](https://github.com/alexbelgium) for making implementing everything required to have
Tandoor run in HA.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
![Addon version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Ftandoor_recipes%2Fconfig.json) ![Last update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Ftandoor_recipes%2Fupdater.json) ![aarch64][aarch64-badge] ![amd64][amd64-badge] ![armv7][armv7-badge]
### Introduction

View File

@@ -1,6 +1,9 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
## K8s Setup
This is a setup which should be sufficient for production use. Be sure to replace the default secrets!

View File

@@ -1,6 +1,9 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
[KubeSail](https://kubesail.com/) lets you install Tandoor by providing a simple web interface for installing and managing apps. You can connect any server running Kubernetes, or get a pre-configured [PiBox](https://pibox.io).
<!-- A portion of every PiBox sale goes toward supporting Tandoor development. -->

View File

@@ -5,6 +5,9 @@ These instructions are inspired from a standard django/gunicorn/postgresql instr
!!! warning
Make sure to use at least Python 3.10 (although 3.12 is preferred) or higher, and ensure that `pip` is associated with Python 3. Depending on your system configuration, using `python` or `pip` might default to Python 2. Make sure your machine has at least 2048 MB of memory; otherwise, the `yarn build` process may fail with the error: `FATAL ERROR: Reached heap limit - Allocation failed: JavaScript heap out of memory`.
!!! warning
These instructions are **not** regularly reviewed and might be outdated.
## Prerequisites
Setup user: `sudo useradd recipes`

View File

@@ -3,6 +3,8 @@
This page especially contains some setups that might help you if you really want to go down a certain path but none
of the examples are supported (as I simply am not able to give you support for them).
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
## Apache + Traefik + Sub-Path

View File

@@ -1,6 +1,9 @@
!!! danger
Please refer to the [official documentation](https://github.com/linuxserver/docker-swag#usage) for the container setup. This example shows just one setup that may or may not differ from yours in significant ways. This tutorial does not cover security measures, backups, and many other things that you might want to consider.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
## Prerequisites
- You have a newly spun-up Ubuntu server with docker (pre-)installed.

View File

@@ -1,6 +1,9 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested. Since I cannot test it myself, feedback and improvements are always very welcome.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
## **Instructions**
Basic guide to setup `vabenee1111/recipes` docker container on Synology NAS.

View File

@@ -1,60 +0,0 @@
!!! danger
Please refer to [the official documentation](https://doc.traefik.io/traefik/).
This example just shows something similar to my setup in case you dont understand the official documentation.
You need to create a network called `traefik` using `docker network create traefik`.
## docker-compose.yml
```
version: "3.3"
services:
traefik:
image: "traefik:v2.1"
container_name: "traefik"
ports:
- "443:443"
- "80:80"
- "8080:8080"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./config:/etc/traefik/"
networks:
default:
external:
name: traefik
```
## traefik.toml
Place this in a directory called `config` as this is mounted into the traefik container (see docer compose).
**Change the email address accordingly**.
```
[api]
insecure=true
[providers.docker]
endpoint = "unix:///var/run/docker.sock"
exposedByDefault = false
network = "traefik"
#[log]
# level = "DEBUG"
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web_secure]
address = ":443"
[certificatesResolvers.le_resolver.acme]
email = "you_email@mail.com"
storage = "/letsencrypt/acme.json"
tlsChallenge=true
```

View File

@@ -1,6 +1,9 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
This guide is to assist those installing Tandoor Recipes on Truenas Core using Docker and or Portainer
Docker install instructions adapted from [PhasedLogix IT Services's guide](https://getmethegeek.com/blog/2021-01-07-add-docker-capabilities-to-truenas-core/). Portainer install instructions adopted from the [Portainer Official Documentation](https://docs.portainer.io/start/install-ce/server/docker/linux). Tandoor installation on Portainer provided by users `Szeraax` and `TransatlanticFoe` on Discord (Thank you two!)

View File

@@ -1,6 +1,9 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
[Unraid](https://unraid.net/) is an operating system that allows you to easily install and setup applications.
Thanks to [CorneliousJD](https://github.com/CorneliousJD) this application can easily be installed using unraid.

View File

@@ -1,3 +1,10 @@
!!! info "Community Contributed"
This guide was contributed by the community and is neither officially supported, nor updated or tested. Since I cannot test it myself, feedback and improvements are always very welcome.
!!! danger "Tandoor 2 Compatibility"
This guide has not been verified/tested for Tandoor 2, which now integrates a nginx service inside the default docker container and exposes its service on port 80 instead of 8080.
# Ubuntu Installation on Windows (WSL) and Docker Desktop
Install Docker from https://docs.docker.com/desktop/install/windows-install/

View File

@@ -1,15 +1,15 @@
:root {
--md-primary-fg-color: #ffcb76;
--md-accent-fg-color: #FF6F00;
:root > * {
--md-primary-fg-color: #ddbf86;
--md-accent-fg-color: #b55e4f;
--md-primary-fg-color--light: #ffcb76;
--md-primary-fg-color--light: #ddbf86;
/* not working part, has no effect */
--md-primary-bg-color: #272727;
--md-default-bg-color: #272727;
--md-default-bg-color--light: #272727;
--md-default-bg-color--lighter: #272727;
--md-default-bg-color--lightest: #272727;
--md-primary-bg-color: #121212;
--md-default-bg-color: #121212;
--md-default-bg-color--light: #f5efea;
--md-default-bg-color--lighter: #f5efea;
--md-default-bg-color--lightest: #f5efea;
}
/*

31
http.d/Recipes.conf Normal file
View File

@@ -0,0 +1,31 @@
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name localhost;
client_max_body_size 128M;
# serve media files
location /media {
alias /opt/recipes/mediafiles;
add_header Content-Disposition 'attachment; filename="$args"';
}
# serve service worker under main path
location = /service-worker.js {
alias /opt/recipes/staticfiles/vue3/service-worker.js;
}
# pass requests for dynamic content to gunicorn
location / {
proxy_set_header Host $http_host;
proxy_pass http://localhost:8080;
error_page 502 /errors/http502.html;
}
location /errors/ {
alias /etc/nginx/conf.d/errorpages/;
internal;
}
}

View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Simple HttpErrorPages | MIT License | https://github.com/HttpErrorPages -->
<meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>502 - Webservice currently unavailable</title>
<style type="text/css">/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}/*! Simple HttpErrorPages | MIT X11 License | https://github.com/AndiDittrich/HttpErrorPages */body,html{width:100%;height:100%;background-color:#21232a}body{color:#fff;text-align:center;text-shadow:0 2px 4px rgba(0,0,0,.5);padding:0;min-height:100%;-webkit-box-shadow:inset 0 0 100px rgba(0,0,0,.8);box-shadow:inset 0 0 100px rgba(0,0,0,.8);display:table;font-family:"Open Sans",Arial,sans-serif}h1{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;font-size:36px}h1 small{font-size:68%;font-weight:400;line-height:1;color:#777}a{text-decoration:none;color:#fff;font-size:inherit;border-bottom:dotted 1px #707070}.lead{color:silver;font-size:21px;line-height:1.4}.cover{display:table-cell;vertical-align:middle;padding:0 20px}footer{position:fixed;width:100%;height:40px;left:0;bottom:0;color:#a0a0a0;font-size:14px}</style>
</head>
<body>
<div class="cover"><h1>Tandoor Recipes is not yet available <small>502</small></h1>
<p class="lead">
Services are still trying to start.<br>
Please allow up to 3 minutes after you started the application on your server.<br><br>
If this status persists, check the application or docker logs for further information.<br>
After checking and trying everything mentioned in the <a href="https://docs.tandoor.dev/" target="_blank">docs</a>, you can request help on the project's <a href="https://github.com/TandoorRecipes/recipes/issues/new?assignees=&amp;labels=setup+issue&amp;template=help_request.yml" target="_blank">GitHub</a> page.
</p>
</div>
</body>
</html>

View File

@@ -13,6 +13,8 @@ theme:
favicon: logo_color.svg
palette:
scheme: slate
primary: custom
accent: custom

View File

@@ -6,10 +6,16 @@ server {
client_max_body_size 128M;
# serve media files
location /media/ {
alias /media/;
location /media {
alias /opt/recipes/mediafiles;
add_header Content-Disposition 'attachment; filename="$args"';
}
# serve service worker under main path
location = /service-worker.js {
alias /opt/recipes/staticfiles/vue3/service-worker.js;
}
# pass requests for dynamic content to gunicorn
location / {
proxy_set_header Host $http_host;

View File

@@ -1,5 +0,0 @@
{
"dependencies": {
"@vueuse/core": "^10.9.0"
}
}

View File

@@ -4,4 +4,5 @@ testpaths = cookbook/tests
python_files = tests.py test_*.py *_tests.py
# uncomment to run coverage reports
addopts = -n auto --cov=. --cov-report=html:docs/reports/coverage --cov-report=xml:docs/reports/coverage/coverage.xml --junitxml=docs/reports/tests/pytest.xml --html=docs/reports/tests/tests.html
# addopts = -n auto --junitxml=docs/reports/tests/pytest.xml --html=docs/reports/tests/tests.html
# addopts = -n auto --junitxml=docs/reports/tests/pytest.xml --html=docs/reports/tests/tests.html
asyncio_default_fixture_loop_scope = fixture

View File

@@ -55,11 +55,11 @@ litellm==1.64.1
# Development
pytest==8.4.1
pytest-django==4.11.0
pytest-cov===6.0.0
pytest-factoryboy==2.8.0
pytest-cov===6.2.1
pytest-factoryboy==2.8.1
pytest-html==4.1.1
pytest-asyncio==0.25.3
pytest-xdist==3.7.0
pytest-asyncio==1.1.0
pytest-xdist==3.8.0
autopep8==2.3.2
flake8==7.3.0
yapf==0.40.2

View File

@@ -36,6 +36,7 @@
"typescript": "^5.8.3",
"vite": "6.3.5",
"vite-plugin-pwa": "^1.0.1",
"workbox-core": "^7.3.0",
"workbox-build": "^7.3.0",
"workbox-window": "^7.3.0",
"workbox-background-sync": "^7.3.0",

View File

@@ -38,7 +38,7 @@
</v-list-item>
<v-divider></v-divider>
<component :is="item.component" :="item" v-for="item in useNavigation().getUserNavigation()"></component>
<component :is="item.component" :="item" :key="item.title" v-for="item in useNavigation().getUserNavigation()"></component>
</v-list>
</v-menu>
</v-avatar>
@@ -79,7 +79,7 @@
<v-list-item-subtitle>{{ useUserPreferenceStore().activeSpace.name }}</v-list-item-subtitle>
</v-list-item>
<v-divider></v-divider>
<component :is="item.component" :="item" v-for="item in useNavigation().NAVIGATION_DRAWER"></component>
<component :is="item.component" :="item" :key="item.title" v-for="item in useNavigation().getNavigationDrawer()"></component>
<navigation-drawer-context-menu></navigation-drawer-context-menu>
</v-list>
@@ -113,7 +113,7 @@
<v-icon icon="fa-fw fas fa-bars"></v-icon>
<v-bottom-sheet activator="parent" close-on-content-click>
<v-list nav>
<component :is="item.component" :="item" v-for="item in useNavigation().BOTTOM_NAVIGATION"></component>
<component :is="item.component" :="item" :key="item.title" v-for="item in useNavigation().getBottomNavigation()"></component>
</v-list>
</v-bottom-sheet>
</v-btn>
@@ -195,7 +195,7 @@ onMounted(() => {
}
.cv-day.today {
background-color: var(--primary) !important;
background-color: rgba(185, 135, 102, 0.2) !important;
}
.cv-day.outsideOfMonth {
@@ -209,12 +209,6 @@ onMounted(() => {
.d01 .cv-day-number {
background-color: #b98766 !important;
}
/* vueform/multiselect */
.multiselect-dropdown {
background: #212121 !important;
}
}
.v-theme--light {

View File

@@ -12,7 +12,7 @@ import { createRulesPlugin } from 'vuetify/labs/rules'
import {setupI18n} from "@/i18n";
import MealPlanPage from "@/pages/MealPlanPage.vue";
import {TandoorPlugin} from "@/types/Plugins.ts";
import {TANDOOR_PLUGINS, TandoorPlugin} from "@/types/Plugins.ts";
let routes = [
{path: '/', component: () => import("@/pages/StartPage.vue"), name: 'StartPage'},
@@ -54,13 +54,13 @@ let routes = [
{path: '/property-editor', component: () => import("@/pages/PropertyEditorPage.vue"), name: 'PropertyEditorPage'},
{path: '/space-setup', component: () => import("@/pages/SpaceSetupPage.vue"), name: 'SpaceSetupPage'},
{path: '/:pathMatch(.*)*', component: () => import("@/pages/404Page.vue"), name: '404Page'},
]
const pluginModules = import.meta.glob('@/plugins/*/plugin.ts', { eager: true })
const tandoorPlugins = [] as TandoorPlugin[]
Object.values(pluginModules).forEach(module => {
tandoorPlugins.push(module.plugin)
routes = routes.concat(module.plugin.routes)
// load plugin routes into routing table
TANDOOR_PLUGINS.forEach(plugin => {
routes = routes.concat(plugin.routes)
})
const router = createRouter({

View File

@@ -1,6 +1,6 @@
<template>
<v-dialog height="70vh" activator="parent" v-model="dialog">
<v-dialog max-width="1200px" activator="parent" v-model="dialog">
<v-card>
<v-closable-card-title v-model="dialog" :title="$t('Help')" icon="fa-solid fa-question">
<template #content>
@@ -13,68 +13,7 @@
</v-closable-card-title>
<v-divider></v-divider>
<v-card-text class="pa-0">
<v-layout style="height: 100%">
<v-navigation-drawer style="height: calc(100% + 0px)" v-model="drawer">
<v-list>
<v-list-item>
<v-text-field density="compact" variant="outlined" class="pt-2 pb-2" :label="$t('Search')" hide-details clearable></v-text-field>
</v-list-item>
<v-divider></v-divider>
<v-list-item link title="Start" @click="window = 'start'"></v-list-item>
<v-list-item link title="Space" @click="window = 'space'"></v-list-item>
</v-list>
</v-navigation-drawer>
<v-main>
<v-container>
<v-window v-model="window">
<v-window-item value="start">
<h2>Welcome to Tandoor 2</h2>
<p class="mt-3">Tandoor is one of the most most powerful recipe management suits available. It has constantly been improved since its first
version in 2018.
This knowledgebase explains all important features and concepts. Explore it to find out how Tandoor can help you improve your daily cooking
routine or search
for specific features to help you understand them.</p>
<p class="mt-3">Some of the most important concepts are Spaces, Recipes, Foods and Units.</p>
<v-alert class="mt-3" border="start" variant="tonal" color="success">
<v-alert-title>Did you know?</v-alert-title>
Tandoor is Open Source and available to anyone for free to host on their own server. Thousands of hours have been spend
making Tandoor what it is today. You can help make Tandoor even better by contributing or helping financing the effort.
<br/>
<v-btn class="mt-2" href="https://docs.tandoor.dev/contribute/contribute/" target="_blank" prepend-icon="fa-solid fa-code-branch">
Contribute
</v-btn>
<v-btn class="mt-2 ms-2" href="https://github.com/sponsors/vabene1111" target="_blank" prepend-icon="fa-solid fa-dollar-sign">Sponsor
</v-btn>
</v-alert>
</v-window-item>
<v-window-item value="space">
<p class="mt-3">All your data is stored in a Space where you can invite other people to collaborate on your recipe database. Typcially the members of a space
belong to one family/household/organization.</p>
<p class="mt-3">While everyone can access all recipes by default, Books, Shopping Lists and Mealplans are not shared by default. You can share them with other members of your space
using the settings.
</p>
<p class="mt-3">You can create and be a member of multiple spaces. Switch between them freely using the navigation or space settings. Depending
on the permission configured by the space owner you might not have access to all features of a space.</p>
<p class="mt-3"></p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-database" class="me-2" :to="{name: 'UserSpaceSettings'}">{{ $t('YourSpaces') }}</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="$settings" class="me-2" :to="{name: 'SpaceSettings'}">{{ $t('SpaceSettings') }}</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-users" class="me-2" :to="{name: 'SpaceMemberSettings'}">{{ $t('Invites') }}</v-btn>
</v-window-item>
</v-window>
</v-container>
</v-main>
</v-layout>
<help-view v-model="drawer"></help-view>
</v-card-text>
</v-card>
</v-dialog>
@@ -85,9 +24,10 @@
import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue";
import {ref} from "vue";
import HelpView from "@/components/display/HelpView.vue";
const dialog = ref(false)
const window = ref('start')
const drawer = ref(true)
</script>

View File

@@ -0,0 +1,349 @@
<template>
<v-layout style="height: 70vh">
<v-navigation-drawer style="height: calc(100% + 0px)" v-model="drawer">
<v-list>
<!-- <v-list-item>-->
<!-- <v-text-field density="compact" variant="outlined" class="pt-2 pb-2" :label="$t('Search')" hide-details clearable></v-text-field>-->
<!-- </v-list-item>-->
<!-- <v-divider></v-divider>-->
<v-list-item link title="Start" @click="window = 'start'" prepend-icon="fa-solid fa-house"></v-list-item>
<v-list-item link title="Space" @click="window = 'space'" prepend-icon="fa-solid fa-database"></v-list-item>
<v-list-item link :title="$t('Recipes')" @click="window = 'recipes'" prepend-icon="$recipes"></v-list-item>
<v-list-item link :title="$t('Import')" @click="window = 'import'" prepend-icon="$import"></v-list-item>
<v-list-item link :title="$t('Unit')" @click="window = 'unit'" prepend-icon="fa-solid fa-scale-balanced"></v-list-item>
<v-list-item link :title="$t('Food')" @click="window = 'food'" prepend-icon="fa-solid fa-carrot"></v-list-item>
<v-list-item link :title="$t('Keyword')" @click="window = 'keyword'" prepend-icon="fa-solid fa-tags"></v-list-item>
<v-list-item link title="Recipe Structure" @click="window = 'recipe_structure'" prepend-icon="fa-solid fa-diagram-project"></v-list-item>
<v-list-item link :title="$t('Properties')" @click="window = 'properties'" prepend-icon="fa-solid fa-database"></v-list-item>
<v-list-item link :title="$t('Search')" @click="window = 'recipe_search'" prepend-icon="$search"></v-list-item>
<v-list-item link :title="$t('SavedSearch')" @click="window = 'search_filter'" prepend-icon="fa-solid fa-sd-card"></v-list-item>
<v-list-item link :title="$t('Books')" @click="window = 'books'" prepend-icon="$books"></v-list-item>
<v-list-item link :title="$t('Shopping')" @click="window = 'shopping'" prepend-icon="$shopping"></v-list-item>
<v-list-item link :title="$t('Meal_Plan')" @click="window = 'meal_plan'" prepend-icon="$mealplan"></v-list-item>
</v-list>
</v-navigation-drawer>
<v-main>
<v-container>
<v-window v-model="window">
<v-window-item value="start">
<h2>Welcome to Tandoor 2</h2>
<p class="mt-3">Tandoor is one of the most most powerful recipe management suits available. It has constantly been improved since its first
version in 2018.
This knowledgebase explains all important features and concepts. Explore it to find out how Tandoor can help you improve your daily cooking
routine or search
for specific features to help you understand them.</p>
<v-btn class="mt-2" color="primary" href="https://tandoor.dev" target="_blank" prepend-icon="fa-solid fa-globe">
Website
</v-btn>
<v-btn class="mt-2 ms-2" color="info" href="https://github.com/TandoorRecipes/recipes" target="_blank" prepend-icon="fa-solid fa-code-branch">GitHub
</v-btn>
<v-alert class="mt-3" border="start" variant="tonal" color="success">
<v-alert-title>Did you know?</v-alert-title>
Tandoor is Open Source and available to anyone for free to host on their own server. Thousands of hours have been spend
making Tandoor what it is today. You can help make Tandoor even better by contributing or helping financing the effort.
<br/>
<v-btn class="mt-2" color="secondary" href="https://docs.tandoor.dev/contribute/contribute/" target="_blank" prepend-icon="fa-solid fa-code-branch">
Contribute
</v-btn>
<v-btn class="mt-2 ms-2" color="success" href="https://github.com/sponsors/vabene1111" target="_blank" prepend-icon="fa-solid fa-dollar-sign">Sponsor
</v-btn>
</v-alert>
</v-window-item>
<v-window-item value="space">
<p class="mt-3">All your data is stored in a Space where you can invite other people to collaborate on your recipe database. Typcially the members of a space
belong to one family/household/organization.</p>
<p class="mt-3">While everyone can access all recipes by default, Books, Shopping Lists and Mealplans are not shared by default. You can share them with other
members of your space
using the settings.
</p>
<p class="mt-3">You can create and be a member of multiple spaces. Switch between them freely using the navigation or space settings. Depending
on the permission configured by the space owner you might not have access to all features of a space.</p>
<p class="mt-3"></p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-database" class="me-2" :to="{name: 'UserSpaceSettings'}">{{ $t('YourSpaces') }}</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="$settings" class="me-2" :to="{name: 'SpaceSettings'}">{{ $t('SpaceSettings') }}</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-users" class="me-2" :to="{name: 'SpaceMemberSettings'}">{{ $t('Invites') }}</v-btn>
</v-window-item>
<v-window-item value="recipes">
<p class="mt-3">Recipes are the foundation of your Tandoor space. A Recipe has one or more steps that contain ingredients, instructions and other information.
Ingredients in turn consist of an amount, a unit and a food, allowing recipes to be scaled, nutrition's to be calculated and shopping to be organized.
</p>
<p class="mt-3">Besides manually creating them you can also import them from various different places.
</p>
<p class="mt-3">Recipes, by default, are visible to all members of your space. Setting them to private means only you can see it. After setting it to private you
can manually specify the people who should be able to view the recipe.
You can also create a share link for the recipe to share it with everyone that has access to the link.
</p>
<p class="mt-3"></p>
<v-btn color="primary" variant="tonal" prepend-icon="$create" class="me-2" :to="{name: 'ModelEditPage', params: {model: 'Recipe'}}">{{ $t('Create') }}</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="$search" class="me-2" :to="{name: 'SearchPage'}">{{ $t('Search') }}</v-btn>
</v-window-item>
<v-window-item value="import">
<p class="mt-3">The Recipe importer is one of the most powerful features of Tandoor and allows you to quickly add recipes in multiple different ways.
</p>
<p class="mt-3">The easiest is to import from a URL. If that is not enough you can also import from an Image or PDF file using AI.
</p>
<p class="mt-3">If you already have an existing Recipe database in another format there is also a good chance Tandoor will have an
importer for that program.
</p>
<p class="mt-3"></p>
<v-btn color="primary" variant="tonal" prepend-icon="$import" class="me-2" :to="{name: 'RecipeImportPage'}">{{ $t('Import') }}</v-btn>
</v-window-item>
<v-window-item value="unit">
<p class="mt-3">Units allow you to measure how much of something you need in a recipe or on a shopping list.
They are also essential for the calculation of Properties.
</p>
<p class="mt-3">Setting a base unit allows you to name your Unit however you want (e.g. grams, g, G, gram) while allowing Tandoor
to automatically convert between the units in the same system (weight/volume, e.g. from g to kg or from cup to pint).
</p>
<p class="mt-3">Additionally you can use custom unit conversion to convert between volume and weight trough the specific density
of a food (e.g. 1 cup of flour = 120 g). These conversions are used to calculate the Properties for a Recipe
and might allow cosmetic display changes later.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-scale-balanced" class="me-2" :to="{name: 'ModelListPage', params: {model: 'Unit'}}">
{{ $t('Unit') }}
</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-exchange-alt" class="me-2" :to="{name: 'ModelListPage', params: {model: 'UnitConversion'}}">
{{ $t('Conversion') }}
</v-btn>
</v-window-item>
<v-window-item value="food">
<p class="mt-3">Foods have multiple uses in Tandoor. Their most important task is to be part of recipe ingredients together with an amount and
a unit.
</p>
<p class="mt-3">Using the Food editor you can also add properties to a food or link the food to another recipe or external URL.
</p>
<p class="mt-3">Foods are also used or created when adding entries to the shopping list.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-carrot" class="me-2" :to="{name: 'ModelListPage', params: {model: 'Food'}}">
{{ $t('Food') }}
</v-btn>
</v-window-item>
<v-window-item value="keyword">
<p class="mt-3">Keywords are a very flexible Tool to help you organize your recipe collection.
Keywords can quickly be created when editing a Recipe by just typing into the Keywords field or they can
be created trough the Keyword Editor.
</p>
<p class="mt-3">Typical keywords include meal types (breakfast, lunch, dinner, ...), couise (american, italian, ...) or diet (vegan, vegetarian, ..).
</p>
<p class="mt-3">Tip: Using Emojis in Keywords makes them easy to recognize.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-tags" class="me-2" :to="{name: 'ModelListPage', params: {model: 'Keyword'}}">
{{ $t('Keyword') }}
</v-btn>
</v-window-item>
<v-window-item value="recipe_structure">
<p class="mt-3">A Recipe consists of multiple Steps.
</p>
<p class="mt-3">Each Step has Ingreditens (which are at least a Food but typically consist of amount,
Unit and Food). A Step can also contain instuctions, times, files or link to another Recipe.
</p>
<p class="mt-3">Additionally a Recipe can have Properties, Comments, Keywords and more.
</p>
<!-- TODO diagram -->
</v-window-item>
<v-window-item value="properties">
<p class="mt-3">The Properties system allows you to add additional data to your Foods and Recipes in the respective editors.
Most commonly you would use this to add nutrition facts but the system can also be used to track prices,
dietary points or any other kind of property.
</p>
<p class="mt-3">You first need to create the Property Types that you need (e.g. Carbohydrates, Sugar, Price, Points, ..).
Setting the FDC ID for a Property Type allows Tandoor to connect your custom Property Type to a property in the FDC database.
You can then go to a Food, set its FDC ID and Tandoor can automatically pull the properties you want from the FDC database.
</p>
<p class="mt-3">When adding a Property to the Recipe it will just be statically displayed in the Recipe view.
Adding properties to a Foods will allow Tandoor to calculate the properties for all the Ingredients in a Recipe based
on the Foods and their respective Units and Amounts.
</p>
<p class="mt-3">Food Properties are entered based on a certain amount of food (often 100 g). Unit Conversions allow Tandoor to
calculate the property amount if a Food is given in a different unit (e.g. 1kg or 1 cup).
</p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-database" class="me-2 mt-2 mb-2" :to="{name: 'ModelListPage', params: {model: 'PropertyType'}}">
{{ $t('Property') }}
</v-btn>
<h3>Editor</h3>
<p class="mt-3">Adding Properties manually to every food can be cumbersome. To make it easier you can import the Community curated
Open Data Database. If that is not enough you can open the Property Editor trough the context menu on your recipe.
</p>
<p class="mt-3">Here you can view all Foods in a Recipe and their respective properties. You can also quickly assign FDC ID's to both
Foods and Property Types and import the data from the FDC Database.
</p>
<h3>View</h3>
<p class="mt-3">
Properties are shown below every recipe as soon as you setup your first Property Types.
A small warning triangle is shown if there are missing values for one of the Foods in the recipe.
</p>
<p class="mt-3">
Clicking on the warning triangle allows you to see the individual property amounts of each food and where Properties
or Unit Conversions are missing.
</p>
</v-window-item>
<v-window-item value="recipe_search">
<p class="mt-3">There are two ways to search for Recipes.
</p>
<p class="mt-3">The global quick search can be opened from any page in Tandoor by pressing the search icon in the top right corner.
Here you can quickly search trough your recipes and open them.
</p>
<p class="mt-3">
If you need a bit more fine tuning for your search you can open the advances search and search for all kinds of different things like keywords,
foods or ratings.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="$search" class="me-2" :to="{name: 'SearchPage', }">
{{ $t('Search') }}
</v-btn>
</v-window-item>
<v-window-item value="search_filter">
<p class="mt-3">Once you have performed an advanced search you can save the search filter to easily retrieve it later.
</p>
<p class="mt-3">
This is done by hitting the save button in the advanced search form. To load a search filter you simply select it from the
selection box and hit the load button.
</p>
<p class="mt-3">
You can use saved search filters to automatically create recipe books.
</p>
</v-window-item>
<v-window-item value="books">
<p class="mt-3">Books are a a way to structure and explore your recipe collection. They are similar to keywords but show you a bit more details when
looking trough them.
</p>
<p class="mt-3">After creating a new Book on the books page you can either add recipes manually or you can add a Saved Search Filter to automatically
load recipes into your book based on pre defined search criteria.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="$books" class="me-2" :to="{name: 'BooksPage', }">
{{ $t('Books') }}
</v-btn>
</v-window-item>
<v-window-item value="shopping">
<p class="mt-3">
You can add inidivitual Foods (including non Food items of course) or whole recipes to your shopping list.
By default only you can see the entries you make, by going to the settings you can share them with other users and they can share them with you.
</p>
<p class="mt-3">
You can assign Supermarket Categories to your Foods, either trough the Food Editor or directly by clicking on a Shopping List Entry, to automatically sort the list
according to the Category Order defined in the Supermarket.
</p>
<p class="mt-3">
Each line in the shopping list can contain multiple entries of the same Food.
By clicking on a line you can open a dialog that allows you to see the details and perform various actions.
</p>
<v-list>
<v-list-item>Postpone: Hide the entry from the shopping list for a certain time (specified in the settings)</v-list-item>
<v-list-item>Ignore: Check this Food of the list and do not add it again when adding a recipe to the shopping list</v-list-item>
<v-list-item>Edit: Open the Food's Editor</v-list-item>
<v-list-item>Delete all: Delete all entries associated with this line.</v-list-item>
</v-list>
<p class="mt-3">
The Shopping list automatically syncronizes when multiple people have it open so you can shop with multiple devices.
</p>
<p class="mt-3">
Trough the menu you can also configure which information you want to be displayed or how the list should be sorted.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="$shopping" class="me-2" :to="{name: 'ShoppingListPage', }">
{{ $t('Shopping') }}
</v-btn>
<v-btn color="primary" variant="tonal" prepend-icon="$settings" class="me-2" :to="{name: 'ShoppingSettings', }">
{{ $t('Settings') }}
</v-btn>
</v-window-item>
<v-window-item value="meal_plan">
<p class="mt-3">
To plan what you want to eat you can create a Meal Plan. Each Meal Plan consists of at least a title or a recipe, a date and a Meal Type.
Meal Plan entries a private by default and can either be shared individually or using a preset in the meal plan settings.
</p>
<p class="mt-3">
When selecting a Recipe in a Meal Plan you can automatically add its ingredients to the shopping list. You can also manually add more entries trough the
shopping tab in the Meal Plan editor. When deleting a Meal Plan all Shopping List Entries associated with that Meal Plan are deleted as well. When changing the
number of servings in a Meal Plan the Servings of the connected Recipe in the Shopping list are automatically changed as well.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="$mealplan" class="me-2 mt-2" :to="{name: 'MealPlanPage', }">
{{ $t('Meal_Plan') }}
</v-btn>
<h3 class="mt-3">{{ $t('Meal_Type') }}</h3>
<p class="mt-3">
Meal Types allow you to categorize the different Meal Plan Entries.
</p>
<p class="mt-3">
You can also define a time that is used for sorting and calendar integration.
</p>
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-utensils" class="me-2 mt-2" :to="{name: 'ModelListPage', params: {model: 'MealType'}}">
{{ $t('Meal_Type') }}
</v-btn>
</v-window-item>
</v-window>
</v-container>
</v-main>
</v-layout>
</template>
<script setup lang="ts">
import {ref} from "vue";
const drawer = defineModel()
const window = ref('start')
</script>
<style scoped>
</style>

View File

@@ -36,7 +36,7 @@
</v-card>
<v-dialog max-width="900px" v-model="dialog">
<v-card v-if="dialogProperty">
<v-card v-if="dialogProperty" :loading="loading">
<v-closable-card-title :title="`${dialogProperty.propertyAmountTotal} ${dialogProperty.unit} ${dialogProperty.name}`" :sub-title="$t('total')" icon="$properties"
v-model="dialog"></v-closable-card-title>
<v-card-text>
@@ -60,8 +60,11 @@
<model-edit-dialog model="UnitConversion" @create="refreshRecipe()"
:item-defaults="{baseAmount: 1, baseUnit: fv.missing_conversion.base_unit, convertedUnit: fv.missing_conversion.converted_unit, food: fv.food}"></model-edit-dialog>
</v-chip>
<v-chip color="warning" prepend-icon="$edit" class="cursor-pointer" :to="{name: 'ModelEditPage', params: {model: 'Recipe', id: recipe.id}}" v-else-if="fv.missing_unit">
{{ $t('NoUnit') }}
</v-chip>
<v-chip color="error" prepend-icon="$edit" class="cursor-pointer" v-else>
{{ $t('Edit') }}
{{ $t('MissingProperties') }}
<model-edit-dialog model="Food" :item-id="fv.food.id" @update:model-value="refreshRecipe()"></model-edit-dialog>
</v-chip>
</template>
@@ -182,6 +185,8 @@ const sourceSelectedToShow = ref<'recipe' | 'food'>("food")
const dialog = ref(false)
const dialogProperty = ref<undefined | PropertyWrapper>(undefined)
const loading = ref(false)
onMounted(() => {
if (!hasFoodProperties) {
sourceSelectedToShow.value = "recipe"
@@ -193,6 +198,7 @@ onMounted(() => {
*/
function refreshRecipe() {
let api = new ApiApi()
loading.value = true
api.apiRecipeRetrieve({id: recipe.value.id!}).then(r => {
recipe.value = r
@@ -205,6 +211,8 @@ function refreshRecipe() {
}
})
}
loading.value = false
})
}).catch(err => {
useMessageStore().addError(ErrorMessageType.FETCH_ERROR, err)

View File

@@ -0,0 +1,39 @@
<template>
<v-select :label="$t('BaseUnit')" :hint="$t('BaseUnitHelp')" :items="BASE_UNITS" v-model="model"></v-select>
</template>
<script setup lang="ts">
import {useI18n} from "vue-i18n";
const {t} = useI18n()
const model = defineModel()
const BASE_UNITS = [
{value: "g", title: t("g")},
{value: "kg", title: t("kg")},
{value: "ounce", title: t("ounce")},
{value: "pound", title: t("pound")},
{value: "ml", title: t("ml")},
{value: "l", title: t("l")},
{value: "fluid_ounce", title: t("fluid_ounce")},
{value: "us_cup", title: t("us_cup")},
{value: "pint", title: t("pint")},
{value: "quart", title: t("quart")},
{value: "gallon", title: t("gallon")},
{value: "tbsp", title: t("tbsp")},
{value: "tsp", title: t("tsp")},
{value: "imperial_fluid_ounce", title: t("imperial_fluid_ounce")},
{value: "imperial_pint", title: t("imperial_pint")},
{value: "imperial_quart", title: t("imperial_quart")},
{value: "imperial_gallon", title: t("imperial_gallon")},
{value: "imperial_tbsp", title: t("imperial_tbsp")},
{value: "imperial_tsp", title: t("imperial_tsp")},
]
</script>
<style scoped>
</style>

View File

@@ -39,6 +39,11 @@
<model-select :label="$t('Unit')" v-model="editingObj.convertedUnit" model="Unit"></model-select>
</v-col>
</v-row>
<v-row>
<v-col>
<v-text-field :label="$t('Open_Data_Slug')" :hint="$t('open_data_help_text')" persistent-hint v-model="editingObj.openDataSlug" disabled></v-text-field>
</v-col>
</v-row>
</v-form>
</v-card-text>
</model-editor-base>

View File

@@ -14,7 +14,7 @@
<v-text-field :label="$t('Name')" v-model="editingObj.name"></v-text-field>
<v-text-field :label="$t('Plural')" v-model="editingObj.pluralName"></v-text-field>
<v-textarea :label="$t('Description')" v-model="editingObj.description"></v-textarea>
<v-select :label="$t('BaseUnit')" :hint="$t('BaseUnitHelp')" :items="BASE_UNITS" v-model="editingObj.baseUnit"></v-select>
<base-unit-select v-model="editingObj.baseUnit"></base-unit-select>
<v-text-field :label="$t('Open_Data_Slug')" :hint="$t('open_data_help_text')" persistent-hint v-model="editingObj.openDataSlug" disabled></v-text-field>
</v-form>
</v-card-text>
@@ -29,6 +29,7 @@ import {Unit} from "@/openapi";
import ModelEditorBase from "@/components/model_editors/ModelEditorBase.vue";
import {useModelEditorFunctions} from "@/composables/useModelEditorFunctions";
import {useI18n} from "vue-i18n";
import BaseUnitSelect from "@/components/inputs/BaseUnitSelect.vue";
const {t} = useI18n()
@@ -51,27 +52,7 @@ watch([() => props.item, () => props.itemId], () => {
// object specific data (for selects/display)
const BASE_UNITS = [
{value: "g", title: t("g")},
{value: "kg", title: t("kg")},
{value: "ounce", title: t("ounce")},
{value: "pound", title: t("pound")},
{value: "ml", title: t("ml")},
{value: "l", title: t("l")},
{value: "fluid_ounce", title: t("fluid_ounce")},
{value: "us_cup", title: t("us_cup")},
{value: "pint", title: t("pint")},
{value: "quart", title: t("quart")},
{value: "gallon", title: t("gallon")},
{value: "tbsp", title: t("tbsp")},
{value: "tsp", title: t("tsp")},
{value: "imperial_fluid_ounce", title: t("imperial_fluid_ounce")},
{value: "imperial_pint", title: t("imperial_pint")},
{value: "imperial_quart", title: t("imperial_quart")},
{value: "imperial_gallon", title: t("imperial_gallon")},
{value: "imperial_tbsp", title: t("imperial_tbsp")},
{value: "imperial_tsp", title: t("imperial_tsp")},
]
onMounted(() => {
initializeEditor()

View File

@@ -2,6 +2,8 @@ import {useI18n} from "vue-i18n";
import {VDivider, VListItem} from "vuetify/components";
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
import {useDjangoUrls} from "@/composables/useDjangoUrls.ts";
import {TANDOOR_PLUGINS} from "@/types/Plugins.ts";
import {plugin} from "@/plugins/open_data_plugin/plugin.ts";
/**
* manages configuration and loading of navigation entries for tandoor main app and plugins
@@ -9,27 +11,46 @@ import {useDjangoUrls} from "@/composables/useDjangoUrls.ts";
export function useNavigation() {
const {t} = useI18n()
let NAVIGATION_DRAWER = [
{component: VListItem, prependIcon: '$recipes', title: 'Home', to: {name: 'StartPage', params: {}}},
{component: VListItem, prependIcon: '$search', title: t('Search'), to: {name: 'SearchPage', params: {}}},
{component: VListItem, prependIcon: '$mealplan', title: t('Meal_Plan'), to: {name: 'MealPlanPage', params: {}}},
{component: VListItem, prependIcon: '$shopping', title: t('Shopping_list'), to: {name: 'ShoppingListPage', params: {}}},
{component: VListItem, prependIcon: 'fas fa-globe', title: t('Import'), to: {name: 'RecipeImportPage', params: {}}},
{component: VListItem, prependIcon: '$books', title: t('Books'), to: {name: 'BooksPage', params: {}}},
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: t('DatabasePage'), to: {name: 'SearchPage', params: {}}},
]
function getNavigationDrawer() {
let navigation = [
{component: VListItem, prependIcon: '$recipes', title: 'Home', to: {name: 'StartPage', params: {}}},
{component: VListItem, prependIcon: '$search', title: t('Search'), to: {name: 'SearchPage', params: {}}},
{component: VListItem, prependIcon: '$mealplan', title: t('Meal_Plan'), to: {name: 'MealPlanPage', params: {}}},
{component: VListItem, prependIcon: '$shopping', title: t('Shopping_list'), to: {name: 'ShoppingListPage', params: {}}},
{component: VListItem, prependIcon: 'fas fa-globe', title: t('Import'), to: {name: 'RecipeImportPage', params: {}}},
{component: VListItem, prependIcon: '$books', title: t('Books'), to: {name: 'BooksPage', params: {}}},
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: t('Database'), to: {name: 'DatabasePage', params: {}}},
]
let BOTTOM_NAVIGATION = [
{component: VListItem, prependIcon: 'fa-solid fa-sliders', title: t('Settings'), to: {name: 'SettingsPage', params: {}}},
{component: VListItem, prependIcon: 'fas fa-globe', title: t('Import'), to: {name: 'RecipeImportPage', params: {}}},
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: t('Database'), to: {name: 'DatabasePage', params: {}}},
{component: VListItem, prependIcon: '$books', title: t('Books'), to: {name: 'BooksPage', params: {}}},
]
TANDOOR_PLUGINS.forEach(plugin => {
plugin.navigationDrawer.forEach(navEntry => {
let navEntryCopy = Object.assign({}, navEntry)
navEntryCopy.title = t(navEntryCopy.title)
navigation.push(navEntryCopy)
})
})
let USER_NAVIGATION = [
{component: VListItem, prependIcon: 'fa-solid fa-sliders', title: t('Settings'), to: {name: 'SettingsPage', params: {}}},
{component: VListItem, prependIcon: 'fa-solid fa-question', title: t('Settings'), to: {name: 'HelpPage', params: {}}},
]
return navigation
}
function getBottomNavigation() {
let navigation = [
{component: VListItem, prependIcon: 'fa-solid fa-sliders', title: t('Settings'), to: {name: 'SettingsPage', params: {}}},
{component: VListItem, prependIcon: 'fas fa-globe', title: t('Import'), to: {name: 'RecipeImportPage', params: {}}},
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: t('Database'), to: {name: 'DatabasePage', params: {}}},
{component: VListItem, prependIcon: '$books', title: t('Books'), to: {name: 'BooksPage', params: {}}},
]
TANDOOR_PLUGINS.forEach(plugin => {
plugin.bottomNavigation.forEach(navEntry => {
let navEntryCopy = Object.assign({}, navEntry)
navEntryCopy.title = t(navEntryCopy.title)
navigation.push(navEntryCopy)
})
})
return navigation
}
function getUserNavigation() {
let navigation = []
@@ -56,26 +77,18 @@ export function useNavigation() {
navigation.push({component: VDivider})
}
TANDOOR_PLUGINS.forEach(plugin => {
plugin.userNavigation.forEach(navEntry => {
let navEntryCopy = Object.assign({}, navEntry)
navEntryCopy.title = t(navEntryCopy.title)
navigation.push(navEntryCopy)
})
})
navigation.push({component: VListItem, prependIcon: 'fa-solid fa-arrow-right-from-bracket', title: t('Logout'), href: useDjangoUrls().getDjangoUrl('accounts/logout')})
return navigation
}
return {NAVIGATION_DRAWER, BOTTOM_NAVIGATION, USER_NAVIGATION, getUserNavigation}
}
//
// <v-list-item :href="getDjangoUrl('admin')" target="_blank" v-if="useUserPreferenceStore().userSettings.user.isSuperuser">
// <template #prepend>
// <v-icon icon="fa-solid fa-shield"></v-icon>
// </template>
// {{ $t('Admin') }}
// </v-list-item>
// <v-list-item :href="getDjangoUrl('accounts/logout')" link>
// <template #prepend>
// <v-icon icon="fa-solid fa-arrow-right-from-bracket"></v-icon>
// </template>
// {{ $t('Logout') }}
// </v-list-item>
return {getNavigationDrawer, getBottomNavigation, getUserNavigation}
}

View File

@@ -7,6 +7,7 @@ import type {
import {createI18n} from "vue-i18n";
import en from "../../vue3/src/locales/en.json";
import {TANDOOR_PLUGINS} from "@/types/Plugins.ts";
/**
* lazy loading of translation, resources:
@@ -31,10 +32,17 @@ export function setupI18n() {
locale: 'en',
fallbackLocale: 'en',
messages: {
en
en,
},
}) as I18n
// async load plugin default locales
TANDOOR_PLUGINS.forEach(plugin => {
plugin.defaultLocale.then(pluginMessages => {
i18n.global.mergeLocaleMessage('en', pluginMessages)
})
})
// async load user locale into existing i18n instance
loadLocaleMessages(i18n, locale).then()
@@ -48,9 +56,10 @@ export function setupI18n() {
*/
export async function loadLocaleMessages(i18n: I18n, locale: Locale) {
// load locale messages
const messages = await import(`./locales/${locale}.json`).then(
(r: any) => r.default || r
)
let messages = en
if (locale != 'en') {
messages = await import(`./locales/${locale}.json`).then((r: any) => r.default || r)
}
// remove empty strings
Object.entries(messages).forEach(([key, value]) => {
@@ -62,6 +71,25 @@ export async function loadLocaleMessages(i18n: I18n, locale: Locale) {
// set messages for locale
i18n.global.setLocaleMessage(locale, messages)
// async load and merge messages from plugins
TANDOOR_PLUGINS.forEach(plugin => {
let pluginLocales = getSupportedLocales(plugin.localeFiles)
if (pluginLocales.includes(locale)) {
import(`@/plugins/${plugin.basePath}/locales/${locale}.json`).then((r: any) => {
let pluginMessages = r.default || r
// remove empty strings
Object.entries(pluginMessages).forEach(([key, value]) => {
if (value === '') {
delete pluginMessages[key]
}
})
i18n.global.mergeLocaleMessage(locale, pluginMessages)
})
}
})
// switch to given locale
setLocale(i18n, locale)
}
@@ -69,10 +97,11 @@ export async function loadLocaleMessages(i18n: I18n, locale: Locale) {
/**
* loop trough translation files to determine for which locales a translation is available
* @return string[] of supported locales
* @param localeFiles module import of locale files to loop trough
*/
function getSupportedLocales() {
function getSupportedLocales(localeFiles = import.meta.glob('@/locales/*.json')) {
let supportedLocales: string[] = []
let localeFiles = import.meta.glob('@/locales/*.json');
for (const path in localeFiles) {
supportedLocales.push(path.split('/').slice(-1)[0].split('.')[0]);
}

View File

@@ -147,6 +147,7 @@
"Merge": "",
"Merge_Keyword": "",
"Message": "",
"MissingProperties": "",
"Month": "",
"Move": "",
"MoveCategory": "",
@@ -169,6 +170,7 @@
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
"NoUnit": "",
"No_ID": "",
"No_Results": "",
"NotInShopping": "",

View File

@@ -141,6 +141,7 @@
"Meal_Types": "Видове хранене",
"Merge": "Обединяване",
"Merge_Keyword": "Обединяване на ключова дума",
"MissingProperties": "",
"Month": "Месец",
"Move": "Премести",
"MoveCategory": "Премести към: ",
@@ -162,6 +163,7 @@
"Next_Day": "Следващия ден",
"Next_Period": "Следващ период",
"NoCategory": "Няма избрана категория.",
"NoUnit": "",
"No_ID": "Идентификатора не е намерен, не може да се изтрие.",
"No_Results": "Няма резултати",
"NotInShopping": "{food} не е в списъка ви за пазаруване.",

View File

@@ -198,6 +198,7 @@
"Merge": "Unificar",
"Merge_Keyword": "Fusioneu paraula clau",
"Message": "Missatge",
"MissingProperties": "",
"Month": "Mes",
"Move": "Moure",
"MoveCategory": "Moure a: ",
@@ -227,6 +228,7 @@
"Next_Period": "Període següent",
"NoCategory": "No s'ha seleccionat categoria.",
"NoMoreUndo": "No hi ha canvis per desar.",
"NoUnit": "",
"No_ID": "No s'ha trobat l'ID, no es pot eliminar.",
"No_Results": "No hi ha resultats",
"NotInShopping": "{food} no està a la teva llista de la compra.",

View File

@@ -196,6 +196,7 @@
"Merge": "Spojit",
"Merge_Keyword": "Sloučit štítek",
"Message": "Zpráva",
"MissingProperties": "",
"Month": "Měsíc",
"Move": "Přesunout",
"MoveCategory": "Přesunout do: ",
@@ -224,6 +225,7 @@
"Next_Day": "Následující den",
"Next_Period": "Další období",
"NoCategory": "Není vybrána žádná kategorie.",
"NoUnit": "",
"No_ID": "ID nenalezeno, odstranění není možné.",
"No_Results": "Žádné výsledky",
"NotInShopping": "{food} není na vašem nákupním seznamu.",

View File

@@ -198,6 +198,7 @@
"Merge": "Sammenflet",
"Merge_Keyword": "Sammenflet nøgleord",
"Message": "Besked",
"MissingProperties": "",
"Month": "Måned",
"Move": "Flyt",
"MoveCategory": "Flyt til: ",
@@ -227,6 +228,7 @@
"Next_Period": "Næste periode",
"NoCategory": "Ingen kategori valgt.",
"NoMoreUndo": "Ingen ændringer at fortryde.",
"NoUnit": "",
"No_ID": "ID findes ikke, kan ikke slette.",
"No_Results": "Ingen resultater",
"NotInShopping": "{food} er ikke i din indkøbsliste.",

File diff suppressed because it is too large Load Diff

View File

@@ -198,6 +198,7 @@
"Merge": "Συγχώνευση",
"Merge_Keyword": "Συγχώνευση λέξης-κλειδί",
"Message": "Μήνυμα",
"MissingProperties": "",
"Month": "Μήνας",
"Move": "Μετακίνηση",
"MoveCategory": "Μετακίνηση σε: ",
@@ -227,6 +228,7 @@
"Next_Period": "Επόμενη περίοδος",
"NoCategory": "Δεν έχει επιλεγεί κατηγορία.",
"NoMoreUndo": "Δεν υπάρχουν αλλαγές για ανέρεση.",
"NoUnit": "",
"No_ID": "Το ID δεν βρέθηκε, αδύνατη η διαγραφή.",
"No_Results": "Δεν υπάρχουν αποτελέσματα",
"NotInShopping": "Το φαγητό { food} δεν είναι στη λίστα αγορών σας.",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -192,6 +192,7 @@
"Merge": "Yhdistä",
"Merge_Keyword": "Yhdistä Avainsana",
"Message": "Viesti",
"MissingProperties": "",
"Month": "Kuukausi",
"Move": "Siirry",
"MoveCategory": "Siirrä paikkaan: ",
@@ -216,6 +217,7 @@
"Next_Period": "Seuraava Jakso",
"NoCategory": "Luokkaa ei ole valittu.",
"NoMoreUndo": "Ei peruttavia muutoksia.",
"NoUnit": "",
"No_ID": "Poistaminen epäonnistui, ID:tä ei löytynyt.",
"No_Results": "Ei Tuloksia",
"NotInShopping": "{food} ei ole ostoslistalla.",

View File

@@ -197,6 +197,7 @@
"Merge": "Fusionner",
"Merge_Keyword": "Fusionner le mot-clé",
"Message": "Message",
"MissingProperties": "",
"Month": "Mois",
"Move": "Déplacer",
"MoveCategory": "Déplacer vers : ",
@@ -226,6 +227,7 @@
"Next_Period": "Prochaine période",
"NoCategory": "Pas de catégorie sélectionnée.",
"NoMoreUndo": "Aucun changement à annuler.",
"NoUnit": "",
"No_ID": "ID introuvable, impossible de supprimer.",
"No_Results": "Aucun résultat",
"NotInShopping": "Laliment {food} nest pas dans votre liste de courses.",

View File

@@ -198,6 +198,7 @@
"Merge": "איחוד",
"Merge_Keyword": "איחוד מילת מפתח",
"Message": "הודעה",
"MissingProperties": "",
"Month": "חודש",
"Move": "העברה",
"MoveCategory": "העבר אל: ",
@@ -227,6 +228,7 @@
"Next_Period": "התקופה הבאה",
"NoCategory": "לא נבחרה קטגוריה.",
"NoMoreUndo": "אין עוד שינויים לשחזור.",
"NoUnit": "",
"No_ID": "מזהה לא נמצא, בלתי ניתן למחיקה.",
"No_Results": "אין תוצאות",
"NotInShopping": "{food} אינו רשימת הקניות.",

View File

@@ -198,6 +198,7 @@
"Merge": "Spoji",
"Merge_Keyword": "Spoji ključnu riječ",
"Message": "Poruka",
"MissingProperties": "",
"Month": "Mjesec",
"Move": "Premjesti",
"MoveCategory": "Premjesti u: ",
@@ -227,6 +228,7 @@
"Next_Period": "Slijedeće razdoblje",
"NoCategory": "Nije odabrana kategorija.",
"NoMoreUndo": "Nema promjena koje se mogu poništiti.",
"NoUnit": "",
"No_ID": "ID nije pronađen, ne može se izbrisati.",
"No_Results": "Nema rezultata",
"NotInShopping": "{food} nije na vašem popisu za kupovinu.",

View File

@@ -179,6 +179,7 @@
"Merge": "Összefűzés",
"Merge_Keyword": "Kulcsszó összevonása",
"Message": "Üzenet",
"MissingProperties": "",
"Month": "Hónap",
"Move": "Mozgatás",
"MoveCategory": "Áthelyezés ide: ",
@@ -204,6 +205,7 @@
"Next_Day": "Következő nap",
"Next_Period": "Következő periódus",
"NoCategory": "Nincs kategória kiválasztva.",
"NoUnit": "",
"No_ID": "Azonosító nem található, ezért nem törölhető.",
"No_Results": "Nincsenek találatok",
"NotInShopping": "{food} nincs a bevásárlólistáján.",

View File

@@ -61,6 +61,7 @@
"Meal_Plan": "Ճաշացուցակ",
"Merge": "Միացնել",
"Merge_Keyword": "Միացնել բանալի բառը",
"MissingProperties": "",
"Move": "Տեղափոխել",
"Move_Food": "Տեղափոխել սննդամթերքը",
"Move_Keyword": "Տեղափոխել բանալի բառը",
@@ -69,6 +70,7 @@
"New_Food": "Նոր սննդամթերք",
"New_Keyword": "Նոր բանալի բառ",
"New_Recipe": "Նոր բաղադրատոմս",
"NoUnit": "",
"No_Results": "Արդյունքներ չկան",
"Nutrition": "",
"Ok": "",

View File

@@ -164,6 +164,7 @@
"Merge": "Menggabungkan",
"Merge_Keyword": "Gabungkan Kata Kunci",
"Message": "",
"MissingProperties": "",
"Month": "",
"Move": "Bergerak",
"MoveCategory": "",
@@ -188,6 +189,7 @@
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
"NoUnit": "",
"No_ID": "",
"No_Results": "",
"NotInShopping": "",

View File

@@ -197,6 +197,7 @@
"Merge": "",
"Merge_Keyword": "",
"Message": "",
"MissingProperties": "",
"Month": "",
"Move": "",
"MoveCategory": "",
@@ -226,6 +227,7 @@
"Next_Period": "",
"NoCategory": "",
"NoMoreUndo": "",
"NoUnit": "",
"No_ID": "",
"No_Results": "",
"NotInShopping": "",

View File

@@ -777,7 +777,7 @@
"WarnPageLeave": "Ci sono modifiche non salvate che andranno perse. Vuoi comunque abbandonare la pagina?",
"searchFilterCreatedByHelp": "Ricette create dall'utente selezionato.",
"searchFilterObjectsAndNotHelp": "Escludi le ricette con tutti i {type} selezionati",
"SupermarketCategoryHelp": "Le categorie descrivono le aree dei supermercati (ad esempio, frutta, gastronomia, ...). Possono essere collegate agli alimenti e ai supermercati per la selezione/filtraggio automatici.",
"SupermarketCategoryHelp": "Le categorie descrivono le aree dei supermercati (ad esempio, frutta, gastronomia, ...). Possono essere collegate agli alimenti e ai supermercati per la selezione e per il filtraggio automatici.",
"Apply": "Applica",
"IgnoreAccents": "Ignora accenti",
"PartialMatch": "Corrispondenza parziale",
@@ -792,7 +792,9 @@
"Fulltext": "Fulltext",
"FuzzySearchHelp": "Utilizza la ricerca fuzzy per trovare voci anche quando ci sono differenze nel modo in cui la parola è scritta.",
"Fuzzy": "Fuzzy",
"PrecisionSearchHelp": "Preimpostazione che restituisce solo voci con ortografia corretta. ",
"PrecisionSearchHelp": "Preimpostazione che restituisce solo voci con ortografia precisa. ",
"SearchSettingsWarning": "Di solito non è necessario modificare le impostazioni di ricerca. Queste impostazioni sono disponibili solo per utenti esperti con esigenze specifiche. ",
"TrigramThreshold": "Soglia del trigramma"
"TrigramThreshold": "Soglia del trigramma",
"Comment": "Commento",
"Source": "Fonte"
}

View File

@@ -181,6 +181,7 @@
"Merge": "",
"Merge_Keyword": "Sujungti raktažodį",
"Message": "",
"MissingProperties": "",
"Month": "",
"Move": "",
"MoveCategory": "",
@@ -207,6 +208,7 @@
"Next_Day": "",
"Next_Period": "",
"NoCategory": "",
"NoUnit": "",
"No_ID": "",
"No_Results": "",
"NotInShopping": "",

View File

@@ -198,6 +198,7 @@
"Merge": "",
"Merge_Keyword": "",
"Message": "",
"MissingProperties": "",
"Month": "",
"Move": "",
"MoveCategory": "",
@@ -227,6 +228,7 @@
"Next_Period": "",
"NoCategory": "",
"NoMoreUndo": "",
"NoUnit": "",
"No_ID": "",
"No_Results": "",
"NotInShopping": "",

View File

@@ -188,6 +188,7 @@
"Merge": "Slå sammen",
"Merge_Keyword": "Slå sammen nøkkelord",
"Message": "Melding",
"MissingProperties": "",
"Month": "Måned",
"Move": "Flytt",
"MoveCategory": "Flytt til: ",
@@ -213,6 +214,7 @@
"Next_Period": "Neste periode",
"NoCategory": "Ingen kategori valgt.",
"NoMoreUndo": "Ingen endringer å angre.",
"NoUnit": "",
"No_ID": "ID ikke funnet, kan ikke slette.",
"No_Results": "Ingen resultat",
"NotInShopping": "{food} er ikke i handlelisten din.",

File diff suppressed because it is too large Load Diff

View File

@@ -199,6 +199,7 @@
"Merge": "Scal",
"Merge_Keyword": "Scal słowa kluczowe",
"Message": "Wiadomość",
"MissingProperties": "",
"Month": "Miesiąc",
"Move": "Przenieś",
"MoveCategory": "Przenieś do: ",
@@ -228,6 +229,7 @@
"Next_Period": "Następny okres",
"NoCategory": "Nie wybrano kategorii.",
"NoMoreUndo": "Brak zmian do wycofania.",
"NoUnit": "",
"No_ID": "ID nie znaleziono, nie można usunąć.",
"No_Results": "Brak wyników",
"NotInShopping": "{food} nie ma na Twojej liście zakupów.",

View File

@@ -153,6 +153,7 @@
"Meal_Types": "Tipos de refeições",
"Merge": "Juntar",
"Merge_Keyword": "Unir palavra-chave",
"MissingProperties": "",
"Month": "Mês",
"Move": "Mover",
"MoveCategory": "Mover para: ",
@@ -173,6 +174,7 @@
"Next_Period": "Próximo período",
"NoCategory": "Nenhuma categoria selecionada.",
"NoMoreUndo": "Nenhuma alteração para ser desfeita.",
"NoUnit": "",
"No_ID": "identificação não encontrada, impossível eliminar.",
"No_Results": "Sem resultados",
"NotInShopping": "{food} não está na sua lista de compras.",

File diff suppressed because it is too large Load Diff

View File

@@ -173,6 +173,7 @@
"Merge": "Unire",
"Merge_Keyword": "Unește cuvânt cheie",
"Message": "Mesaj",
"MissingProperties": "",
"Month": "Lună",
"Move": "Mută",
"MoveCategory": "Mută la: ",
@@ -197,6 +198,7 @@
"Next_Day": "Ziua următoare",
"Next_Period": "Perioada următoare",
"NoCategory": "Nicio categorie selectată.",
"NoUnit": "",
"No_ID": "ID-ul nu a fost găsit, nu se poate șterge.",
"No_Results": "Fără rezultate",
"NotInShopping": "{food} nu se află în lista de cumpărături.",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -199,6 +199,7 @@
"Merge": "Slå samman",
"Merge_Keyword": "Slå samman nyckelord",
"Message": "Meddelande",
"MissingProperties": "",
"Month": "Månad",
"Move": "Flytta",
"MoveCategory": "Flytta till: ",
@@ -228,6 +229,7 @@
"Next_Period": "Nästa period",
"NoCategory": "Ingen kategori vald.",
"NoMoreUndo": "Inga ändringar att ångra.",
"NoUnit": "",
"No_ID": "ID hittades inte, kan inte radera.",
"No_Results": "Inget resultat",
"NotInShopping": "{food} finns inte i din inköpslista.",

View File

@@ -198,6 +198,7 @@
"Merge": "Birleştir",
"Merge_Keyword": "Anahtar Kelimeyi Birleştir",
"Message": "Mesaj",
"MissingProperties": "",
"Month": "Ay",
"Move": "Taşı",
"MoveCategory": "Taşı: ",
@@ -227,6 +228,7 @@
"Next_Period": "Sonraki Dönem",
"NoCategory": "Hiçbir kategori seçilmedi.",
"NoMoreUndo": "Yapılacak değişiklik yok.",
"NoUnit": "",
"No_ID": "ID bulunamadı, silinemez.",
"No_Results": "Sonuç Yok",
"NotInShopping": "{food} alışveriş listenizde yok.",

View File

@@ -170,6 +170,7 @@
"Meal_Types": "Типи страви",
"Merge": "Об'єднати",
"Merge_Keyword": "Об'єднати Ключове слово",
"MissingProperties": "",
"Month": "Місяць",
"Move": "Перемістити",
"MoveCategory": "Перемістити До: ",
@@ -193,6 +194,7 @@
"Next_Period": "Наступний період",
"NoCategory": "Жодна категорія не вибрана.",
"NoMoreUndo": "Відсутні зміни для скасування.",
"NoUnit": "",
"No_ID": "ID не знайдено, неможливо видалити.",
"No_Results": "Немає Результату",
"NotInShopping": "{food} немає в вашому списку покупок.",

View File

@@ -198,6 +198,7 @@
"Merge": "合并",
"Merge_Keyword": "合并关键词",
"Message": "信息",
"MissingProperties": "",
"Month": "月份",
"Move": "移动",
"MoveCategory": "移动到: ",
@@ -227,6 +228,7 @@
"Next_Period": "下期",
"NoCategory": "未选择分类。",
"NoMoreUndo": "没有可撤消的更改。",
"NoUnit": "",
"No_ID": "未找到标识,不能删除。",
"No_Results": "没有结果",
"NotInShopping": "购物清单中没有 {food}。",

View File

@@ -198,6 +198,7 @@
"Merge": "合併",
"Merge_Keyword": "合併關鍵字",
"Message": "消息",
"MissingProperties": "",
"Month": "月",
"Move": "移動",
"MoveCategory": "移動分類 ",
@@ -227,6 +228,7 @@
"Next_Period": "下一期間",
"NoCategory": "未選擇分類。",
"NoMoreUndo": "沒有可撤消的更改。",
"NoUnit": "",
"No_ID": "未找到標識,不能刪除。",
"No_Results": "無結果",
"NotInShopping": "購物清單中沒有 {food}。",

View File

@@ -64,6 +64,13 @@ models/PaginatedInviteLinkList.ts
models/PaginatedKeywordList.ts
models/PaginatedMealPlanList.ts
models/PaginatedMealTypeList.ts
models/PaginatedOpenDataCategoryList.ts
models/PaginatedOpenDataConversionList.ts
models/PaginatedOpenDataFoodList.ts
models/PaginatedOpenDataPropertyList.ts
models/PaginatedOpenDataStoreList.ts
models/PaginatedOpenDataUnitList.ts
models/PaginatedOpenDataVersionList.ts
models/PaginatedPropertyList.ts
models/PaginatedPropertyTypeList.ts
models/PaginatedRecipeBookEntryList.ts

View File

@@ -60,6 +60,13 @@ import type {
PaginatedKeywordList,
PaginatedMealPlanList,
PaginatedMealTypeList,
PaginatedOpenDataCategoryList,
PaginatedOpenDataConversionList,
PaginatedOpenDataFoodList,
PaginatedOpenDataPropertyList,
PaginatedOpenDataStoreList,
PaginatedOpenDataUnitList,
PaginatedOpenDataVersionList,
PaginatedPropertyList,
PaginatedPropertyTypeList,
PaginatedRecipeBookEntryList,
@@ -252,6 +259,20 @@ import {
PaginatedMealPlanListToJSON,
PaginatedMealTypeListFromJSON,
PaginatedMealTypeListToJSON,
PaginatedOpenDataCategoryListFromJSON,
PaginatedOpenDataCategoryListToJSON,
PaginatedOpenDataConversionListFromJSON,
PaginatedOpenDataConversionListToJSON,
PaginatedOpenDataFoodListFromJSON,
PaginatedOpenDataFoodListToJSON,
PaginatedOpenDataPropertyListFromJSON,
PaginatedOpenDataPropertyListToJSON,
PaginatedOpenDataStoreListFromJSON,
PaginatedOpenDataStoreListToJSON,
PaginatedOpenDataUnitListFromJSON,
PaginatedOpenDataUnitListToJSON,
PaginatedOpenDataVersionListFromJSON,
PaginatedOpenDataVersionListToJSON,
PaginatedPropertyListFromJSON,
PaginatedPropertyListToJSON,
PaginatedPropertyTypeListFromJSON,
@@ -955,6 +976,11 @@ export interface ApiOpenDataCategoryDestroyRequest {
id: number;
}
export interface ApiOpenDataCategoryListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataCategoryPartialUpdateRequest {
id: number;
patchedOpenDataCategory?: Omit<PatchedOpenDataCategory, 'createdBy'>;
@@ -977,6 +1003,11 @@ export interface ApiOpenDataConversionDestroyRequest {
id: number;
}
export interface ApiOpenDataConversionListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataConversionPartialUpdateRequest {
id: number;
patchedOpenDataConversion?: Omit<PatchedOpenDataConversion, 'createdBy'>;
@@ -1003,6 +1034,16 @@ export interface ApiOpenDataFoodDestroyRequest {
id: number;
}
export interface ApiOpenDataFoodFdcCreateRequest {
id: number;
openDataFood: Omit<OpenDataFood, 'createdBy'>;
}
export interface ApiOpenDataFoodListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataFoodPartialUpdateRequest {
id: number;
patchedOpenDataFood?: Omit<PatchedOpenDataFood, 'createdBy'>;
@@ -1025,6 +1066,11 @@ export interface ApiOpenDataPropertyDestroyRequest {
id: number;
}
export interface ApiOpenDataPropertyListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataPropertyPartialUpdateRequest {
id: number;
patchedOpenDataProperty?: Omit<PatchedOpenDataProperty, 'createdBy'>;
@@ -1047,6 +1093,11 @@ export interface ApiOpenDataStoreDestroyRequest {
id: number;
}
export interface ApiOpenDataStoreListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataStorePartialUpdateRequest {
id: number;
patchedOpenDataStore?: Omit<PatchedOpenDataStore, 'createdBy'>;
@@ -1069,6 +1120,11 @@ export interface ApiOpenDataUnitDestroyRequest {
id: number;
}
export interface ApiOpenDataUnitListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataUnitPartialUpdateRequest {
id: number;
patchedOpenDataUnit?: Omit<PatchedOpenDataUnit, 'createdBy'>;
@@ -1091,6 +1147,11 @@ export interface ApiOpenDataVersionDestroyRequest {
id: number;
}
export interface ApiOpenDataVersionListRequest {
page?: number;
pageSize?: number;
}
export interface ApiOpenDataVersionPartialUpdateRequest {
id: number;
patchedOpenDataVersion?: PatchedOpenDataVersion;
@@ -6324,9 +6385,17 @@ export class ApiApi extends runtime.BaseAPI {
/**
*/
async apiOpenDataCategoryListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataCategory>>> {
async apiOpenDataCategoryListRaw(requestParameters: ApiOpenDataCategoryListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataCategoryList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -6340,13 +6409,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataCategoryFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataCategoryListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataCategoryList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataCategory>> {
const response = await this.apiOpenDataCategoryListRaw(initOverrides);
async apiOpenDataCategoryList(requestParameters: ApiOpenDataCategoryListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataCategoryList> {
const response = await this.apiOpenDataCategoryListRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -6542,9 +6611,17 @@ export class ApiApi extends runtime.BaseAPI {
/**
*/
async apiOpenDataConversionListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataConversion>>> {
async apiOpenDataConversionListRaw(requestParameters: ApiOpenDataConversionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataConversionList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -6558,13 +6635,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataConversionFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataConversionListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataConversionList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataConversion>> {
const response = await this.apiOpenDataConversionListRaw(initOverrides);
async apiOpenDataConversionList(requestParameters: ApiOpenDataConversionListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataConversionList> {
const response = await this.apiOpenDataConversionListRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -6793,12 +6870,67 @@ export class ApiApi extends runtime.BaseAPI {
}
/**
* updates the food with all possible data from the FDC Api if properties with a fdc_id already exist they will be overridden, if existing properties don\'t have a fdc_id they won\'t be changed
*/
async apiOpenDataFoodListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataFood>>> {
async apiOpenDataFoodFdcCreateRaw(requestParameters: ApiOpenDataFoodFdcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenDataFood>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling apiOpenDataFoodFdcCreate().'
);
}
if (requestParameters['openDataFood'] == null) {
throw new runtime.RequiredError(
'openDataFood',
'Required parameter "openDataFood" was null or undefined when calling apiOpenDataFoodFdcCreate().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
}
const response = await this.request({
path: `/api/open-data-food/{id}/fdc/`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: OpenDataFoodToJSON(requestParameters['openDataFood']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => OpenDataFoodFromJSON(jsonValue));
}
/**
* updates the food with all possible data from the FDC Api if properties with a fdc_id already exist they will be overridden, if existing properties don\'t have a fdc_id they won\'t be changed
*/
async apiOpenDataFoodFdcCreate(requestParameters: ApiOpenDataFoodFdcCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenDataFood> {
const response = await this.apiOpenDataFoodFdcCreateRaw(requestParameters, initOverrides);
return await response.value();
}
/**
*/
async apiOpenDataFoodListRaw(requestParameters: ApiOpenDataFoodListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataFoodList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
}
@@ -6810,13 +6942,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataFoodFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataFoodListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataFoodList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataFood>> {
const response = await this.apiOpenDataFoodListRaw(initOverrides);
async apiOpenDataFoodList(requestParameters: ApiOpenDataFoodListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataFoodList> {
const response = await this.apiOpenDataFoodListRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -7012,9 +7144,17 @@ export class ApiApi extends runtime.BaseAPI {
/**
*/
async apiOpenDataPropertyListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataProperty>>> {
async apiOpenDataPropertyListRaw(requestParameters: ApiOpenDataPropertyListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataPropertyList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -7028,13 +7168,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataPropertyFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataPropertyListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataPropertyList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataProperty>> {
const response = await this.apiOpenDataPropertyListRaw(initOverrides);
async apiOpenDataPropertyList(requestParameters: ApiOpenDataPropertyListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataPropertyList> {
const response = await this.apiOpenDataPropertyListRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -7257,9 +7397,17 @@ export class ApiApi extends runtime.BaseAPI {
/**
*/
async apiOpenDataStoreListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataStore>>> {
async apiOpenDataStoreListRaw(requestParameters: ApiOpenDataStoreListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataStoreList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -7273,13 +7421,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataStoreFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataStoreListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataStoreList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataStore>> {
const response = await this.apiOpenDataStoreListRaw(initOverrides);
async apiOpenDataStoreList(requestParameters: ApiOpenDataStoreListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataStoreList> {
const response = await this.apiOpenDataStoreListRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -7475,9 +7623,17 @@ export class ApiApi extends runtime.BaseAPI {
/**
*/
async apiOpenDataUnitListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataUnit>>> {
async apiOpenDataUnitListRaw(requestParameters: ApiOpenDataUnitListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataUnitList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -7491,13 +7647,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataUnitFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataUnitListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataUnitList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataUnit>> {
const response = await this.apiOpenDataUnitListRaw(initOverrides);
async apiOpenDataUnitList(requestParameters: ApiOpenDataUnitListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataUnitList> {
const response = await this.apiOpenDataUnitListRaw(requestParameters, initOverrides);
return await response.value();
}
@@ -7693,9 +7849,17 @@ export class ApiApi extends runtime.BaseAPI {
/**
*/
async apiOpenDataVersionListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OpenDataVersion>>> {
async apiOpenDataVersionListRaw(requestParameters: ApiOpenDataVersionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedOpenDataVersionList>> {
const queryParameters: any = {};
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['page_size'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
@@ -7709,13 +7873,13 @@ export class ApiApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenDataVersionFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedOpenDataVersionListFromJSON(jsonValue));
}
/**
*/
async apiOpenDataVersionList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OpenDataVersion>> {
const response = await this.apiOpenDataVersionListRaw(initOverrides);
async apiOpenDataVersionList(requestParameters: ApiOpenDataVersionListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedOpenDataVersionList> {
const response = await this.apiOpenDataVersionListRaw(requestParameters, initOverrides);
return await response.value();
}

View File

@@ -14,43 +14,47 @@
/**
* * `G` - g
* * `KG` - kg
* * `ML` - ml
* * `L` - l
* * `OUNCE` - ounce
* * `POUND` - pound
* * `FLUID_OUNCE` - fluid_ounce
* * `TSP` - tsp
* * `TBSP` - tbsp
* * `CUP` - cup
* * `PINT` - pint
* * `QUART` - quart
* * `GALLON` - gallon
* * `IMPERIAL_FLUID_OUNCE` - imperial fluid ounce
* * `IMPERIAL_PINT` - imperial pint
* * `IMPERIAL_QUART` - imperial quart
* * `IMPERIAL_GALLON` - imperial gallon
* * `g` - g
* * `kg` - kg
* * `ounce` - ounce
* * `pound` - pound
* * `ml` - ml
* * `l` - l
* * `fluid_ounce` - fluid_ounce
* * `pint` - pint
* * `quart` - quart
* * `gallon` - gallon
* * `tbsp` - tbsp
* * `tsp` - tsp
* * `us_cup` - US Cup
* * `imperial_fluid_ounce` - imperial fluid ounce
* * `imperial_pint` - imperial pint
* * `imperial_quart` - imperial quart
* * `imperial_gallon` - imperial gallon
* * `imperial_tbsp` - imperial tbsp
* * `imperial_tsp` - imperial tsp
* @export
*/
export const BaseUnitEnum = {
G: 'G',
Kg: 'KG',
Ml: 'ML',
L: 'L',
Ounce: 'OUNCE',
Pound: 'POUND',
FluidOunce: 'FLUID_OUNCE',
Tsp: 'TSP',
Tbsp: 'TBSP',
Cup: 'CUP',
Pint: 'PINT',
Quart: 'QUART',
Gallon: 'GALLON',
ImperialFluidOunce: 'IMPERIAL_FLUID_OUNCE',
ImperialPint: 'IMPERIAL_PINT',
ImperialQuart: 'IMPERIAL_QUART',
ImperialGallon: 'IMPERIAL_GALLON'
G: 'g',
Kg: 'kg',
Ounce: 'ounce',
Pound: 'pound',
Ml: 'ml',
L: 'l',
FluidOunce: 'fluid_ounce',
Pint: 'pint',
Quart: 'quart',
Gallon: 'gallon',
Tbsp: 'tbsp',
Tsp: 'tsp',
UsCup: 'us_cup',
ImperialFluidOunce: 'imperial_fluid_ounce',
ImperialPint: 'imperial_pint',
ImperialQuart: 'imperial_quart',
ImperialGallon: 'imperial_gallon',
ImperialTbsp: 'imperial_tbsp',
ImperialTsp: 'imperial_tsp'
} as const;
export type BaseUnitEnum = typeof BaseUnitEnum[keyof typeof BaseUnitEnum];

View File

@@ -164,10 +164,10 @@ export interface OpenDataFood {
propertiesSource?: string;
/**
*
* @type {string}
* @type {number}
* @memberof OpenDataFood
*/
fdcId: string;
fdcId?: number;
/**
*
* @type {string}
@@ -193,7 +193,6 @@ export function instanceOfOpenDataFood(value: object): value is OpenDataFood {
if (!('storeCategory' in value) || value['storeCategory'] === undefined) return false;
if (!('properties' in value) || value['properties'] === undefined) return false;
if (!('propertiesFoodUnit' in value) || value['propertiesFoodUnit'] === undefined) return false;
if (!('fdcId' in value) || value['fdcId'] === undefined) return false;
if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
return true;
}
@@ -222,7 +221,7 @@ export function OpenDataFoodFromJSONTyped(json: any, ignoreDiscriminator: boolea
'propertiesFoodAmount': json['properties_food_amount'] == null ? undefined : json['properties_food_amount'],
'propertiesFoodUnit': OpenDataUnitFromJSON(json['properties_food_unit']),
'propertiesSource': json['properties_source'] == null ? undefined : json['properties_source'],
'fdcId': json['fdc_id'],
'fdcId': json['fdc_id'] == null ? undefined : json['fdc_id'],
'comment': json['comment'] == null ? undefined : json['comment'],
'createdBy': json['created_by'],
};

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataCategory } from './OpenDataCategory';
import {
OpenDataCategoryFromJSON,
OpenDataCategoryFromJSONTyped,
OpenDataCategoryToJSON,
} from './OpenDataCategory';
/**
*
* @export
* @interface PaginatedOpenDataCategoryList
*/
export interface PaginatedOpenDataCategoryList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataCategoryList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataCategoryList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataCategoryList
*/
previous?: string;
/**
*
* @type {Array<OpenDataCategory>}
* @memberof PaginatedOpenDataCategoryList
*/
results: Array<OpenDataCategory>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataCategoryList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataCategoryList interface.
*/
export function instanceOfPaginatedOpenDataCategoryList(value: object): value is PaginatedOpenDataCategoryList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataCategoryListFromJSON(json: any): PaginatedOpenDataCategoryList {
return PaginatedOpenDataCategoryListFromJSONTyped(json, false);
}
export function PaginatedOpenDataCategoryListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataCategoryList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataCategoryFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataCategoryListToJSON(value?: PaginatedOpenDataCategoryList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataCategoryToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataConversion } from './OpenDataConversion';
import {
OpenDataConversionFromJSON,
OpenDataConversionFromJSONTyped,
OpenDataConversionToJSON,
} from './OpenDataConversion';
/**
*
* @export
* @interface PaginatedOpenDataConversionList
*/
export interface PaginatedOpenDataConversionList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataConversionList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataConversionList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataConversionList
*/
previous?: string;
/**
*
* @type {Array<OpenDataConversion>}
* @memberof PaginatedOpenDataConversionList
*/
results: Array<OpenDataConversion>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataConversionList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataConversionList interface.
*/
export function instanceOfPaginatedOpenDataConversionList(value: object): value is PaginatedOpenDataConversionList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataConversionListFromJSON(json: any): PaginatedOpenDataConversionList {
return PaginatedOpenDataConversionListFromJSONTyped(json, false);
}
export function PaginatedOpenDataConversionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataConversionList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataConversionFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataConversionListToJSON(value?: PaginatedOpenDataConversionList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataConversionToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataFood } from './OpenDataFood';
import {
OpenDataFoodFromJSON,
OpenDataFoodFromJSONTyped,
OpenDataFoodToJSON,
} from './OpenDataFood';
/**
*
* @export
* @interface PaginatedOpenDataFoodList
*/
export interface PaginatedOpenDataFoodList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataFoodList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataFoodList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataFoodList
*/
previous?: string;
/**
*
* @type {Array<OpenDataFood>}
* @memberof PaginatedOpenDataFoodList
*/
results: Array<OpenDataFood>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataFoodList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataFoodList interface.
*/
export function instanceOfPaginatedOpenDataFoodList(value: object): value is PaginatedOpenDataFoodList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataFoodListFromJSON(json: any): PaginatedOpenDataFoodList {
return PaginatedOpenDataFoodListFromJSONTyped(json, false);
}
export function PaginatedOpenDataFoodListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataFoodList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataFoodFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataFoodListToJSON(value?: PaginatedOpenDataFoodList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataFoodToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataProperty } from './OpenDataProperty';
import {
OpenDataPropertyFromJSON,
OpenDataPropertyFromJSONTyped,
OpenDataPropertyToJSON,
} from './OpenDataProperty';
/**
*
* @export
* @interface PaginatedOpenDataPropertyList
*/
export interface PaginatedOpenDataPropertyList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataPropertyList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataPropertyList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataPropertyList
*/
previous?: string;
/**
*
* @type {Array<OpenDataProperty>}
* @memberof PaginatedOpenDataPropertyList
*/
results: Array<OpenDataProperty>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataPropertyList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataPropertyList interface.
*/
export function instanceOfPaginatedOpenDataPropertyList(value: object): value is PaginatedOpenDataPropertyList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataPropertyListFromJSON(json: any): PaginatedOpenDataPropertyList {
return PaginatedOpenDataPropertyListFromJSONTyped(json, false);
}
export function PaginatedOpenDataPropertyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataPropertyList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataPropertyFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataPropertyListToJSON(value?: PaginatedOpenDataPropertyList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataPropertyToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataStore } from './OpenDataStore';
import {
OpenDataStoreFromJSON,
OpenDataStoreFromJSONTyped,
OpenDataStoreToJSON,
} from './OpenDataStore';
/**
*
* @export
* @interface PaginatedOpenDataStoreList
*/
export interface PaginatedOpenDataStoreList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataStoreList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataStoreList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataStoreList
*/
previous?: string;
/**
*
* @type {Array<OpenDataStore>}
* @memberof PaginatedOpenDataStoreList
*/
results: Array<OpenDataStore>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataStoreList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataStoreList interface.
*/
export function instanceOfPaginatedOpenDataStoreList(value: object): value is PaginatedOpenDataStoreList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataStoreListFromJSON(json: any): PaginatedOpenDataStoreList {
return PaginatedOpenDataStoreListFromJSONTyped(json, false);
}
export function PaginatedOpenDataStoreListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataStoreList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataStoreFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataStoreListToJSON(value?: PaginatedOpenDataStoreList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataStoreToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataUnit } from './OpenDataUnit';
import {
OpenDataUnitFromJSON,
OpenDataUnitFromJSONTyped,
OpenDataUnitToJSON,
} from './OpenDataUnit';
/**
*
* @export
* @interface PaginatedOpenDataUnitList
*/
export interface PaginatedOpenDataUnitList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataUnitList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataUnitList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataUnitList
*/
previous?: string;
/**
*
* @type {Array<OpenDataUnit>}
* @memberof PaginatedOpenDataUnitList
*/
results: Array<OpenDataUnit>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataUnitList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataUnitList interface.
*/
export function instanceOfPaginatedOpenDataUnitList(value: object): value is PaginatedOpenDataUnitList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataUnitListFromJSON(json: any): PaginatedOpenDataUnitList {
return PaginatedOpenDataUnitListFromJSONTyped(json, false);
}
export function PaginatedOpenDataUnitListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataUnitList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataUnitFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataUnitListToJSON(value?: PaginatedOpenDataUnitList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataUnitToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -0,0 +1,101 @@
/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { OpenDataVersion } from './OpenDataVersion';
import {
OpenDataVersionFromJSON,
OpenDataVersionFromJSONTyped,
OpenDataVersionToJSON,
} from './OpenDataVersion';
/**
*
* @export
* @interface PaginatedOpenDataVersionList
*/
export interface PaginatedOpenDataVersionList {
/**
*
* @type {number}
* @memberof PaginatedOpenDataVersionList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedOpenDataVersionList
*/
next?: string;
/**
*
* @type {string}
* @memberof PaginatedOpenDataVersionList
*/
previous?: string;
/**
*
* @type {Array<OpenDataVersion>}
* @memberof PaginatedOpenDataVersionList
*/
results: Array<OpenDataVersion>;
/**
*
* @type {Date}
* @memberof PaginatedOpenDataVersionList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedOpenDataVersionList interface.
*/
export function instanceOfPaginatedOpenDataVersionList(value: object): value is PaginatedOpenDataVersionList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedOpenDataVersionListFromJSON(json: any): PaginatedOpenDataVersionList {
return PaginatedOpenDataVersionListFromJSONTyped(json, false);
}
export function PaginatedOpenDataVersionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedOpenDataVersionList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(OpenDataVersionFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedOpenDataVersionListToJSON(value?: PaginatedOpenDataVersionList | null): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(OpenDataVersionToJSON)),
'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString()),
};
}

View File

@@ -164,10 +164,10 @@ export interface PatchedOpenDataFood {
propertiesSource?: string;
/**
*
* @type {string}
* @type {number}
* @memberof PatchedOpenDataFood
*/
fdcId?: string;
fdcId?: number;
/**
*
* @type {string}

View File

@@ -62,6 +62,13 @@ export * from './PaginatedInviteLinkList';
export * from './PaginatedKeywordList';
export * from './PaginatedMealPlanList';
export * from './PaginatedMealTypeList';
export * from './PaginatedOpenDataCategoryList';
export * from './PaginatedOpenDataConversionList';
export * from './PaginatedOpenDataFoodList';
export * from './PaginatedOpenDataPropertyList';
export * from './PaginatedOpenDataStoreList';
export * from './PaginatedOpenDataUnitList';
export * from './PaginatedOpenDataVersionList';
export * from './PaginatedPropertyList';
export * from './PaginatedPropertyTypeList';
export * from './PaginatedRecipeBookEntryList';

View File

@@ -0,0 +1,24 @@
<script setup lang="ts">
</script>
<template>
<v-container>
<v-row>
<v-col class="text-center">
<h1>404</h1>
Oops, there is nothing here.
</v-col>
</v-row>
<v-row>
<v-col class="text-center">
<v-btn :to="{name: 'StartPage'}">{{$t('Home')}}</v-btn>
</v-col>
</v-row>
</v-container>
</template>
<style scoped>
</style>

Some files were not shown because too many files have changed in this diff Show More