Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
903a9d8861 | ||
|
|
e2b9f02f55 | ||
|
|
82da1e51db | ||
|
|
0addb3fe6b | ||
|
|
72e614b6e5 | ||
|
|
8abcf0ca4d |
@@ -1,27 +1,3 @@
|
||||
.git
|
||||
.github
|
||||
.dockerignore
|
||||
.gitignore
|
||||
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
htmlcov/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.pytest_cache/
|
||||
.venv
|
||||
venv
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
|
||||
*/node_modules
|
||||
*/dist
|
||||
*/data/db
|
||||
|
||||
52
.github/ISSUE_TEMPLATE/bug-report.yaml
vendored
@@ -1,52 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
description: "submit a bug report for the current release"
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: First Check
|
||||
description: Please confirm and check all the following options.
|
||||
options:
|
||||
- label: This is not a feature request
|
||||
required: true
|
||||
- label: I added a very descriptive title to this issue.
|
||||
required: true
|
||||
- label: I used the GitHub search to find a similar issue and didn't find it.
|
||||
required: true
|
||||
- label: I searched the Mealie documentation, with the integrated search.
|
||||
required: true
|
||||
- label: I already read the docs and didn't find an answer.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: What is the issue you are experiencing?
|
||||
placeholder: A clear and concise description of what the bug is.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: Deployment
|
||||
description: What Deployment system are you using?
|
||||
multiple: true
|
||||
options:
|
||||
- Docker (Linux)
|
||||
- Docker (Windows)
|
||||
- Docker (Synology)
|
||||
- Unraid
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: os-details
|
||||
attributes:
|
||||
label: Deployment Details
|
||||
description: You can add more details about your operating system here, in particular if you chose "Other". If you are experiencing issues with deployment, please provide your docker-compose or docker commands
|
||||
- type: input
|
||||
id: mealie-version
|
||||
attributes:
|
||||
label: Mealie Version
|
||||
validations:
|
||||
required: true
|
||||
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a bug report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
**Steps To Reproduce**
|
||||
Please be specific!
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. etc.
|
||||
|
||||
**Sample Code**
|
||||
<!-- If applicable, please include Sample code to reproduce the issue. -->
|
||||
|
||||
**Expected behavior**
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Actual Behavior**
|
||||
<!-- A clear and concise description of what actually happens. -->
|
||||
|
||||
**Screenshots**
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
**Device Information (please complete the following information):**
|
||||
- OS: [e.g., WSL2 on Win10, Mac]
|
||||
- Deployment: [e.g., Docker-version, docker-compose, Python application]
|
||||
- Browser: [e.g., chrome, safari]
|
||||
- Version: [e.g., 0.2.0-dev]
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context about the problem here. If applicable, please include why you think the bug is occurring and/or troubleshooting you have already performed. -->
|
||||
47
.github/ISSUE_TEMPLATE/v1-bug-report.yaml
vendored
@@ -1,47 +0,0 @@
|
||||
---
|
||||
name: v1.0.0b Bug Report
|
||||
description: "submit a bug report for the v1 beta"
|
||||
title: "[v1.0.0b] - YOUR TITLE"
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: First Check
|
||||
description: Please confirm and check all the following options.
|
||||
options:
|
||||
- label: This is not a feature request
|
||||
required: true
|
||||
- label: I added a very descriptive title to this issue.
|
||||
required: true
|
||||
- label: I used the GitHub search to find a similar issue and didn't find it.
|
||||
required: true
|
||||
- label: I searched the Mealie documentation, with the integrated search.
|
||||
required: true
|
||||
- label: I already read the docs and didn't find an answer.
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: What is the issue you are experiencing?
|
||||
placeholder: A clear and concise description of what the bug is.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: Deployment
|
||||
description: What Deployment system are you using?
|
||||
multiple: true
|
||||
options:
|
||||
- Docker (Linux)
|
||||
- Docker (Windows)
|
||||
- Docker (Synology)
|
||||
- Unraid
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: os-details
|
||||
attributes:
|
||||
label: Deployment Details
|
||||
description: You can add more details about your operating system here, in particular if you chose "Other". If you are experiencing issues with deployment, please provide your docker-compose or docker commands
|
||||
38
.github/ISSUE_TEMPLATE/v1-task.yaml
vendored
@@ -1,38 +0,0 @@
|
||||
---
|
||||
name: v1.0.0b Task
|
||||
description: "CONTRIBUTORS ONLY: Submit a Task that needs to be completed"
|
||||
title: "[v1.0.0b] [Task] - TASK DESCRIPTION"
|
||||
labels:
|
||||
- task
|
||||
- v1
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for your interest in Mealie! 🚀
|
||||
|
||||
This is a place for Mealie contributors to find tasks that need to get done around the repository. Tasks are different than issues as they are generally related to providing a new feature or improve an existing feature. They are _generally_ not related to an issue.
|
||||
|
||||
**DO NOT** create a task unless
|
||||
- You are a contributors who has prior approval via discord/discussions
|
||||
- You have otherwise been given approval to post the tasks
|
||||
|
||||
Otherwise, your post will be closed/deleted.
|
||||
|
||||
**Interested in Taking This?**
|
||||
|
||||
If you're interested in completing this tasks and it hasn't already been taken, comment below and to let others know you're working on it. As you work through the task, I ask that you submit a draft pull request as soon as possible, and tag this issue so we can all collaborate as best as possible.
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: What is the problem this task addresses?
|
||||
placeholder: A clear and concise description of what the problem this task will address.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Proposed/Possible Solution(s)?
|
||||
placeholder: Provide as much context around the idea as possible with potential files and roadblocks that may come up
|
||||
validations:
|
||||
required: true
|
||||
17
.github/stale.yaml
vendored
@@ -1,17 +0,0 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: wontfix
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
7
.github/workflows/build-docs.yml
vendored
@@ -1,7 +1,8 @@
|
||||
name: Publish docs via GitHub Pages
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -9,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout main
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Deploy docs
|
||||
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
||||
|
||||
9
.github/workflows/dockerbuild.release.yml
vendored
@@ -54,12 +54,3 @@ jobs:
|
||||
docker build --push \
|
||||
--tag hkotel/mealie:${{ steps.mealie_version.outputs.tag }} \
|
||||
--platform linux/amd64,linux/arm64 .
|
||||
#
|
||||
# Release Discord Notification
|
||||
#
|
||||
- name: Discord notification
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
|
||||
uses: Ilshidur/action-discord@0.3.2
|
||||
with:
|
||||
args: '🚀 Version {{ EVENT_PAYLOAD.release.tag_name }} of Mealie has been released. See the release notes https://github.com/hay-kot/mealie/releases/tag/{{ EVENT_PAYLOAD.release.tag_name }}'
|
||||
3
.github/workflows/test-all.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
# ----- install & configure poetry -----
|
||||
#----------------------------------------------
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
uses: snok/install-poetry@v1.1.1
|
||||
with:
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
@@ -57,7 +57,6 @@ jobs:
|
||||
#----------------------------------------------
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install libsasl2-dev libldap2-dev libssl-dev
|
||||
poetry install
|
||||
poetry add "psycopg2-binary==2.8.6"
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||
|
||||
8
.gitignore
vendored
@@ -55,7 +55,6 @@ eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
!frontend/src/components/Recipe/Parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
@@ -149,9 +148,4 @@ dev/data/backups/dev_sample_data*.zip
|
||||
!dev/data/backups/test*.zip
|
||||
dev/data/recipes/*
|
||||
dev/scripts/output/app_routes.py
|
||||
dev/scripts/output/javascriptAPI/*
|
||||
mealie/services/scraper/ingredient_nlp/model.crfmodel
|
||||
.gitignore
|
||||
frontend/.nuxt/**
|
||||
frontend/static/sw.js
|
||||
dev/code-generation/generated/*
|
||||
dev/scripts/output/javascriptAPI/*
|
||||
3
.vscode/settings.json
vendored
@@ -15,6 +15,5 @@
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"cSpell.words": ["compression", "hkotel", "performant", "postgres", "webp"],
|
||||
"search.mode": "reuseEditor",
|
||||
"python.linting.flake8Enabled": true,
|
||||
"conventionalCommits.scopes": ["frontend"]
|
||||
"python.linting.flake8Enabled": true
|
||||
}
|
||||
|
||||
53
Caddyfile
@@ -1,34 +1,35 @@
|
||||
{
|
||||
auto_https off
|
||||
admin off
|
||||
admin off
|
||||
}
|
||||
|
||||
:80 {
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
|
||||
@static {
|
||||
file
|
||||
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
|
||||
}
|
||||
@static {
|
||||
file
|
||||
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
|
||||
}
|
||||
|
||||
encode gzip zstd
|
||||
|
||||
|
||||
# Handles Recipe Images / Assets
|
||||
handle_path /api/media/recipes/* {
|
||||
header @static Cache-Control max-age=31536000
|
||||
root * /app/data/recipes/
|
||||
file_server
|
||||
}
|
||||
|
||||
encode gzip zstd
|
||||
handle @proxied {
|
||||
uri strip_suffix /
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
|
||||
# Handles Recipe Images / Assets
|
||||
handle_path /api/media/recipes/* {
|
||||
header @static Cache-Control max-age=31536000
|
||||
root * /app/data/recipes/
|
||||
file_server
|
||||
}
|
||||
|
||||
handle @proxied {
|
||||
uri strip_suffix /
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
|
||||
handle {
|
||||
header @static Cache-Control max-age=31536000
|
||||
root * /app/dist
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
}
|
||||
}
|
||||
handle {
|
||||
header @static Cache-Control max-age=31536000
|
||||
root * /app/dist
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
}
|
||||
}
|
||||
151
Dockerfile
@@ -1,142 +1,59 @@
|
||||
###############################################
|
||||
# Frontend Builder Image
|
||||
###############################################
|
||||
FROM node:lts-alpine as frontend-build
|
||||
# build
|
||||
FROM node:lts-alpine as build-stage
|
||||
WORKDIR /app
|
||||
COPY ./frontend/package*.json ./
|
||||
RUN npm install
|
||||
COPY ./frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
###############################################
|
||||
# Base Image
|
||||
###############################################
|
||||
FROM python:3.9-slim as python-base
|
||||
|
||||
ENV MEALIE_HOME="/app"
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=off \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=on \
|
||||
PIP_DEFAULT_TIMEOUT=100 \
|
||||
POETRY_HOME="/opt/poetry" \
|
||||
POETRY_VIRTUALENVS_IN_PROJECT=true \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
PYSETUP_PATH="/opt/pysetup" \
|
||||
VENV_PATH="/opt/pysetup/.venv"
|
||||
ENV PRODUCTION true
|
||||
ENV POETRY_VERSION 1.1.6
|
||||
|
||||
# prepend poetry and venv to path
|
||||
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
|
||||
|
||||
# create user account
|
||||
RUN useradd -u 911 -U -d $MEALIE_HOME -s /bin/bash abc \
|
||||
&& usermod -G users abc \
|
||||
&& mkdir $MEALIE_HOME
|
||||
|
||||
###############################################
|
||||
# Builder Image
|
||||
###############################################
|
||||
FROM python-base as builder-base
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc g++ \
|
||||
curl \
|
||||
build-essential \
|
||||
gnupg gnupg2 gnupg1 \
|
||||
apt-transport-https \
|
||||
debian-archive-keyring \
|
||||
debian-keyring \
|
||||
libpq-dev \
|
||||
libwebp-dev \
|
||||
# LDAP Dependencies
|
||||
libsasl2-dev libldap2-dev libssl-dev \
|
||||
gnupg gnupg2 gnupg1 \
|
||||
debian-keyring \
|
||||
debian-archive-keyring \
|
||||
apt-transport-https \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add - \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee -a /etc/apt/sources.list.d/caddy-stable.list \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
caddy \
|
||||
&& pip install -U --no-cache-dir pip
|
||||
&& apt autoremove \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get remove -y curl apt-transport-https debian-keyring g++ gnupg gnupg2 gnupg1
|
||||
|
||||
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
|
||||
ENV POETRY_VERSION=1.1.6
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
|
||||
|
||||
# copy project requirement files here to ensure they will be cached.
|
||||
WORKDIR $PYSETUP_PATH
|
||||
COPY ./poetry.lock ./pyproject.toml ./
|
||||
RUN pip install --no-cache-dir "poetry==$POETRY_VERSION"
|
||||
|
||||
# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
|
||||
RUN poetry install -E pgsql --no-dev
|
||||
# project dependencies
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml poetry.lock /app/
|
||||
RUN poetry config virtualenvs.create false
|
||||
RUN poetry install -E pgsql --no-dev --no-interaction --no-ansi
|
||||
|
||||
###############################################
|
||||
# Development Image
|
||||
###############################################
|
||||
FROM python-base as development
|
||||
ENV PRODUCTION=false
|
||||
|
||||
# copying poetry and venv into image
|
||||
COPY --from=builder-base $POETRY_HOME $POETRY_HOME
|
||||
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
|
||||
|
||||
# copy backend
|
||||
COPY ./mealie $MEALIE_HOME/mealie
|
||||
COPY ./poetry.lock ./pyproject.toml $MEALIE_HOME/
|
||||
COPY ./mealie /app/mealie
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install -E pgsql --no-dev
|
||||
|
||||
#! Future
|
||||
# COPY ./alembic ./alembic.ini $MEALIE_HOME/
|
||||
# COPY ./alembic /app
|
||||
# COPY alembic.ini /app
|
||||
COPY ./Caddyfile /app
|
||||
COPY ./dev/data/templates /app/data/templates
|
||||
|
||||
# venv already has runtime deps installed we get a quicker install
|
||||
WORKDIR $MEALIE_HOME
|
||||
RUN . $VENV_PATH/bin/activate && poetry install
|
||||
WORKDIR /
|
||||
# frontend build
|
||||
COPY --from=build-stage /app/dist /app/dist
|
||||
|
||||
RUN chmod +x $MEALIE_HOME/mealie/run.sh
|
||||
ENTRYPOINT $MEALIE_HOME/mealie/run.sh "reload"
|
||||
VOLUME [ "/app/data/" ]
|
||||
|
||||
###############################################
|
||||
# Production Image
|
||||
###############################################
|
||||
FROM python-base as production
|
||||
ENV PRODUCTION=true
|
||||
EXPOSE 80
|
||||
|
||||
# curl for used by healthcheck
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
curl \
|
||||
&& apt-get autoremove \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# copying poetry and venv into image
|
||||
COPY --from=builder-base $POETRY_HOME $POETRY_HOME
|
||||
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
|
||||
|
||||
# copying caddy into image
|
||||
COPY --from=builder-base /usr/bin/caddy /usr/bin/caddy
|
||||
|
||||
# copy backend
|
||||
COPY ./mealie $MEALIE_HOME/mealie
|
||||
COPY ./poetry.lock ./pyproject.toml $MEALIE_HOME/
|
||||
COPY ./gunicorn_conf.py $MEALIE_HOME
|
||||
|
||||
#! Future
|
||||
# COPY ./alembic ./alembic.ini $MEALIE_HOME/
|
||||
|
||||
# venv already has runtime deps installed we get a quicker install
|
||||
WORKDIR $MEALIE_HOME
|
||||
RUN . $VENV_PATH/bin/activate && poetry install -E pgsql --no-dev
|
||||
WORKDIR /
|
||||
|
||||
# copy frontend
|
||||
COPY --from=frontend-build /app/dist $MEALIE_HOME/dist
|
||||
COPY ./dev/data/templates $MEALIE_HOME/data/templates
|
||||
COPY ./Caddyfile $MEALIE_HOME
|
||||
|
||||
VOLUME [ "$MEALIE_HOME/data/" ]
|
||||
ENV APP_PORT=80
|
||||
|
||||
EXPOSE ${APP_PORT}
|
||||
|
||||
HEALTHCHECK CMD curl -fs http://localhost:${APP_PORT} || exit 1
|
||||
|
||||
RUN chmod +x $MEALIE_HOME/mealie/run.sh
|
||||
ENTRYPOINT $MEALIE_HOME/mealie/run.sh
|
||||
CMD /app/mealie/run.sh
|
||||
|
||||
33
Dockerfile.dev
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
|
||||
ENV PRODUCTION false
|
||||
ENV POETRY_VERSION 1.1.6
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc g++ \
|
||||
curl \
|
||||
gnupg gnupg2 gnupg1 \
|
||||
apt-transport-https \
|
||||
debian-archive-keyring \
|
||||
debian-keyring \
|
||||
libwebp-dev \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | apt-key add - \
|
||||
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee -a /etc/apt/sources.list.d/caddy-stable.list \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
&& apt autoremove \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get remove -y curl apt-transport-https debian-keyring g++ gnupg gnupg2 gnupg1
|
||||
|
||||
RUN pip install --no-cache-dir "poetry==$POETRY_VERSION"
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
# Copy poetry.lock* in case it doesn't exist in the repo
|
||||
COPY ./pyproject.toml /app/
|
||||
COPY ./mealie /app/mealie
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install
|
||||
|
||||
RUN chmod +x /app/mealie/run.sh
|
||||
CMD ["/app/mealie/run.sh", "reload"]
|
||||
@@ -6,9 +6,9 @@
|
||||
[![Docker Pulls][docker-pull]][docker-pull]
|
||||
[](https://www.codefactor.io/repository/github/hay-kot/mealie)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/dockerbuild.release.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/test-all.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/pytest.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/dockerbuild.dev.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/test-all.yml)
|
||||
[](https://github.com/hay-kot/mealie/actions/workflows/pytest.yml)
|
||||
|
||||
<!-- PROJECT LOGO -->
|
||||
<br />
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
import json
|
||||
|
||||
import requests
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class GithubIssue(BaseModel):
|
||||
url: str
|
||||
number: int
|
||||
title: str
|
||||
|
||||
|
||||
def get_issues_by_label(label="fixed-pending-release") -> list[GithubIssue]:
|
||||
|
||||
issues_url = f"https://api.github.com/repos/hay-kot/mealie/issues?labels={label}"
|
||||
|
||||
response = requests.get(issues_url)
|
||||
issues = json.loads(response.text)
|
||||
return [GithubIssue(**issue) for issue in issues]
|
||||
|
||||
|
||||
def format_markdown_list(issues: list[GithubIssue]) -> str:
|
||||
return "\n".join(f"- [{issue.number}]({issue.url}) - {issue.title}" for issue in issues)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
issues = get_issues_by_label()
|
||||
print(format_markdown_list(issues))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -8,7 +8,6 @@ class AppRoutes:
|
||||
self.about_events = "/api/about/events"
|
||||
self.about_events_notifications = "/api/about/events/notifications"
|
||||
self.about_events_notifications_test = "/api/about/events/notifications/test"
|
||||
self.about_recipes_defaults = "/api/about/recipes/defaults"
|
||||
self.auth_refresh = "/api/auth/refresh"
|
||||
self.auth_token = "/api/auth/token"
|
||||
self.auth_token_long = "/api/auth/token/long"
|
||||
@@ -32,7 +31,6 @@ class AppRoutes:
|
||||
self.migrations = "/api/migrations"
|
||||
self.recipes_category = "/api/recipes/category"
|
||||
self.recipes_create = "/api/recipes/create"
|
||||
self.recipes_create_from_zip = "/api/recipes/create-from-zip"
|
||||
self.recipes_create_url = "/api/recipes/create-url"
|
||||
self.recipes_summary = "/api/recipes/summary"
|
||||
self.recipes_summary_uncategorized = "/api/recipes/summary/uncategorized"
|
||||
@@ -110,9 +108,6 @@ class AppRoutes:
|
||||
def recipes_recipe_slug_image(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/image"
|
||||
|
||||
def recipes_recipe_slug_zip(self, recipe_slug):
|
||||
return f"{self.prefix}/recipes/{recipe_slug}/zip"
|
||||
|
||||
def recipes_slug_comments(self, slug):
|
||||
return f"{self.prefix}/recipes/{slug}/comments"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Use changeme@email.com/MyPassword as user/password credentials
|
||||
# Use root/example as user/password credentials
|
||||
version: "3.1"
|
||||
services:
|
||||
# Vue Frontend
|
||||
@@ -23,8 +23,7 @@ services:
|
||||
image: mealie-api:dev
|
||||
build:
|
||||
context: ./
|
||||
target: development
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: Dockerfile.dev
|
||||
restart: always
|
||||
ports:
|
||||
- 9921:9000
|
||||
|
||||
@@ -3,7 +3,6 @@ services:
|
||||
mealie:
|
||||
build:
|
||||
context: ./
|
||||
target: production
|
||||
dockerfile: Dockerfile
|
||||
container_name: mealie
|
||||
restart: always
|
||||
@@ -18,9 +17,6 @@ services:
|
||||
POSTGRES_SERVER: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: mealie
|
||||
# WORKERS_PER_CORE: 0.5
|
||||
# MAX_WORKERS: 8
|
||||
# WEB_CONCURRENCY: 2
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB |
BIN
docs/docs/assets/img/ios-shortcut-image.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 43 KiB |
@@ -1,11 +0,0 @@
|
||||
/* Add target="_blank" to external links */
|
||||
/* Source: https://html.com/attributes/a-target/#:~:text=browser */
|
||||
function externalLinks() {
|
||||
for (var c = document.getElementsByTagName("a"), a = 0; a < c.length; a++) {
|
||||
var b = c[a];
|
||||
b.getAttribute("href") &&
|
||||
b.hostname !== location.hostname &&
|
||||
(b.target = "_blank");
|
||||
}
|
||||
}
|
||||
externalLinks();
|
||||
@@ -33,12 +33,6 @@ a.md-button.md-button:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Add icon after external links */
|
||||
/* Ignore auto-generated material theme links */
|
||||
a[target="_blank"]:not([class*="md-"]):after {
|
||||
content: " " url("../svg/open-in-new.svg");
|
||||
}
|
||||
|
||||
/* Site width etc.*/
|
||||
.md-grid {
|
||||
max-width: 64rem !important;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24">
|
||||
<path fill="rgb(229,131,37)" d="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 259 B |
@@ -18,7 +18,7 @@
|
||||
If you have been using the API directly, many of the routes and status codes have changed. You may experience issues with directly consuming the API.
|
||||
|
||||
#### Arm/v7 Support
|
||||
Mealie will no longer build in CI/CD due to a issue with the rust compiler on 32 bit devices. You can reference [this issue on the matrix-org/synapse](https://github.com/matrix-org/synapse/issues/9403) Github page that are facing a similar issue. You may still be able to build the docker image you-self.
|
||||
Mealie will no longer build in CI/CD due to a issue with the rust compiler on 32 bit devices. You can reference [this issue on the matrix-org/synapse](https://github.com/matrix-org/synapse/issues/9403){:target="_blank"} Github page that are facing a similar issue. You may still be able to build the docker image you-self.
|
||||
|
||||
!!! warning "Potential Data Loss"
|
||||
With this release comes a major rework of how files are stored on disk and where things belong. Migration of files should be done automatically. We have tested extensively with many different backups and user bases and have found that no one experienced data-loss. HOWEVER, with all the major changes that have occurred, it is vital that to prevent any data-loss you must create a backup and store that backup outside of your mealie instance. If you do not do this, you may lose your data.
|
||||
@@ -44,7 +44,7 @@
|
||||
### Highlights
|
||||
- Recipe Parser
|
||||
- Recipes can now be imported with a bookmarklet!
|
||||
- Significant improvement in supported sites with the new [Recipe Scraper Library](https://github.com/hhursev/recipe-scrapers)
|
||||
- Significant improvement in supported sites with the new [Recipe Scraper Library](https://github.com/hhursev/recipe-scrapers){:target="_blank"}
|
||||
- UI Debugging now available at `/recipes/debugger`
|
||||
- Better error messages on failure
|
||||
- ⚠️ last_recipe.json is now depreciated
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# v0.5.1
|
||||
# vx.x.x COOL TITLE GOES HERE
|
||||
|
||||
**App Version: v0.5.1**
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
# v0.5.2 - DRAFT
|
||||
|
||||
**App Version: v0.5.2**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
## Bug Fixes
|
||||
- Fixed #617 - Section behavior when adding a step
|
||||
- Fixed #615 - Recipe Settings are not available when creating new recipe
|
||||
- Fixed #625 - API of today's image returns strange characters
|
||||
- Fixed [#590](https://github.com/hay-kot/mealie/issues/590) - Duplicate Events when using Gunicorn Workers
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
### General
|
||||
- Recipe Instructions now collapse when checked
|
||||
- Default recipe settings can be set through ENV variables
|
||||
- Recipe Ingredient lists can now container ingredient sections.
|
||||
- You can now download and upload individual recipes
|
||||
|
||||
|
||||
### Localization
|
||||
|
||||
Huge thanks to [@sephrat](https://github.com/sephrat) for all his work on the project. He's very consistent in his contributions to the project and nearly every release has had some of his code in it! Here's some highlights from this release
|
||||
|
||||
- Lazy Load Translations (Huge Performance Increase!)
|
||||
- Tons of localization additions all around the site.
|
||||
- All of the work that goes into managing and making Crowdin a great feature the application
|
||||
|
||||
#### Here a list of contributors on Crowding who make Mealie possible in different locals
|
||||
|
||||
| Name | Languages | Translated (Words) | Target Words |
|
||||
| ---------------------------- | ------------------ | :----------------: | :----------: |
|
||||
| retmas-gh | Polish | 550 | 625 |
|
||||
| startos | Italian | 310 | 322 |
|
||||
| CMBoii | Spanish | 256 | 291 |
|
||||
| sephrat | French | 255 | 296 |
|
||||
| Daniel Tildeman (tildeman) | Swedish | 233 | 228 |
|
||||
| Rourke | Dutch | 216 | 214 |
|
||||
| Andreas Waschinski (Wascha) | German | 207 | 202 |
|
||||
| wengtad | Chinese Simplified | 176 | 343 |
|
||||
| Matthias Borremans (MrBorri) | Dutch | 96 | 89 |
|
||||
| Adam Syndoman (pypckompsite) | Polish | 68 | 65 |
|
||||
| JonasSchubert | German | 22 | 23 |
|
||||
| ThrawnJL | Danish | 7 | 7 |
|
||||
| NicholasBrody | Dutch | 7 | 7 |
|
||||
| Giel Janssens (gieljnssns) | Dutch | 4 | 4 |
|
||||
| kentora | Danish | 3 | 2 |
|
||||
|
||||
|
||||
|
||||
### Docker
|
||||
|
||||
#### Huge thanks to [@wengtad](https://github.com/wengtad) for all his work on improving the deployment with docker.
|
||||
|
||||
- Optimize Docker Dev Size (Frontend: from ~1.52GB to ~429MB | API: from ~657MB to ~380MB)
|
||||
- Optimize Docker Prod Size (from ~542MB to ~373MB)
|
||||
- Add Gunicorn
|
||||
- Add Gunicorn and Webworkers to Dockerfile #550
|
||||
- Add Docs for Gunicorn
|
||||
- Add PUID/PGID to Docker. Fixes Initialization scripts fail to run when not executing as root user inside container #350,
|
||||
- Not able to run correctly in docker if user permissions are specified #429
|
||||
- Merge Dockerfile.dev into Dockerfile (dev shared same base together with prod)
|
||||
- Add Docs for PUID/PGID
|
||||
- Add Docker healthcheck (for this is not necessary, I could remove if you want)
|
||||
@@ -1,31 +0,0 @@
|
||||
# v0.5.3 - Bug Fixes
|
||||
|
||||
**App Version: v0.5.3**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
!!! error "Breaking Changes"
|
||||
#### None
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
- [755](https://api.github.com/repos/hay-kot/mealie/issues/755) - Mealie Categories Not Displaying Until After Settings Opened
|
||||
- [748](https://api.github.com/repos/hay-kot/mealie/issues/748) - categories - Internal Server Error
|
||||
- [689](https://api.github.com/repos/hay-kot/mealie/issues/689) - Importing a recipe with time information
|
||||
- [671](https://api.github.com/repos/hay-kot/mealie/issues/671) - Localization not loading on upgrade to v0.5.2
|
||||
- [655](https://api.github.com/repos/hay-kot/mealie/issues/655) - Clicking on "tags" on a mobile phone doesn't work (Wrong link, "Internal server error")
|
||||
- [654](https://api.github.com/repos/hay-kot/mealie/issues/654) - Ram Usage
|
||||
- Fixed Missing minus in shopping list UI [688](https://github.com/hay-kot/mealie/pull/688)
|
||||
|
||||
## Features and Improvements
|
||||
|
||||
### General
|
||||
- Recipe Images are no clickable [678](https://github.com/hay-kot/mealie/pull/678)
|
||||
- Additional Translations
|
||||
- Improved Recipe Parser thanks to [@cadamswaite](https://github.com/hay-kot/mealie/pulls?q=is%3Apr+author%3Acadamswaite)
|
||||
- URL Scraper will now choose the best image from the list provided by the site
|
||||
- Fixed the debugger to provide more meaningful data
|
||||
- Fix issues parsing time formats
|
||||
- Added support for parsing scraped nutrition details
|
||||
@@ -1,28 +0,0 @@
|
||||
# v0.5.4 - Bug Fixes
|
||||
|
||||
**App Version: v0.5.4**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
!!! error "Breaking Changes"
|
||||
|
||||
None
|
||||
|
||||
## What's Changed
|
||||
* Add support for new languages by @sephrat in https://github.com/hay-kot/mealie/pull/781
|
||||
* Allow arrow keys to function when SearchDialog is not open by @asymworks in https://github.com/hay-kot/mealie/pull/777
|
||||
* Use firefox user agent when making requests by @cadamswaite in https://github.com/hay-kot/mealie/pull/780
|
||||
* Improve the SWAG Community Guide by @BryceStevenWilley in https://github.com/hay-kot/mealie/pull/793
|
||||
* New Crowdin updates by @hay-kot in https://github.com/hay-kot/mealie/pull/818
|
||||
* Add LDAP authentication support (v2, onto dev) by @dvdkon in https://github.com/hay-kot/mealie/pull/803
|
||||
* Auto backup is now disabled by default. Enable it by setting the AUTO_BACKUP_ENABLED env variable to true.
|
||||
|
||||
|
||||
## New Contributors
|
||||
* @asymworks made their first contribution in https://github.com/hay-kot/mealie/pull/777
|
||||
* @dvdkon made their first contribution in https://github.com/hay-kot/mealie/pull/803
|
||||
|
||||
**Full Changelog**: https://github.com/hay-kot/mealie/compare/v0.5.3...v0.5.4
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# v0.5.5 - Bug Fixes
|
||||
|
||||
**App Version: v0.5.5**
|
||||
|
||||
**Database Version: v0.5.0**
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
!!! error "Breaking Changes"
|
||||
|
||||
None
|
||||
|
||||
## What's Changed
|
||||
* Allow schema to give images as dict by @cadamswaite in https://github.com/hay-kot/mealie/pull/859
|
||||
* New Crowdin updates by @hay-kot in https://github.com/hay-kot/mealie/pull/854
|
||||
* White background favicons-2 by @cadamswaite in https://github.com/hay-kot/mealie/pull/860
|
||||
* Add support for fr-CA language by @sephrat in https://github.com/hay-kot/mealie/pull/865
|
||||
* New Crowdin updates by @hay-kot in https://github.com/hay-kot/mealie/pull/886
|
||||
* Adjusts the image view from height to min-height by @MidnightRising in https://github.com/hay-kot/mealie/pull/908
|
||||
* Trims URL when importing a recipe by @MidnightRising in https://github.com/hay-kot/mealie/pull/909
|
||||
* New Crowdin updates by @hay-kot in https://github.com/hay-kot/mealie/pull/930
|
||||
* remove leading and trailing whitespaces from bulk add entries by @StevenMassaro in https://github.com/hay-kot/mealie/pull/921
|
||||
* add a line to the docs that clarifies that the run.sh file must have LF line endings by @StevenMassaro in https://github.com/hay-kot/mealie/pull/922
|
||||
* Fix version number for 0.5.4 by @fleaz in https://github.com/hay-kot/mealie/pull/957
|
||||
* Bump versions (properly) @hay-kot
|
||||
|
||||
## New Contributors
|
||||
* @StevenMassaro made their first contribution in https://github.com/hay-kot/mealie/pull/921
|
||||
* @fleaz made their first contribution in https://github.com/hay-kot/mealie/pull/957
|
||||
|
||||
**Full Changelog**: https://github.com/hay-kot/mealie/compare/v0.5.4...v0.5.5
|
||||
@@ -1,12 +1,12 @@
|
||||
# Contributing to Mealie
|
||||
|
||||
[Please Join the Discord](https://discord.gg/QuStdQGSGK). We are building a community of developers working on the project.
|
||||
[Please Join the Discord](https://discord.gg/QuStdQGSGK){:target="_blank"}. We are building a community of developers working on the project.
|
||||
|
||||
## We Develop with Github
|
||||
We use github to host code, to track issues and feature requests, as well as accept pull requests.
|
||||
|
||||
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
|
||||
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
|
||||
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html){:target="_blank"}, So All Code Changes Happen Through Pull Requests
|
||||
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html){:target="_blank"}). We actively welcome your pull requests:
|
||||
|
||||
1. Fork the repo and create your branch from `dev`.
|
||||
2. Checkout the Discord, the PRs page, or the Projects page to get an idea of what's already being worked on.
|
||||
@@ -17,10 +17,10 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu
|
||||
7. If you make changes to the dev branch reflect those changes in the active changelog to keep track of changes. Don't forget to add your name/handle/identifier!
|
||||
|
||||
## Any contributions you make will be under the MIT Software License
|
||||
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
|
||||
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/){:target="_blank"} that covers the project. Feel free to contact the maintainers if that's a concern.
|
||||
|
||||
## Report bugs using Github's [issues](https://github.com/hay-kot/mealie/issues)
|
||||
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/hay-kot/mealie/issues/new); it's that easy!
|
||||
## Report bugs using Github's [issues](https://github.com/hay-kot/mealie/issues){:target="_blank"}
|
||||
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/hay-kot/mealie/issues/new){:target="_blank"}; it's that easy!
|
||||
|
||||
## Write bug reports with detail, background, and sample code
|
||||
**Great Bug Reports** tend to have:
|
||||
@@ -28,7 +28,7 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new issue]
|
||||
- A quick summary and/or background
|
||||
- Steps to reproduce
|
||||
- Be specific!
|
||||
- Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626) includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing
|
||||
- Give sample code if you can. [This stackoverflow question](http://stackoverflow.com/q/12488905/180626){:target="_blank"} includes sample code that *anyone* with a base R setup can run to reproduce what I was seeing
|
||||
- What you expected would happen
|
||||
- What actually happens
|
||||
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
|
||||
@@ -40,4 +40,4 @@ People *love* thorough bug reports. I'm not even kidding.
|
||||
By contributing, you agree that your contributions will be licensed under its MIT License.
|
||||
|
||||
## References
|
||||
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
|
||||
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md){:target="_blank"}
|
||||
|
||||
@@ -10,8 +10,6 @@ Prerequisites
|
||||
|
||||
You can easily start the development stack by running `make docker-dev` in the root of the project directory. This will run and build the docker-compose.dev.yml file.
|
||||
|
||||
On Windows, the `mealie/run.sh` file must have LF line endings, or the mealie-api container will fail to start with the error: `/app/mealie/run.sh: not found`.
|
||||
|
||||
## Without Docker
|
||||
Prerequisites
|
||||
|
||||
@@ -50,4 +48,4 @@ code-gen 🤖 Run Code-Gen Scripts
|
||||
|
||||
Before you commit any changes on the backend/python side you'll want to run `make format` to format all the code with black. `make lint` to check with flake8, and `make test` to run pytests. You can also use `make test-all` to run both `lint` and `test`.
|
||||
|
||||
Run into another issue? [Ask for help on discord](https://discord.gg/QuStdQGSGK)
|
||||
Run into another issue? [Ask for help on discord](https://discord.gg/QuStdQGSGK){:target="_blank"}
|
||||
@@ -9,7 +9,7 @@ We love your input! We want to make contributing to this project as easy and tra
|
||||
- Becoming a maintainer
|
||||
- Help translate to a new language or improve current translations
|
||||
|
||||
[Remember to join the Discord and stay in touch with other developers working on the project](https://discord.gg/QuStdQGSGK)!
|
||||
[Remember to join the Discord and stay in touch with other developers working on the project](https://discord.gg/QuStdQGSGK){:target="_blank"}!
|
||||
|
||||
Additionally, you can buy me a coffee and support the project. When I get financial support it helps me know that there's real interest in the project and that it's worth the time to keep developing.
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Contributing with Translations
|
||||
Translations can be a great way **for non-coders** to contribute to project.
|
||||
We use **[Crowdin](https://crowdin.com/project/mealie)** to allow several contributors to work on translating Mealie.
|
||||
We use **[Crowdin](https://crowdin.com/project/mealie){:target="_blank"}** to allow several contributors to work on translating Mealie.
|
||||
You can simply help by voting for your preferred translations, or even by completely translating Mealie into a new language.
|
||||
|
||||
Translations are regularly pulled from Crowdin and included in each new release.
|
||||
|
||||
Please use Crowdin as much as possible if you have any question/issue regarding a particular string. You can take a look at [Crowdin Knowledge base](https://support.crowdin.com/for-volunteer-translators/) if you want to know more about how to use this tool.
|
||||
Please use Crowdin as much as possible if you have any question/issue regarding a particular string. You can take a look at [Crowdin Knowledge base](https://support.crowdin.com/for-volunteer-translators/){:target="_blank"} if you want to know more about how to use this tool.
|
||||
|
||||
## My language is missing in Mealie
|
||||
Once your language is translated on Crowdin, we need to manually add it in Mealie. If you believe your language is ready for use, please create an issue on GitHub.
|
||||
@@ -13,9 +13,9 @@ Once your language is translated on Crowdin, we need to manually add it in Meali
|
||||
## I can't find a particular text in Crowdin
|
||||
There can be several reasons:
|
||||
- The text you're looking for is outdated: someone has already changed it or it will be removed/changed in the next release.
|
||||
- It is possible some texts are not translatable (yet) for technical reasons. If you spot one, please reach out to us on [Discord](https://discord.gg/QuStdQGSGK) or raise an issue on GitHub.
|
||||
- It is possible some texts are not translatable (yet) for technical reasons. If you spot one, please reach out to us on [Discord](https://discord.gg/QuStdQGSGK){:target="_blank"} or raise an issue on GitHub.
|
||||
|
||||
## Technical information
|
||||
We use vue-i18n package for internationalization. Translations are stored in json format located in [frontend/src/locales/messages](https://github.com/hay-kot/mealie/tree/master/frontend/src/locales/messages).
|
||||
We use vue-i18n package for internationalization. Translations are stored in json format located in [frontend/src/locales/messages](https://github.com/hay-kot/mealie/tree/master/frontend/src/locales/messages){:target="_blank"}.
|
||||
|
||||
[i18n Ally for VScode](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) is helpful for generating new strings to translate. It also has a nice feature, which shows translations in-place when editing code.
|
||||
[i18n Ally for VScode](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally){:target="_blank"} is helpful for generating new strings to translate. It also has a nice feature, which shows translations in-place when editing code.
|
||||
@@ -3,7 +3,7 @@
|
||||
All recipe data can be imported and exported as necessary from the UI. Under the admin page you'll find the section for using Backups and Exports.
|
||||
|
||||
!!! danger
|
||||
As this is still a **BETA** it is recommended that you backup your data often and store in more than one place. Adhere to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup). Prior to upgrading you **should** perform a backup to limit any data loss.
|
||||
As this is still a **BETA** It is recommended that you backup your data often and store in more than one place. Ad-hear to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup){:target="_blank"}. Prior to upgrading you **should** perform a backup to limit any data loss.
|
||||
|
||||
!!! tip "Mealie data that is saved on backups"
|
||||
- [x] Recipe Data
|
||||
@@ -15,7 +15,7 @@ All recipe data can be imported and exported as necessary from the UI. Under the
|
||||
|
||||
To create an export simply add the tag and the markdown template and click "Create" and your backup will be created on the server. The backup is a standard zipfile containing all the images, json files, and rendered jinaj2 templates for each recipe. To view the available variables, open a recipe in the json editor.
|
||||
|
||||
To import a backup it must be in your backups folder. If it is in the backup folder it will automatically show up as a source to restore from. Selected the desired backup and import the backup file. Backups can be uploaded from the UI as well as added on the file system.
|
||||
To import a backup it must be in your backups folder. If it is in the backup folder it will automatically show up as a source to restore from. Selected the desired backup and import the backup file. Backups can be uploaded from the UI as well as added on the file system
|
||||
|
||||
## Demo
|
||||
|
||||
@@ -60,7 +60,7 @@ wget http://localhost:9000/api/utils/download?token={fileToken}
|
||||
|
||||
|
||||
## Jinja2 Templating
|
||||
On export you can select a template to use to render files using the jinja2 syntax. This can be done to export recipes in other formats besides regular .json. Look at this example for rendering a markdown recipe using the jinja2 syntax.
|
||||
On export you can select a template to use to render files using the jinja2 syntax. This can be done to export recipes in other formats besides regular .json.Look at this example for rendering a markdown recipe using the jinja2 syntax.
|
||||
|
||||
### Input
|
||||
```jinja2
|
||||
@@ -128,4 +128,4 @@ Categories: []
|
||||
Original URL: https://www.bonappetit.com/recipe/five-spice-popcorn-chicken#intcid=_bon-appetit-recipe-bottom-recirc_3cad5ce9-734a-46f8-b503-78c33d2e7279_similar2-3
|
||||
```
|
||||
|
||||
If you decide you don't like mealie: This is a good way to export into a format that can be imported into another.
|
||||
If you decide you don't like mealie. This is a good way to export into a format that can be imported into another.
|
||||
@@ -1,13 +1,13 @@
|
||||
# Building Pages
|
||||
|
||||
!!! warning
|
||||
The page building is still experimental and may change. You can provide feedback on any changes you'd like to see on [github](https://github.com/hay-kot/mealie/discussions/229)
|
||||
The page building is still experimental and may change. You can provide feedback on any changes you'd like to see on [github](https://github.com/hay-kot/mealie/discussions/229){:target="_blank"}
|
||||
|
||||
Custom pages can be created to organize multiple categories into a single page. Links to your custom pages are displayed on the home page sidebar and accessible by all users, however only Administrators can create or update pages.
|
||||

|
||||
|
||||
To create a new page navigate to the settings page at `/admin/settings` and scroll down to the custom pages section. Here you can create, view, and edit your custom pages. To reorder how they are displayed on the sidebar you can drag and drop the pages into the preferred order.
|
||||
To create a new page. Navigate to the settings page at `/admin/settings` and scroll down to the custom pages section. Here you can create, view, and edit your custom pages. To reorder how they are displayed on the sidebar you can drag and drop the pages into the preferred order.
|
||||

|
||||
|
||||
!!! tip
|
||||
To save the order of pages you must click the save button displayed on the bottom of the Custom Page section. This is not necessary for updating individual page data.
|
||||
To save the order of pages you must click the save button displayed on the bottom of the Custom Page section. This is not necessary for updating individual page data.
|
||||
@@ -8,7 +8,7 @@ To migrate recipes from a Chowdown
|
||||
3. Select import on the newly available migration.
|
||||
|
||||
## Nextcloud Recipes
|
||||
Nextcloud recipes can be imported from a zip file that contains the data stored in Nextcloud. The zip file can be uploaded from the frontend or placed in the data/migrations/nextcloud directory. See the example folder structure below to ensure your recipes are able to be imported.
|
||||
Nextcloud recipes can be imported from a zip file the contains the data stored in Nextcloud. The zip file can be uploaded from the frontend or placed in the data/migrations/nextcloud directory. See the example folder structure below to ensure your recipes are able to be imported.
|
||||
|
||||
```
|
||||
nextcloud_recipes.zip
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Site Settings
|
||||
Your sites settings panel can only be accessed by administrators. This is where you can customize your site for all users.
|
||||
Your sites settings panel can only be accessed by administrators. This where you can customize your site for all users.
|
||||
|
||||
## Home Page Settings
|
||||
| Option | Description |
|
||||
@@ -13,3 +13,7 @@ Your sites settings panel can only be accessed by administrators. This is where
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# User Management
|
||||
# User Managemenet
|
||||
|
||||
As of version v0.4.0 users have limited functionality, but they will offer more permissions and structure as time goes on. To understand the different systems, see each section below. Note, that by default all users will be assigned the default group. If you're only managing one household you won't need to do anything to set up a new group.
|
||||
|
||||
@@ -47,7 +47,7 @@ As of version v0.4.0 users have limited functionality, but they will offer more
|
||||
On the first startup you'll need to login to Mealie using the default username and password `changeme@email.com` and `MyPassword` or the default set through the env variable. On first login you'll be required to reset your password. After resetting your password you should also change your email address as appropriate. This will be used for logins on all future requests.
|
||||
|
||||
!!! tip
|
||||
Your default password environment variable will be the default password for all new users that are created. This is stored in plain text and should not be used **anywhere** else.
|
||||
Your default password environmental variable will be the default password for all new users that are created. This is stored in plain text and should not be used **any where** else.
|
||||
|
||||
|
||||
## Creating and Editing Users
|
||||
@@ -80,7 +80,7 @@ You can easily create and manage groups via the frontend in the admin panel unde
|
||||

|
||||
|
||||
!!! tip
|
||||
User Groups can only be deleted if no users are a part of the group. If you want to delete a group, you must assign the users to another group before removing.
|
||||
User Groups can only be deleted if no users are apart of the group. If you want to delete a group, you must assign the users to another group before removing.
|
||||
|
||||
## Password Reset
|
||||
If a user forgets their password an administrator is able to reset their password through the user management page. In the user table, select edit. In the popup window click the "Reset Password" to reset a user's password to the default. This is either 'MyPassword' or set through an environment variable. See the [Installation Page](../getting-started/install.md) for more details on environment variables.
|
||||
If a user forgets their password an administrator is able to reset their password through the user management page. In the user table, select edit. In the popup windows click the "Reset Password" to reset a user's password to the default. This is either 'MyPassword' or set through an environment variable. See the [Installation Page](../getting-started/install.md) for more details on environmental variables
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
|
||||
|
||||
In a lot of ways, Home Assistant is why this project exists! Since Mealie has a robust API it makes it a great fit for interacting with Home Assistant and pulling information into your dashboard.
|
||||
In a lot of ways, Home Assistant is why this project exists! Since it Mealie has a robust API it makes it a great fit for interacting with Home Assistant and pulling information into your dashboard.
|
||||
|
||||
### Get Todays Meal in Lovelace
|
||||
Starting in v0.4.1 you are now able to use the uri `/api/meal-plans/today/image?group_name=Home` to directly access the image to todays meal. This makes it incredibly easy to include the image into your Home Assistant Dashboard using the picture entity.
|
||||
Starting in v0.4.1 you are now able to use the uri `/api/meal-plans/today/image?group_name=Home` to directly access the image to todays meal. This makes it incredible easy to include the image into your Home Assistant Dashboard using the picture entity.
|
||||
|
||||
Here's an example where `sensor.mealie_todays_meal` is pulling in the meal-plan name and I'm using the url to get the image.
|
||||
|
||||
@@ -29,19 +29,6 @@ style:
|
||||
}
|
||||
```
|
||||
|
||||
The sensor that gets the name of the meal can be achieved using the following REST sensor in Home Assistant
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: rest
|
||||
resource: 'http://localhost:9000/api/meal-plans/today'
|
||||
method: GET
|
||||
name: Mealie todays meal
|
||||
headers:
|
||||
Authorization: Bearer MySuperSecretBearerCode
|
||||
value_template: "{{ value_json.name }}"
|
||||
```
|
||||
The Bearer token can be created from the User Settings page (https://hay-kot.github.io/mealie/documentation/users-groups/user-settings/#api-key-generation)
|
||||
|
||||
|
||||
!!! tip
|
||||
Due to how Home Assistant works with images, I had to include the additional styling to get the images to not appear distorted. This includes and [additional installation](https://github.com/thomasloven/lovelace-card-mod) from HACS.
|
||||
Due to how Home Assistant works with images, I had to include the additional styling to get the images to not appear distorted. This includes and [additional installation](https://github.com/thomasloven/lovelace-card-mod){:target="_blank"} from HACS.
|
||||
|
||||
@@ -1,22 +1,40 @@
|
||||
# Using iOS Shortcuts with Mealie
|
||||

|
||||
|
||||
!!! info
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
|
||||
|
||||
User [brasilikum](https://github.com/brasilikum) opened an issue on the main repo about how they had created an [iOS shortcut](https://github.com/hay-kot/mealie/issues/103) for interested users. This is a useful utility for iOS users who browse for recipes in their web browser from their devices. Recent updates to Mealie has made this original shortcut break. Reddit user [BooNooBooNooB](https://www.reddit.com/user/BooNooBooNooB/) has helped to create a new working version.
|
||||
{: align=right style="height:400px;width:400px"}
|
||||
|
||||
|
||||
User [brasilikum](https://github.com/brasilikum){:target="_blank"} opened an issue on the main repo about how they had created an [iOS shortcut](https://github.com/hay-kot/mealie/issues/103){:target="_blank"} for interested users. This is a useful utility for iOS users who browse for recipes in their web browser from their devices.
|
||||
|
||||
Don't know what an iOS shortcut is? Neither did I! Experienced iOS users may already be familiar with this utility but for the uninitiated, here is the official Apple explanation:
|
||||
|
||||
|
||||
> A shortcut is a quick way to get one or more tasks done with your apps. The Shortcuts app lets you create your own shortcuts with multiple steps. For example, build a “Surf Time” shortcut that grabs the surf report, gives an ETA to the beach, and launches your surf music playlist.
|
||||
>
|
||||
|
||||
Basically it is a visual scripting language that lets a user build an automation in a guided fashion. The automation can be [shared with anyone](https://www.icloud.com/shortcuts/9d8827cabde44b379e673a60f27fe4bb) but if it is a user creation, you'll have to jump through a few hoops to make an untrusted automation work on your device.
|
||||
|
||||
You need to replace `username` and `password` with the login information for your mealie instance.
|
||||
Basically it is a visual scripting language that lets a user build an automation in a guided fashion. The automation can be [shared with anyone](https://www.icloud.com/shortcuts/6ae356d5fc644cfa8983a3c90f242fbb){:target="_blank"} but if it is a user creation, you'll have to jump through a few hoops to make an untrusted automation work on your device. In brasilikum's shortcut, you need to make changes for it to work. Recent updates to the project have changed some of the syntax and folder structure since its original creation.
|
||||
|
||||

|
||||
|
||||
Then, you need to put in your mealie domain. The API port of `:9000` is not needed when putting your domain in the text field.
|
||||
{: align=right style="height:500;width:400px"}
|
||||
|
||||

|
||||
|
||||
You should now be able to share a website to the shortcut and have mealie grab all the necessary information!
|
||||
|
||||
!!! tip
|
||||
You may need to change the url depending on which version you're using. Recipe is now plural and there is no trailing "/" at the end of the string.
|
||||
|
||||
```
|
||||
api/recipe/create-url/
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```
|
||||
api/recipes/create-url
|
||||
```
|
||||
|
||||
|
||||
|
||||
Having made those changes, you should now be able to share a website to the shortcut and have mealie grab all the necessary information!
|
||||
@@ -4,96 +4,89 @@
|
||||
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
|
||||
|
||||
|
||||
To make the setup of a Reverse Proxy much easier, Linuxserver.io developed [SWAG](https://github.com/linuxserver/docker-swag)
|
||||
SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx web server and reverse proxy with PHP support and a built-in certbot client that automates free TLS server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.
|
||||
|
||||
To make the setup of a Reverse Proxy much easier, Linuxserver.io developed [SWAG](https://github.com/linuxserver/docker-swag){:target="_blank"}
|
||||
SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx web server and reverse proxy with PHP support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.
|
||||
|
||||
## Step 1: Get a domain
|
||||
|
||||
The first step is to grab a dynamic DNS if you don't have your own subdomain already. You can get this from for example [DuckDNS](https://www.duckdns.org).
|
||||
If you already own a domain, you'll need to create an `A` record that points to the machine that SWAG is running on. See
|
||||
the [SWAG documentation](https://docs.linuxserver.io/general/swag#create-container-via-http-validation) for more details.
|
||||
The first step is to grab a dynamic DNS if you don't have your own subdomain already. You can get this from for example [DuckDNS](https://www.duckdns.org){:target="_blank"}.
|
||||
|
||||
## Step 2: Set-up SWAG
|
||||
|
||||
Then you will need to set up SWAG, the variables of the docker-compose are explained on the Github page of [SWAG](https://github.com/linuxserver/docker-swag).
|
||||
This is an example of how to set it up using DuckDNS and docker-compose.
|
||||
Then you will need to set up SWAG, the variables of the docker-compose are explained on the Github page of [SWAG](https://github.com/linuxserver/docker-swag){:target="_blank"}.
|
||||
This is an example of how to set it up using duckdns and docker-compose.
|
||||
|
||||
!!! example "docker-compose.yml"
|
||||
```yaml
|
||||
version: "2.1"
|
||||
services:
|
||||
swag:
|
||||
image: ghcr.io/linuxserver/swag
|
||||
container_name: swag
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
# valid TZs at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
- TZ=Europe/Brussels
|
||||
- URL=<mydomain.duckdns>
|
||||
- SUBDOMAINS=wildcard
|
||||
- VALIDATION=duckdns
|
||||
- CERTPROVIDER= #optional
|
||||
- DNSPLUGIN= #optional
|
||||
- DUCKDNSTOKEN=<duckdnstoken>
|
||||
- EMAIL=<e-mail> #optional
|
||||
- ONLY_SUBDOMAINS=false #optional
|
||||
- EXTRA_DOMAINS=<extradomains> #optional
|
||||
- STAGING=false #optional
|
||||
volumes:
|
||||
- /etc/config/swag:/config
|
||||
ports:
|
||||
- 443:443
|
||||
# required if VALIDATION=http above, if you aren't using DuckDNS
|
||||
- 80:80
|
||||
restart: unless-stopped
|
||||
swag:
|
||||
image: ghcr.io/linuxserver/swag
|
||||
container_name: swag
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/Brussels
|
||||
- URL=<mydomain.duckdns>
|
||||
- SUBDOMAINS=wildcard
|
||||
- VALIDATION=duckdns
|
||||
- CERTPROVIDER= #optional
|
||||
- DNSPLUGIN= #optional
|
||||
- DUCKDNSTOKEN=<duckdnstoken>
|
||||
- EMAIL=<e-mail> #optional
|
||||
- ONLY_SUBDOMAINS=false #optional
|
||||
- EXTRA_DOMAINS=<extradomains> #optional
|
||||
- STAGING=false #optional
|
||||
volumes:
|
||||
- /etc/config/swag:/config
|
||||
ports:
|
||||
- 443:443
|
||||
restart: unless-stopped
|
||||
|
||||
```
|
||||
|
||||
Don't forget to change the `mydomain.duckns` into your personal domain and the `duckdnstoken` into your token and remove the brackets.
|
||||
|
||||
You can also include the contents of the [mealie docker-compose](mealie/documentation/getting-started/install/#docker-compose-with-sqlite) in the SWAG
|
||||
docker-compose, without the `ports` section under mealie. This allows SWAG and mealie to communicate on the same docker network, without
|
||||
making mealie visible to other applications on your machine.
|
||||
Don't forget to change the <code>mydomain.duckns</code> into your personal domain and the <code>duckdnstoken</code> into your token and remove the brackets.
|
||||
|
||||
## Step 3: Change the config files
|
||||
|
||||
Navigate to the config folder of SWAG and head to `proxy-confs`. If you used the example above, you should navigate to: `/etc/config/swag/nginx/proxy-confs/`.
|
||||
There are a lot of preconfigured files to use for different apps such as radarr, sonarr, overseerr, ...
|
||||
Navigate to the config folder of SWAG and head to <code>proxy-confs</code>. If you used the example above, you should navigate to: <code>/etc/config/swag/nginx/proxy-confs/</code>.
|
||||
There are a lot of preconfigured files to use for different apps such as radarr,sonarr,overseerr,...
|
||||
|
||||
To use the bundled configuration file, simply rename `mealie.subdomain.conf.sample` in the proxy-confs folder to `mealie.subdomain.conf`.
|
||||
Alternatively, you can create a new file `mealie.subdomain.conf` in proxy-confs with the following configuration:
|
||||
To use the bundled configuration file, simply rename <code>mealie.subdomain.conf.sample</code> in the proxy-confs folder to <code>mealie.subdomain.conf</code>.
|
||||
Alternatively, you can create a new file <code>mealie.subdomain.conf</code> in proxy-confs with the following configuration:
|
||||
|
||||
!!! example "mealie.subdomain.conf"
|
||||
```nginx
|
||||
server {
|
||||
```yaml
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name mealie.*;
|
||||
server_name mealie.*;
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
include /config/nginx/ssl.conf;
|
||||
|
||||
client_max_body_size 0;
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app mealie;
|
||||
set $upstream_port 80;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
}
|
||||
}
|
||||
location / {
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app mealie;
|
||||
set $upstream_port 80;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Step 4: Port-forward port 443
|
||||
|
||||
Since SWAG allows you to set up a secure connection, you will need to open port 443 on your router for encrypted traffic. This is way more secure than port 80 for http. For more information about using TLS on port 443, see [SWAG's documentation](https://docs.linuxserver.io/general/swag#cert-provider-lets-encrypt-vs-zerossl) on cert providers and port forwarding.
|
||||
Since SWAG allows you to set up a secure connection, you will need to open port 443 on your router for encrypted traffic. This is way more secure than port 80 for http.
|
||||
|
||||
## Step 5: Restart SWAG
|
||||
|
||||
When you change anything in the config of Nginx, you will need to restart the container using `docker restart swag`.
|
||||
If everything went well, you can now access mealie on the subdomain you configured: `mealie.mydomain.duckdns.org`
|
||||
When you change anything in the config of Nginx, you will need to restart the container using <code>docker restart swag</code>.
|
||||
If everything went well, you can now access mealie on the subdomain you configured: mealie.mydomain.duckdns.org
|
||||
|
||||
@@ -8,7 +8,7 @@ Mealie supports long-live api tokens in the user frontend. See [user settings pa
|
||||
## Key Components
|
||||
|
||||
### Exploring Your Local API
|
||||
On your local installation you can access interactive API documentation that provides `curl` examples and expected results. This allows you to easily test and interact with your API to identify places to include your own functionality. You can visit the documentation at `http://mealie.yourdomain.com/docs` or see the example at the [Demo Site](https://mealie-demo.hay-kot.dev/docs)
|
||||
On your local installation you can access interactive API documentation that provides `curl` examples and expected results. This allows you to easily test and interact with your API to identify places to include your own functionality. You can visit the documentation at `http://mealie.yourdomain.com/docs` or see the example at the [Demo Site](https://mealie-demo.hay-kot.dev/docs){:target="_blank"}
|
||||
|
||||
### Recipe Extras
|
||||
Recipes extras are a key feature of the Mealie API. They allow you to create custom json key/value pairs within a recipe to reference from 3rd part applications. You can use these keys to contain information to trigger automation or custom messages to relay to your desired device.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# Installation
|
||||
To deploy mealie on your local network it is highly recommended to use docker to deploy the image straight from dockerhub. Using the docker-compose below you should be able to get a stack up and running easily by changing a few default values and deploying. You can deploy with either SQLite (default) or Postgres. SQLite is sufficient for most use cases. Additionally, with mealies automated backup and restore functionality, you can easily move between SQLite and Postgres as you wish.
|
||||
|
||||
To deploy mealie on your local network it is highly recommended to use docker to deploy the image straight from dockerhub. Using the docker-compose below you should be able to get a stack up and running easily by changing a few default values and deploying. You can deploy with either SQLite (default) or Postgres. SQLite is sufficient for most use cases. Additionally, with mealies automated backup and restore functionality, you can easily move between SQLite and Postgres as you wish.
|
||||
|
||||
[Get Docker](https://docs.docker.com/get-docker/)
|
||||
[Get Docker](https://docs.docker.com/get-docker/){:target="_blank"}
|
||||
|
||||
[Mealie on Dockerhub](https://hub.docker.com/r/hkotel/mealie)
|
||||
[Mealie on Dockerhub](https://hub.docker.com/r/hkotel/mealie){:target="_blank"}
|
||||
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
## Quick Start - Docker CLI
|
||||
|
||||
Deployment with the Docker CLI can be done with `docker run` and specify the database type, in this case `sqlite`, setting the exposed port `9925`, mounting the current directory, and pull the latest image. After the image is up and running you can navigate to http://your.ip.address:9925 and you'll should see mealie up and running!
|
||||
Deployment with the Docker CLI can be done with `docker run` and specify the database type, in this case `sqlite`, setting the exposed port `9925`, mounting the current directory, and pull the latest image. After the image is up an running you can navigate to http://your.ip.addres:9925 and you'll should see mealie up and running!
|
||||
|
||||
```shell
|
||||
docker run \
|
||||
@@ -22,14 +22,12 @@ docker run \
|
||||
```
|
||||
|
||||
!!! tip "Default Credentials"
|
||||
|
||||
**Username:** changeme@email.com
|
||||
**Username:** changeme@email.com
|
||||
|
||||
**Password:** MyPassword
|
||||
|
||||
## Docker Compose with SQLite
|
||||
|
||||
Deployment with docker-compose is the recommended method for deployment. The example below will create an instance of mealie available on port `9925` with the data volume mounted from the local directory. To use, create a docker-compose.yml file, paste the contents below and save. In the terminal run `docker-compose up -d` to start the container.
|
||||
Deployment with docker-compose is the recommended method for deployment. The example below will create an instance of mealie available on port `9925` with the data volume mounted from the local directory. To use, create a docker-compose.yml file, paste the contents below and save. In the terminal run `docker-compose up -d` to start the container.
|
||||
|
||||
```yaml
|
||||
version: "3.1"
|
||||
@@ -41,29 +39,14 @@ services:
|
||||
ports:
|
||||
- 9925:80
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: America/Anchorage
|
||||
|
||||
# Default Recipe Settings
|
||||
RECIPE_PUBLIC: 'true'
|
||||
RECIPE_SHOW_NUTRITION: 'true'
|
||||
RECIPE_SHOW_ASSETS: 'true'
|
||||
RECIPE_LANDSCAPE_VIEW: 'true'
|
||||
RECIPE_DISABLE_COMMENTS: 'false'
|
||||
RECIPE_DISABLE_AMOUNT: 'false'
|
||||
|
||||
# Gunicorn
|
||||
# WEB_CONCURRENCY: 2
|
||||
# WORKERS_PER_CORE: 0.5
|
||||
# MAX_WORKERS: 8
|
||||
volumes:
|
||||
- ./mealie/data/:/app/data
|
||||
|
||||
```
|
||||
|
||||
## Docker Compose with Postgres _(BETA)_
|
||||
|
||||
Postgres support was introduced in v0.5.0. At this point it should be used with caution and frequent backups.
|
||||
## Docker Compose with Postgres *(BETA)*
|
||||
Postgres support was introduced in v0.5.0. At this point it should be used with caution and frequent backups.
|
||||
|
||||
```yaml
|
||||
version: "3.1"
|
||||
@@ -74,35 +57,13 @@ services:
|
||||
restart: always
|
||||
ports:
|
||||
- 9090:80
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: America/Anchorage
|
||||
|
||||
# Database Settings
|
||||
DB_ENGINE: postgres # Optional: 'sqlite', 'postgres'
|
||||
POSTGRES_USER: mealie
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_SERVER: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: mealie
|
||||
|
||||
# Default Recipe Settings
|
||||
RECIPE_PUBLIC: 'true'
|
||||
RECIPE_SHOW_NUTRITION: 'true'
|
||||
RECIPE_SHOW_ASSETS: 'true'
|
||||
RECIPE_LANDSCAPE_VIEW: 'true'
|
||||
RECIPE_DISABLE_COMMENTS: 'false'
|
||||
RECIPE_DISABLE_AMOUNT: 'false'
|
||||
|
||||
# Gunicorn
|
||||
# WEB_CONCURRENCY: 2
|
||||
# WORKERS_PER_CORE: 0.5
|
||||
# MAX_WORKERS: 8
|
||||
volumes:
|
||||
- ./mealie/data/:/app/data
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres
|
||||
@@ -114,98 +75,79 @@ services:
|
||||
|
||||
## Env Variables
|
||||
|
||||
| Variables | Default | Description |
|
||||
| ----------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| PUID | 911 | UserID permissions between host OS and container |
|
||||
| PGID | 911 | GroupID permissions between host OS and container |
|
||||
| DEFAULT_GROUP | Home | The default group for users |
|
||||
| DEFAULT_EMAIL | changeme@email.com | The default username for the superuser |
|
||||
| BASE_URL | http://localhost:8080 | Used for Notifications |
|
||||
| DB_ENGINE | sqlite | Optional: 'sqlite', 'postgres' |
|
||||
| POSTGRES_USER | mealie | Postgres database user |
|
||||
| POSTGRES_PASSWORD | mealie | Postgres database password |
|
||||
| POSTGRES_SERVER | postgres | Postgres database server address |
|
||||
| POSTGRES_PORT | 5432 | Postgres database port |
|
||||
| POSTGRES_DB | mealie | Postgres database name |
|
||||
| TOKEN_TIME | 2 | The time in hours that a login/auth token is valid |
|
||||
| LDAP_AUTH_ENABLED | False | Authenticate via an external LDAP server in addidion to built-in Mealie auth |
|
||||
| LDAP_SERVER_URL | None | LDAP server URL (e.g. ldap://ldap.example.com) |
|
||||
| LDAP_BIND_TEMPLATE | None | Templated DN for users, `{}` will be replaced with the username (e.g. `cn={},dc=example,dc=com`) |
|
||||
| LDAP_ADMIN_FILTER | None | Optional LDAP filter, which tells Mealie the LDAP user is an admin (e.g. `(memberOf=cn=admins,dc=example,dc=com)`) |
|
||||
| RECIPE_PUBLIC | True | Default Recipe Settings - Make Recipe Public |
|
||||
| RECIPE_SHOW_NUTRITION | True | Default Recipe Settings - Show Recipe Nutrition |
|
||||
| RECIPE_SHOW_ASSETS | True | Default Recipe Settings - Show Recipe Assets |
|
||||
| RECIPE_LANDSCAPE_VIEW | True | Default Recipe Settings - Set Landscape View |
|
||||
| RECIPE_DISABLE_COMMENTS | False | Default Recipe Settings - Disable Comments |
|
||||
| RECIPE_DISABLE_AMOUNT | False | Default Recipe Settings - Disable Amount |
|
||||
| AUTO_BACKUP_ENABLED | False | Disable/Enable Mealie's Auto Backup Function |
|
||||
| API_PORT | 9000 | The port exposed by backend API. **Do not change this if you're running in Docker** |
|
||||
| API_DOCS | True | Turns on/off access to the API documentation locally. |
|
||||
| TZ | UTC | Must be set to get correct date/time on the server |
|
||||
| WORKERS_PER_CORE | 1 | Set the number of workers to the number of CPU cores multiplied by this value (Value \* CPUs). More info [here][workers_per_core] |
|
||||
| MAX_WORKERS | | Set the maximum number of workers to use. Default is not set meaning unlimited. More info [here][max_workers] |
|
||||
| WEB_CONCURRENCY | 2 | Override the automatic definition of number of workers. More info [here][web_concurrency] |
|
||||
| Variables | Default | Description |
|
||||
| ----------------- | --------------------- | ----------------------------------------------------------------------------------- |
|
||||
| DEFAULT_GROUP | Home | The default group for users |
|
||||
| DEFAULT_EMAIL | changeme@email.com | The default username for the superuser |
|
||||
| BASE_URL | http://localhost:8080 | Used for Notifications |
|
||||
| DB_ENGINE | sqlite | Optional: 'sqlite', 'postgres' |
|
||||
| POSTGRES_USER | mealie | Postgres database user |
|
||||
| POSTGRES_PASSWORD | mealie | Postgres database password |
|
||||
| POSTGRES_SERVER | postgres | Postgres database server address |
|
||||
| POSTGRES_PORT | 5432 | Postgres database port |
|
||||
| POSTGRES_DB | mealie | Postgres database name |
|
||||
| TOKEN_TIME | 2 | The time in hours that a login/auth token is valid |
|
||||
| API_PORT | 9000 | The port exposed by backend API. **do not change this if you're running in docker** |
|
||||
| API_DOCS | True | Turns on/off access to the API documentation locally. |
|
||||
| TZ | UTC | Must be set to get correct date/time on the server |
|
||||
|
||||
|
||||
## Raspberry Pi 4
|
||||
|
||||
!!! tip "Fatal Python error: init_interp_main: can't initialize time"
|
||||
|
||||
Some users experience an problem with running the linux/arm/v7 container on Raspberry Pi 4. This is not a problem with the Mealie container, but with a bug in the hosts Docker installation.
|
||||
|
||||
Update the host RP4 using [instructions](https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-735236388), summarized here:
|
||||
|
||||
Update the host RP4 using [instructions](https://github.com/linuxserver/docker-papermerge/issues/4#issuecomment-735236388){:target="_blank"}, summarized here:
|
||||
|
||||
```shell
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
|
||||
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
|
||||
## Advanced
|
||||
!!! warning "Not Required"
|
||||
|
||||
The items below are completely optional and are not required to manage or install your Mealie instance.
|
||||
The items below are completely optional and are not required to manage or install your Mealie instance.
|
||||
|
||||
### Custom Caddy File
|
||||
|
||||
The Docker image provided by Mealie contains both the API and the html bundle in one convenient image. This is done by using a proxy server to serve different parts of the application depending on the URL/URI. Requests sent to `/api/*` or `/docs` will be directed to the API, anything else will be served the static web files. Below is the default Caddyfile that is used to proxy requests. You can override this file by mounting an alternative Caddyfile to `/app/Caddyfile`.
|
||||
The Docker image provided by Mealie contains both the API and the html bundle in one convenient image. This is done by using a proxy server to serve different parts of the application depending on the URL/URI. Requests sent to `/api/*` or `/docs` will be directed to the API, anything else will be served the static web files. Below is the default Caddyfile that is used to proxy requests. You can override this file by mounting an alternative Caddyfile to `/app/Caddyfile`.
|
||||
|
||||
```
|
||||
{
|
||||
auto_https off
|
||||
auto_https off
|
||||
admin off
|
||||
}
|
||||
|
||||
:80 {
|
||||
@proxied path /api/* /docs /openapi.json
|
||||
|
||||
|
||||
root * /app/dist
|
||||
encode gzip
|
||||
uri strip_suffix /
|
||||
|
||||
|
||||
handle_path /api/recipes/image/* {
|
||||
root * /app/data/img/
|
||||
file_server
|
||||
}
|
||||
|
||||
handle @proxied {
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
reverse_proxy http://127.0.0.1:9000
|
||||
}
|
||||
|
||||
handle {
|
||||
try_files {path}.html {path} /
|
||||
file_server
|
||||
file_server
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Deployed without Docker
|
||||
|
||||
!!! error "Unsupported Deployment"
|
||||
If you are experiencing a problem with manual deployment, please do not submit a github issue unless it is related to an aspect of the application. For deployment help, the [discord server](https://discord.gg/QuStdQGSGK){:target="_blank"} is a better place to find support.
|
||||
|
||||
If you are experiencing a problem with manual deployment, please do not submit a github issue unless it is related to an aspect of the application. For deployment help, the [discord server](https://discord.gg/QuStdQGSGK) is a better place to find support.
|
||||
|
||||
Alternatively, this project is built on Python and SQLite so you may run it as a python application on your server. This is not a supported options for deployment and is only here as a reference for those who would like to do this on their own. To get started you can clone this repository into a directory of your choice and use the instructions below as a reference for how to get started.
|
||||
Alternatively, this project is built on Python and SQLite so you may run it as a python application on your server. This is not a supported options for deployment and is only here as a reference for those who would like to do this on their own. To get started you can clone this repository into a directory of your choice and use the instructions below as a reference for how to get started.
|
||||
|
||||
There are three parts to the Mealie application
|
||||
|
||||
@@ -214,19 +156,14 @@ There are three parts to the Mealie application
|
||||
- Proxy Server
|
||||
|
||||
### Frontend/ Static Files
|
||||
|
||||
The frontend static files are generated with `npm run build`. This is done during the build process with docker. If you choose to deploy this as a system application you must do this process yourself. In the project directory run `cd frontend` to change directories into the frontend directory and run `npm install` and then `npm run build`. This will generate the static files in a `dist` folder in the frontend directory.
|
||||
|
||||
### Backend API
|
||||
|
||||
The backend API is build with Python, FastAPI, and SQLite and requires Python 3.9, and Poetry. Once the requirements are installed, in the project directory you can run the command `poetry install` to create a python virtual environment and install the python dependencies.
|
||||
|
||||
Once the dependencies are installed you should be ready to run the server. To initialize that database you need to first run `python mealie/db/init_db.py`. Then to start The web server, you run the command `uvicorn mealie.app:app --host 0.0.0.0 --port 9000`
|
||||
Once the dependencies are installed you should be ready to run the server. To initialize that database you need to first run `python mealie/db/init_db.py`. Then to start The web server, you run the command `uvicorn mealie.app:app --host 0.0.0.0 --port 9000`
|
||||
|
||||
|
||||
### Proxy Server
|
||||
You must use a proxy server to server up the static files created with `npm run build` and proxy requests to the API. In the docker build this is done with Caddy. You can use the CaddyFile in the section above as a reference. One important thing to keep in mind is that you should drop any trailing `/` in the url. Not doing this may result in failed API requests.
|
||||
|
||||
You must use a proxy server to server up the static files created with `npm run build` and proxy requests to the API. In the docker build this is done with Caddy. You can use the CaddyFile in the section above as a reference. One important thing to keep in mind is that you should drop any trailing `/` in the url. Not doing this may result in failed API requests.
|
||||
|
||||
[workers_per_core]: https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/2daa3e3873c837d5781feb4ff6a40a89f791f81b/README.md#workers_per_core
|
||||
[max_workers]: https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/2daa3e3873c837d5781feb4ff6a40a89f791f81b/README.md#max_workers
|
||||
[web_concurrency]: https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/2daa3e3873c837d5781feb4ff6a40a89f791f81b/README.md#web_concurrency
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and Mealie will automatically import the relevant data or add a family recipe with the UI editor. Mealie also provides an API for interactions from 3rd party applications.
|
||||
|
||||
[Remember to join the Discord](https://discord.gg/QuStdQGSGK)!
|
||||
[Remember to join the Discord](https://discord.gg/QuStdQGSGK){:target="_blank"}!
|
||||
|
||||
!!! note
|
||||
In some of the demo gifs the styling may be different than the finale application. demos were done during development prior to finale styling.
|
||||
|
||||
!!! warning
|
||||
This is a **BETA** release and that means things may break and or change down the line. I'll do my best to make sure that any API changes are thoughtful and necessary in order not to break things. Additionally, I'll do my best to provide a migration path if the database schema ever changes. Do not use programs like watchtower to auto update your container. You **WILL** run into issues if you do this!
|
||||
This is a **BETA** release and that means things may break and or change down the line. I'll do my best to make sure that any API changes are thoughtful and necessary in order not to break things. Additionally, I'll do my best to provide a migration path if the database schema ever changes. Do not use programs like watchtower to auto update your container. You **WILL** run into issues if you do this,
|
||||
|
||||
|
||||
## Key Features
|
||||
@@ -26,7 +26,7 @@ Mealie is a self hosted recipe manager and meal planner with a RestAPI backend a
|
||||
- Flexible API
|
||||
- Custom key/value pairs for recipes
|
||||
- Webhook support
|
||||
- Interactive API Documentation thanks to [FastAPI](https://fastapi.tiangolo.com/) and [Swagger](https://petstore.swagger.io/)
|
||||
- Interactive API Documentation thanks to [FastAPI](https://fastapi.tiangolo.com/){:target="_blank"} and [Swagger](https://petstore.swagger.io/){:target="_blank"}
|
||||
- Raw JSON Recipe Editor
|
||||
- Migration from other platforms
|
||||
- Chowdown
|
||||
@@ -36,7 +36,7 @@ Mealie is a self hosted recipe manager and meal planner with a RestAPI backend a
|
||||
## FAQ
|
||||
|
||||
### Why An API?
|
||||
An API allows integration into applications like [Home Assistant](https://www.home-assistant.io/) that can act as notification engines to provide custom notifications based of Meal Plan data to remind you to defrost the chicken, marinade the steak, or start the CrockPot. Additionally, you can access nearly any backend service via the API giving you total control to extend the application. To explore the API spin up your server and navigate to http://yourserver.com/docs for interactive API documentation.
|
||||
An API allows integration into applications like [Home Assistant](https://www.home-assistant.io/){:target="_blank"} that can act as notification engines to provide custom notifications based of Meal Plan data to remind you to defrost the chicken, marinade the steak, or start the CrockPot. Additionally, you can access nearly any backend service via the API giving you total control to extend the application. To explore the API spin up your server and navigate to http://yourserver.com/docs for interactive API documentation.
|
||||
|
||||
### Why a Database?
|
||||
Some users of static-site generator applications like ChowDown have expressed concerns about their data being stuck in a database. Considering this is a new project it is a valid concern to be worried about your data. Mealie specifically addresses this concern by provided automatic daily backups that export your data in json, plain-text markdown files, and/or custom Jinja2 templates. **This puts you in controls of how your data is represented** when exported from Mealie, which means you can easily migrate to any other service provided Mealie doesn't work for you.
|
||||
@@ -48,10 +48,10 @@ As to why we need a database?
|
||||
|
||||
## Built With
|
||||
|
||||
* [Vue.js](https://vuejs.org/)
|
||||
* [Vuetify](https://vuetifyjs.com/en/)
|
||||
* [FastAPI](https://fastapi.tiangolo.com/)
|
||||
* [Docker](https://www.docker.com/)
|
||||
* [Vue.js](https://vuejs.org/){:target="_blank"}
|
||||
* [Vuetify](https://vuetifyjs.com/en/){:target="_blank"}
|
||||
* [FastAPI](https://fastapi.tiangolo.com/){:target="_blank"}
|
||||
* [Docker](https://www.docker.com/){:target="_blank"}
|
||||
|
||||
<!-- ROADMAP -->
|
||||
## Road Map
|
||||
@@ -62,9 +62,9 @@ As to why we need a database?
|
||||
<!-- CONTRIBUTING -->
|
||||
## Contributing
|
||||
|
||||
Contributions are what make the open source community such an amazing place to learn, develop, and create. Any contributions you make are **greatly appreciated**. See the [Contributors Guide](../../contributors/non-coders.md) for help getting started.
|
||||
Contributions are what make the open source community such an amazing place to be learn, develop, and create. Any contributions you make are **greatly appreciated**. See the [Contributors Guide](../../contributors/non-coders.md) for help getting started.
|
||||
|
||||
If you are not a coder, you can still contribute financially. Financial contributions help me prioritize working on this project over others and help me to know that there is a real demand for project development.
|
||||
If you are not a coder, you can still contribute financially. financial contributions help me prioritize working on this project over others and helps me know that there is a real demand for project development.
|
||||
|
||||
<a href="https://www.buymeacoffee.com/haykot" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Updating Mealie
|
||||
|
||||
!!! warning "Read The Release Notes"
|
||||
You MUST read the release notes prior to upgrading your container. Currently Mealie provides no database migrations as doing so would slow down development and hinder major changes that may need to happen prior to v1.0.0. Mealie has a robust backup and restore system for managing your data.
|
||||
You MUST read the release notes prior to upgrading your container. Currently Mealie provides no database migrations as doing such would slow down development and hinder major changes that may need to happen prior to v1.0.0. Mealie has a robust backup and restore system for managing your data.
|
||||
|
||||
### Before Upgrading
|
||||
- Read The Release Notes
|
||||
@@ -14,7 +14,7 @@
|
||||
[See Backups and Restore Section](../admin/backups-and-exports.md) for details on backing up your data
|
||||
|
||||
## Docker
|
||||
For all setups using Docker the updating process looks something like this
|
||||
For all setups using Docker the updating process look something like this
|
||||
|
||||
- Stop the container using docker-compose down
|
||||
- Pull the latest image using docker-compose pull
|
||||
|
||||
@@ -9,7 +9,7 @@ Below are some general guidelines that were considered when creating the organiz
|
||||
>
|
||||
> My tags are for picking the exact type of meal I'm looking for, based on my mood or my guests' diet, like gluten-free, vegetarian, sweet-sour or casserole. They can also act as sub-categories, like "alcohol" for beverages or "hot meal" for a main course.
|
||||
>
|
||||
> User: [sephrat](https://github.com/sephrat)
|
||||
> User: [sephrat](https://github.com/sephrat){:target="_blank"}
|
||||
|
||||
|
||||
## Structure
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Recipes
|
||||
|
||||
## URL Import
|
||||
Adding a recipe can be as easy as clicking in the bottom-right corner, copying the recipe URL into Mealie and letting the web scraper organize information. Currently this scraper is implemented with [recipe-scrapers](https://github.com/hhursev/recipe-scrapers). You may have mixed results on some websites, especially with blogs or non-specific recipe websites. See the bulk import Option below for another a convenient way to add blog style recipes into Mealie.
|
||||
Adding a recipe can be as easy as clicking in the bottom-right corner, copying the recipe URL into Mealie and letting the web scrapper organize information. Currently this scraper is implemented with [recipe-scrapers](https://github.com/hhursev/recipe-scrapers){:target="_blank"}. You may have mixed results on some websites, especially with blogs or non-specific recipe websites. See the bulk import Option below for another a convenient way to add blog style recipes into Mealie.
|
||||
|
||||
!!! tip
|
||||
You can find a list of some of the supported sites in the recipe-scrapers repo. If you're site isn't supported, you can work with the recipe-scrapers team to implement it and we can down-stream those changes into Mealie.
|
||||
@@ -12,7 +12,7 @@ Adding a recipe can be as easy as clicking in the bottom-right corner, copying t
|
||||
|
||||
You can use bookmarklets to generate a bookmark that will take your current location, and open a new tab that will try to import that URL into Mealie.
|
||||
|
||||
You can use a [bookmarklet generator site](https://caiorss.github.io/bookmarklet-maker/) and the code below to generate a bookmark for your site. Just change the `http://localhost:8080` to your sites web address and follow the instructions. Note that there is no trailing `/`.
|
||||
You can use a [bookmarklet generator site](https://caiorss.github.io/bookmarklet-maker/){:target="_blank"} and the code below to generate a bookmark for your site. Just change the `http://localhost:8080` to your sites web address and follow the instructions. Note that there is no trailing `/`.
|
||||
|
||||
```js
|
||||
var url = document.URL ;
|
||||
@@ -54,7 +54,7 @@ Mealie also supports bulk import of recipe instructions and ingredients. Select
|
||||

|
||||
|
||||
## Schema
|
||||
Recipes are stored in the json-like format in mongoDB and then sent and edited in json format on the frontend. Each recipes uses [Recipe Schema](https://schema.org/Recipe) as a general guide with some additional properties specific to Mealie.
|
||||
Recipes are stored in the json-like format in mongoDB and then sent and edited in json format on the frontend. Each recipes uses [Recipe Schema](https://schema.org/Recipe){:target="_blank"} as a general guide with some additional properties specific to Mealie.
|
||||
|
||||
### Example
|
||||
```json
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
## Apprise
|
||||
|
||||
Using the [Apprise](https://github.com/caronc/apprise/) library Mealie is able to provide notification services for nearly every popular service. Some of our favorites are...
|
||||
Using the [Apprise](https://github.com/caronc/apprise/){:target="_blank"} library Mealie is able to provided notification services for nearly every popular service. Some of our favorites are...
|
||||
|
||||
- [Gotify](https://github.com/caronc/apprise/wiki/Notify_gotify)
|
||||
- [Discord](https://github.com/caronc/apprise/wiki/Notify_discord)
|
||||
- [Home Assistant](https://github.com/caronc/apprise/wiki/Notify_homeassistant)
|
||||
- [Matrix](https://github.com/caronc/apprise/wiki/Notify_matrix)
|
||||
- [Pushover](https://github.com/caronc/apprise/wiki/Notify_pushover)
|
||||
- [Gotify](https://github.com/caronc/apprise/wiki/Notify_gotify){:target="_blank"}
|
||||
- [Discord](https://github.com/caronc/apprise/wiki/Notify_discord){:target="_blank"}
|
||||
- [Home Assistant](https://github.com/caronc/apprise/wiki/Notify_homeassistant){:target="_blank"}
|
||||
- [Matrix](https://github.com/caronc/apprise/wiki/Notify_matrix){:target="_blank"}
|
||||
- [Pushover](https://github.com/caronc/apprise/wiki/Notify_pushover){:target="_blank"}
|
||||
|
||||
But there are many more to choose from! Take a look at their wiki for information on how to create their URL formats that you can use to create a notification integration in Mealie.
|
||||
But there are some many to choose from! Take a look at their wiki for information on how to create their URL formats and that you can use to create a notification integration in Mealie.
|
||||
|
||||
|
||||
## Subscribe Events
|
||||
@@ -45,7 +45,7 @@ In most cases the events will also provide details on which user performed the a
|
||||
New events can be created and viewed in admin Toolbox `/admin/toolbox?tab=event-notifications`. Select the "+ Notification" button and you'll be provided with a dialog. Complete the form using the URL for the service you'd like to connect to. Before saving be sure to use the test feature.
|
||||
|
||||
!!! tip
|
||||
The feedback provided from the test feature indicates only if the URL you provided is valid, not if the message was successfully sent. Be sure to check the notification feed for the test message.
|
||||
The feedback provided from the test feature is only an indicated of if the URL you provided is valid, not if the message was successfully sent. Be sure to check the notification feed for the test message.
|
||||
|
||||

|
||||
|
||||
@@ -56,4 +56,4 @@ New events can be created and viewed in admin Toolbox `/admin/toolbox?tab=event-
|
||||

|
||||
|
||||
#### Gotify
|
||||

|
||||

|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Working with Planner
|
||||
|
||||
In Mealie you can create a meal plan based off the calendar inputs on the meal planner page. There is no limit to how long or how short a meal plan is. You may also create duplicate meal plans for the same date range. After selecting your date range, click on the card for each day and search through recipes to find your choice. Add a side-dish if you prefer to. After selecting a recipe for all meals, save the plan. Selecting the 'No Recipe' button will allow you to add an entry without a recipe by providing a title and description.
|
||||
In Mealie you can create a meal plan based off the calendar inputs on the meal planner page. There is no limit to how long or how short a meal plan is. You may also create duplicate meal plans for the same date range. After selecting your date range, click on the card for each day and search through recipes to find your choice. Add a side-dish if you prefer to. After selecting a recipe for all meals, save the plan. Selecting the 'No Recipe' button will allow you to add an entry without a recipe by providing a title and description
|
||||
|
||||
You can also randomly generate meal plans with the dice-button at the bottom.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Development Road Map
|
||||
|
||||
## Feature Requests
|
||||
See the [Github META issue for tracking feature requests](https://github.com/hay-kot/mealie/issues/122)
|
||||
See the [Github META issue for tracking feature requests](https://github.com/hay-kot/mealie/issues/122){:target="_blank"}
|
||||
|
||||
## Progress
|
||||
See the [Github Projects](https://github.com/hay-kot/mealie/projects) to see what is currently being worked on
|
||||
See the [Github Projects](https://github.com/hay-kot/mealie/projects){:target="_blank"} to see what is currently being worked on
|
||||
@@ -45,8 +45,6 @@ markdown_extensions:
|
||||
|
||||
extra_css:
|
||||
- assets/stylesheets/custom.css
|
||||
extra_javascript:
|
||||
- assets/js/extra.js
|
||||
repo_url: https://github.com/hay-kot/mealie
|
||||
repo_name: hay-kot/mealie
|
||||
|
||||
@@ -94,10 +92,6 @@ nav:
|
||||
- Style Guide: "contributors/developers-guide/style-guide.md"
|
||||
- Development Road Map: "roadmap.md"
|
||||
- Change Log:
|
||||
- v0.5.5 Bug Fixes: "changelog/v0.5.5.md"
|
||||
- v0.5.4 Bug Fixes: "changelog/v0.5.4.md"
|
||||
- v0.5.3 Bug Fixes: "changelog/v0.5.3.md"
|
||||
- v0.5.2 Misc Updates: "changelog/v0.5.2.md"
|
||||
- v0.5.1 Bug Fixes: "changelog/v0.5.1.md"
|
||||
- v0.5.0 General Upgrades: "changelog/v0.5.0.md"
|
||||
- v0.4.3 Hot Fix: "changelog/v0.4.3.md"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:lts-alpine
|
||||
FROM node:latest
|
||||
|
||||
# # install simple http server for serving static content
|
||||
# RUN npm install -g http-server
|
||||
@@ -13,7 +13,7 @@ COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
# copy project files and folders to the current working directory (i.e. 'app' folder)
|
||||
# COPY . .
|
||||
COPY . .
|
||||
|
||||
# build app for production with minification
|
||||
# RUN npm run build
|
||||
|
||||
18370
frontend/package-lock.json
generated
@@ -14,6 +14,7 @@
|
||||
"core-js": "^3.14.0",
|
||||
"fuse.js": "^6.4.6",
|
||||
"register-service-worker": "^1.7.1",
|
||||
"typeface-roboto": "^1.1.13",
|
||||
"v-jsoneditor": "^1.4.4",
|
||||
"vue": "^2.6.14",
|
||||
"vue-i18n": "^8.24.1",
|
||||
@@ -31,15 +32,11 @@
|
||||
"@vue/cli-plugin-eslint": "^4.5.13",
|
||||
"@vue/cli-plugin-pwa": "~4.5.0",
|
||||
"@vue/cli-service": "^4.5.13",
|
||||
"@vue/preload-webpack-plugin": "^2.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"html-webpack-plugin": "^5.3.1",
|
||||
"preload-webpack-plugin": "^2.3.0",
|
||||
"sass": "^1.34.1",
|
||||
"sass-loader": "^8.0.2",
|
||||
"typeface-roboto": "^1.1.13",
|
||||
"vue-cli-plugin-i18n": "~1.0.1",
|
||||
"vue-cli-plugin-vuetify": "^2.4.1",
|
||||
"vue-cli-plugin-webpack-bundle-analyzer": "^4.0.0",
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
BIN
frontend/public/img/icons/apple-touch-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
frontend/public/img/icons/apple-touch-icon-152x152.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
frontend/public/img/icons/apple-touch-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
frontend/public/img/icons/apple-touch-icon-60x60.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
frontend/public/img/icons/apple-touch-icon-76x76.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 883 B After Width: | Height: | Size: 574 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
frontend/public/img/icons/msapplication-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,28 +1,3 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M4948 6348 c-662 -677 -956 -982 -1123 -1168 -32 -36 -62 -67 -65
|
||||
-70 -3 -3 -31 -35 -62 -71 -127 -151 -157 -391 -77 -600 26 -68 117 -233 137
|
||||
-249 4 -3 25 -25 47 -48 l40 -42 -1679 -1679 -1678 -1678 244 -246 243 -247
|
||||
1200 1200 1199 1199 1192 -1192 c656 -655 1197 -1193 1202 -1195 10 -3 473
|
||||
459 480 478 2 5 -534 547 -1191 1204 l-1194 1195 185 183 c250 248 262 258
|
||||
296 258 11 0 41 -19 66 -43 139 -131 331 -199 538 -190 160 6 273 63 475 236
|
||||
132 114 199 179 845 822 l642 640 -161 163 c-88 90 -162 162 -164 160 -3 -1
|
||||
-256 -254 -564 -561 l-560 -559 -160 158 c-89 87 -161 162 -161 165 0 4 251
|
||||
259 559 567 l558 560 -159 161 c-87 89 -161 161 -164 161 -3 0 -258 -252 -566
|
||||
-559 l-560 -560 -164 162 -164 162 560 560 c308 308 560 563 560 566 0 5 -194
|
||||
202 -292 297 l-34 32 -326 -332z"/>
|
||||
<path d="M489 6349 c-108 -115 -190 -257 -254 -440 -20 -57 -35 -104 -34 -104
|
||||
1 0 -3 -22 -9 -50 -42 -181 -46 -400 -11 -568 72 -343 178 -493 781 -1102 199
|
||||
-202 1018 -1020 1054 -1055 6 -5 974 962 974 973 0 9 -1704 1713 -2130 2130
|
||||
-156 152 -291 277 -299 277 -9 0 -41 -27 -72 -61z"/>
|
||||
</g>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256" version="1.1">
|
||||
<path d="M 162.083 54.642 C 148.745 68.272, 137.170 80.703, 136.362 82.266 C 133.689 87.435, 133.522 94.130, 135.929 99.573 C 137.122 102.269, 139.070 105.510, 140.258 106.775 L 142.418 109.074 90.974 160.526 L 39.529 211.979 46.999 219.499 L 54.470 227.020 91.235 190.265 L 128 153.510 164.765 190.265 L 201.530 227.020 209 219.500 L 216.470 211.980 179.725 175.225 L 142.980 138.470 150.320 131.178 C 156.858 124.685, 157.808 124.063, 159.001 125.501 C 162.066 129.195, 168.873 132.163, 174.392 132.213 C 183.508 132.295, 186.374 130.174, 212.477 104.038 L 236.454 80.030 231.501 75.001 L 226.548 69.973 209.288 87.212 L 192.027 104.452 187 99.500 L 181.973 94.548 199.212 77.288 L 216.452 60.027 211.500 55 L 206.548 49.973 189.288 67.212 L 172.027 84.452 167 79.500 L 161.973 74.548 179.225 57.275 L 196.477 40.001 191.406 34.930 L 186.335 29.859 162.083 54.642 M 38.429 41.250 C 31.557 49.376, 28.011 62.815, 29.835 73.824 C 31.955 86.615, 34.508 90.093, 61.720 117.253 L 86.520 142.005 101.501 126.999 L 116.482 111.993 79.496 74.996 C 59.154 54.648, 42.210 38, 41.844 38 C 41.478 38, 39.941 39.462, 38.429 41.250" stroke="none" fill="black" fill-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -8,6 +8,8 @@
|
||||
<meta name="description" content="Mealie is a self hosted recipe manager and meal planner.">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title> Mealie </title>
|
||||
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> -->
|
||||
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -3,40 +3,80 @@
|
||||
"short_name": "Mealie",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./img/icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
"src": "./img/icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
"src": "./img/icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/android-chrome-maskable-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/android-chrome-maskable-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/apple-touch-icon-60x60.png",
|
||||
"sizes": "60x60",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/apple-touch-icon-76x76.png",
|
||||
"sizes": "76x76",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/apple-touch-icon-120x120.png",
|
||||
"sizes": "120x120",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/apple-touch-icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/apple-touch-icon-180x180.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/apple-touch-icon.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/favicon-16x16.png",
|
||||
"sizes": "16x16",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/favicon-32x32.png",
|
||||
"sizes": "32x32",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/msapplication-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./img/icons/mstile-150x150.png",
|
||||
"sizes": "150x150",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#FFFFFF",
|
||||
"theme_color": "#E58325",
|
||||
"share_target": {
|
||||
"action": "/",
|
||||
"method": "GET",
|
||||
"params": {
|
||||
"title": "title",
|
||||
"text": "recipe_import_url"
|
||||
}
|
||||
}
|
||||
}
|
||||
"theme_color": "#E58325"
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<v-main>
|
||||
<v-banner v-if="demo" sticky>
|
||||
<div class="text-center">
|
||||
<b> This is a Demo of the v0.5.6 (BETA) </b> | Username: changeme@email.com | Password: demo
|
||||
<b> This is a Demo of the v0.5.0 (BETA) </b> | Username: changeme@email.com | Password: demo
|
||||
</div>
|
||||
</v-banner>
|
||||
<GlobalSnackbar />
|
||||
@@ -48,32 +48,19 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
async created() {
|
||||
// Initial API Requests
|
||||
async mounted() {
|
||||
this.$store.dispatch("initTheme");
|
||||
this.$store.dispatch("requestRecentRecipes");
|
||||
this.$store.dispatch("refreshToken");
|
||||
this.$store.dispatch("requestUserData");
|
||||
this.$store.dispatch("requestCurrentGroup");
|
||||
this.$store.dispatch("requestTags");
|
||||
this.$store.dispatch("requestUserData");
|
||||
this.$store.dispatch("requestCategories");
|
||||
this.$store.dispatch("requestAppInfo");
|
||||
this.$store.dispatch("requestSiteSettings");
|
||||
|
||||
// Listen for swUpdated event and display refresh snackbar as required.
|
||||
document.addEventListener("swUpdated", this.showRefreshUI, { once: true });
|
||||
// Refresh all open app tabs when a new service worker is installed.
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.addEventListener("controllerchange", () => {
|
||||
if (this.refreshing) return;
|
||||
this.refreshing = true;
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$store.dispatch("requestTags");
|
||||
this.darkModeSystemCheck();
|
||||
this.darkModeAddEventListener();
|
||||
this.$store.dispatch("requestAppInfo");
|
||||
this.$store.dispatch("requestCustomPages");
|
||||
this.$store.dispatch("requestSiteSettings");
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -86,6 +73,19 @@ export default {
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
// Listen for swUpdated event and display refresh snackbar as required.
|
||||
document.addEventListener("swUpdated", this.showRefreshUI, { once: true });
|
||||
// Refresh all open app tabs when a new service worker is installed.
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.addEventListener("controllerchange", () => {
|
||||
if (this.refreshing) return;
|
||||
this.refreshing = true;
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// For Later!
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ export const API_ROUTES = {
|
||||
aboutEvents: `${prefix}/about/events`,
|
||||
aboutEventsNotifications: `${prefix}/about/events/notifications`,
|
||||
aboutEventsNotificationsTest: `${prefix}/about/events/notifications/test`,
|
||||
aboutRecipesDefaults: `${prefix}/about/recipes/defaults`,
|
||||
authRefresh: `${prefix}/auth/refresh`,
|
||||
authToken: `${prefix}/auth/token`,
|
||||
authTokenLong: `${prefix}/auth/token/long`,
|
||||
@@ -28,7 +27,6 @@ export const API_ROUTES = {
|
||||
migrations: `${prefix}/migrations`,
|
||||
recipesCategory: `${prefix}/recipes/category`,
|
||||
recipesCreate: `${prefix}/recipes/create`,
|
||||
recipesCreateFromZip: `${prefix}/recipes/create-from-zip`,
|
||||
recipesCreateUrl: `${prefix}/recipes/create-url`,
|
||||
recipesSummary: `${prefix}/recipes/summary`,
|
||||
recipesSummaryUncategorized: `${prefix}/recipes/summary/uncategorized`,
|
||||
@@ -72,7 +70,6 @@ export const API_ROUTES = {
|
||||
recipesRecipeSlug: recipe_slug => `${prefix}/recipes/${recipe_slug}`,
|
||||
recipesRecipeSlugAssets: recipe_slug => `${prefix}/recipes/${recipe_slug}/assets`,
|
||||
recipesRecipeSlugImage: recipe_slug => `${prefix}/recipes/${recipe_slug}/image`,
|
||||
recipesRecipeSlugZip: recipe_slug => `${prefix}/recipes/${recipe_slug}/zip`,
|
||||
recipesSlugComments: slug => `${prefix}/recipes/${slug}/comments`,
|
||||
recipesSlugCommentsId: (slug, id) => `${prefix}/recipes/${slug}/comments/${id}`,
|
||||
shoppingListsId: id => `${prefix}/shopping-lists/${id}`,
|
||||
|
||||
@@ -13,7 +13,7 @@ export const metaAPI = {
|
||||
},
|
||||
|
||||
async getLogText(num) {
|
||||
const response = await apiReq.get(API_ROUTES.debugLogNum(num));
|
||||
const response = await apiReq.get(API_ROUTES.debugLog(num));
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
@@ -4,15 +4,6 @@ import { store } from "../store";
|
||||
import i18n from "@/i18n.js";
|
||||
|
||||
export const recipeAPI = {
|
||||
/**
|
||||
* Returns the Default Recipe Settings for the Site
|
||||
* @returns {AxoisResponse} Axois Response Object
|
||||
*/
|
||||
async getDefaultSettings() {
|
||||
const response = await apiReq.get(API_ROUTES.aboutRecipesDefaults);
|
||||
return response;
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a Recipe by URL
|
||||
* @param {string} recipeURL
|
||||
|
||||
@@ -4,6 +4,8 @@ import i18n from "@/i18n.js";
|
||||
export const utilsAPI = {
|
||||
// import { api } from "@/api";
|
||||
uploadFile(url, fileObject) {
|
||||
console.log("API Called");
|
||||
|
||||
return apiReq.post(
|
||||
url,
|
||||
fileObject,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<The404>
|
||||
<h1 class="mx-auto">{{ $t('general.no-recipe-found') }}</h1>
|
||||
<h1 class="mx-auto">No Recipe Found</h1>
|
||||
</The404>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<v-card-title>
|
||||
<slot>
|
||||
<h1 class="mx-auto">{{ $t('page.404-page-not-found') }}</h1>
|
||||
<h1 class="mx-auto">{{ $t("404.page-not-found") }}</h1>
|
||||
</slot>
|
||||
</v-card-title>
|
||||
<div class="d-flex justify-space-around">
|
||||
@@ -29,15 +29,15 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
buttons() {
|
||||
return[
|
||||
{ icon: this.$globals.icons.home, to: "/", text: this.$t('general.home') },
|
||||
{ icon: this.$globals.icons.primary, to: "/recipes/all", text: this.$t('page.all-recipes') },
|
||||
{ icon: this.$globals.icons.search, to: "/search", text: this.$t('search.search') },
|
||||
];
|
||||
},
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
buttons: [
|
||||
{ icon: this.$globals.icons.home, to: "/", text: "Home" },
|
||||
{ icon: this.$globals.icons.primary, to: "/recipes/all", text: "All Recipes" },
|
||||
{ icon: this.$globals.icons.search, to: "/search", text: "Search" },
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -72,13 +72,6 @@ export default {
|
||||
selected: [],
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
if (this.tagSelector) {
|
||||
this.$store.dispatch("requestTags");
|
||||
} else {
|
||||
this.$store.dispatch("requestCategories");
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$emit(MOUNTED_EVENT);
|
||||
this.setInit(this.value);
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.selectedItem = this.$store.getters.getActiveLang;
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -18,16 +18,14 @@
|
||||
<v-hover v-slot="{ hover }" :open-delay="50">
|
||||
<v-card :class="{ 'on-hover': hover }" :elevation="hover ? 12 : 2">
|
||||
<CardImage large :slug="planDay.meals[0].slug" icon-size="200" @click="openSearch(index, modes.primary)">
|
||||
<div>
|
||||
<v-fade-transition>
|
||||
<v-btn v-if="hover" small color="info" class="ma-1" @click.stop="addCustomItem(index, modes.primary)">
|
||||
<v-icon left>
|
||||
{{ $globals.icons.edit }}
|
||||
</v-icon>
|
||||
{{ $t("reicpe.no-recipe") }}
|
||||
</v-btn>
|
||||
</v-fade-transition>
|
||||
</div>
|
||||
<v-fade-transition>
|
||||
<v-btn v-if="hover" small color="info" class="ma-1" @click.stop="addCustomItem(index, modes.primary)">
|
||||
<v-icon left>
|
||||
{{ $globals.icons.edit }}
|
||||
</v-icon>
|
||||
{{ $t('reicpe.no-recipe') }}
|
||||
</v-btn>
|
||||
</v-fade-transition>
|
||||
</CardImage>
|
||||
|
||||
<v-card-title class="my-n3 mb-n6">
|
||||
@@ -42,14 +40,14 @@
|
||||
<v-icon left>
|
||||
{{ $globals.icons.edit }}
|
||||
</v-icon>
|
||||
{{ $t("reicpe.no-recipe") }}
|
||||
{{ $t('reicpe.no-recipe') }}
|
||||
</v-btn>
|
||||
</v-fade-transition>
|
||||
<v-btn color="info" outlined small @click="openSearch(index, modes.sides)">
|
||||
<v-icon small class="mr-1">
|
||||
{{ $globals.icons.create }}
|
||||
</v-icon>
|
||||
{{ $t("meal-plan.side") }}
|
||||
{{ $t('meal-plan.side') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-hover>
|
||||
|
||||
@@ -122,7 +122,7 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
async mounted() {
|
||||
await this.$store.dispatch("requestCurrentGroup");
|
||||
await this.$store.dispatch("requestAllRecipes");
|
||||
await this.buildMealStore();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<v-icon color="primary" class="icon-position" :size="iconSize">
|
||||
{{ $globals.icons.primary }}
|
||||
</v-icon>
|
||||
<slot> </slot>
|
||||
<slot> </slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -85,7 +85,6 @@ export default {
|
||||
}
|
||||
|
||||
.icon-slot > div {
|
||||
top: 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
allow-overflow
|
||||
close-delay="125"
|
||||
open-on-hover
|
||||
content-class="d-print-none"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn :fab="fab" :small="fab" :color="color" :icon="!fab" dark v-bind="attrs" v-on="on" @click.prevent>
|
||||
@@ -26,7 +25,11 @@
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-list dense>
|
||||
<v-list-item v-for="(item, index) in displayedMenu" :key="index" @click="menuAction(item.action)">
|
||||
<v-list-item
|
||||
v-for="(item, index) in loggedIn && cardMenu ? userMenu : defaultMenu"
|
||||
:key="index"
|
||||
@click="menuAction(item.action)"
|
||||
>
|
||||
<v-list-item-icon>
|
||||
<v-icon v-text="item.icon" :color="item.color"></v-icon>
|
||||
</v-list-item-icon>
|
||||
@@ -50,10 +53,6 @@ export default {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
showPrint: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
fab: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -89,28 +88,20 @@ export default {
|
||||
recipeURL() {
|
||||
return `${this.baseURL}/recipe/${this.slug}`;
|
||||
},
|
||||
printerMenu() {
|
||||
return {
|
||||
title: this.$t("general.print"),
|
||||
icon: this.$globals.icons.printer,
|
||||
color: "accent",
|
||||
action: "print",
|
||||
};
|
||||
},
|
||||
defaultMenu() {
|
||||
return [
|
||||
{
|
||||
title: this.$t("general.print"),
|
||||
icon: this.$globals.icons.printer,
|
||||
color: "accent",
|
||||
action: "print",
|
||||
},
|
||||
{
|
||||
title: this.$t("general.share"),
|
||||
icon: this.$globals.icons.shareVariant,
|
||||
color: "accent",
|
||||
action: "share",
|
||||
},
|
||||
{
|
||||
title: this.$t("general.download"),
|
||||
icon: this.$globals.icons.download,
|
||||
color: "accent",
|
||||
action: "download",
|
||||
},
|
||||
];
|
||||
},
|
||||
userMenu() {
|
||||
@@ -127,18 +118,9 @@ export default {
|
||||
color: "accent",
|
||||
action: "edit",
|
||||
},
|
||||
...this.defaultMenu,
|
||||
];
|
||||
},
|
||||
displayedMenu() {
|
||||
let menu = this.defaultMenu;
|
||||
if (this.loggedIn && this.cardMenu) {
|
||||
menu = [...this.userMenu, ...menu];
|
||||
}
|
||||
if (this.showPrint) {
|
||||
menu = [this.printerMenu, ...menu];
|
||||
}
|
||||
return menu;
|
||||
},
|
||||
recipeText() {
|
||||
return this.$t("recipe.share-recipe-message", [this.name]);
|
||||
},
|
||||
@@ -177,9 +159,6 @@ export default {
|
||||
case "print":
|
||||
this.$router.push(`/recipe/${this.slug}` + "?print=true");
|
||||
break;
|
||||
case "download":
|
||||
window.open(`/api/recipes/${this.slug}/zip`);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<v-tooltip bottom nudge-right="50" :color="buttonStyle ? 'info' : 'secondary'">
|
||||
<v-tooltip bottom nudge-right="50" :color="buttonStyle ? 'primary' : 'secondary'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
small
|
||||
@click.prevent="toggleFavorite"
|
||||
v-if="isFavorite || showAlways"
|
||||
:color="buttonStyle ? 'info' : 'secondary'"
|
||||
:color="buttonStyle ? 'primary' : 'secondary'"
|
||||
:icon="!buttonStyle"
|
||||
:fab="buttonStyle"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon :small="!buttonStyle" :color="buttonStyle ? 'white' : 'secondary'">
|
||||
<v-icon :small="!buttonStyle" color="secondary">
|
||||
{{ isFavorite ? $globals.icons.heart : $globals.icons.heartOutline }}
|
||||
</v-icon>
|
||||
</v-btn>
|
||||
|
||||
@@ -2,18 +2,13 @@
|
||||
<div v-if="value.length > 0 || edit">
|
||||
<v-card class="mt-2">
|
||||
<v-card-title class="py-2">
|
||||
{{ $t("asset.assets") }}
|
||||
{{ $t("recipe.assets") }}
|
||||
</v-card-title>
|
||||
<v-divider class="mx-2"></v-divider>
|
||||
<v-list :flat="!edit" v-if="value.length > 0">
|
||||
<v-list-item v-for="(item, i) in value" :key="i">
|
||||
<v-list-item-icon class="ma-auto">
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-text="getIconDefinition(item.icon).icon" v-bind="attrs" v-on="on"></v-icon>
|
||||
</template>
|
||||
<span>{{ getIconDefinition(item.icon).title }}</span>
|
||||
</v-tooltip>
|
||||
<v-icon v-text="getIcon(item.icon)"></v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="pl-2" v-text="item.name"></v-list-item-title>
|
||||
@@ -34,7 +29,7 @@
|
||||
</v-card>
|
||||
<div class="d-flex ml-auto mt-2">
|
||||
<v-spacer></v-spacer>
|
||||
<base-dialog @submit="addAsset" :title="$t('asset.new-asset')" :title-icon="getIconDefinition(newAsset.icon).icon">
|
||||
<base-dialog @submit="addAsset" :title="$t('recipe.new-asset')" :title-icon="getIcon(newAsset.icon)">
|
||||
<template v-slot:open="{ open }">
|
||||
<v-btn color="secondary" dark @click="open" v-if="edit">
|
||||
<v-icon>{{ $globals.icons.create }}</v-icon>
|
||||
@@ -45,20 +40,18 @@
|
||||
<div class="d-flex justify-space-between">
|
||||
<v-select
|
||||
dense
|
||||
:prepend-icon="getIconDefinition(newAsset.icon).icon"
|
||||
:prepend-icon="getIcon(newAsset.icon)"
|
||||
v-model="newAsset.icon"
|
||||
:items="iconOptions"
|
||||
item-text="title"
|
||||
item-value="name"
|
||||
class="mr-2"
|
||||
>
|
||||
<template v-slot:item="{ item }">
|
||||
<v-list-item-avatar>
|
||||
<v-icon class="mr-auto">
|
||||
{{ item.icon }}
|
||||
{{ getIcon(item) }}
|
||||
</v-icon>
|
||||
</v-list-item-avatar>
|
||||
{{ item.title }}
|
||||
{{ item }}
|
||||
</template>
|
||||
</v-select>
|
||||
<TheUploadBtn @uploaded="setFileObject" :post="false" file-name="file" :text-btn="false" />
|
||||
@@ -98,45 +91,30 @@ export default {
|
||||
name: "",
|
||||
icon: "mdi-file",
|
||||
},
|
||||
iconOptions: ["mdi-file", "mdi-file-pdf-box", "mdi-file-image", "mdi-code-json", "mdi-silverware-fork-knife"],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
baseURL() {
|
||||
return window.location.origin;
|
||||
},
|
||||
iconOptions() {
|
||||
return [
|
||||
{
|
||||
name: "mdi-file",
|
||||
title: this.$i18n.t('asset.file'),
|
||||
icon: this.$globals.icons.file
|
||||
},
|
||||
{
|
||||
name: "mdi-file-pdf-box",
|
||||
title: this.$i18n.t('asset.pdf'),
|
||||
icon: this.$globals.icons.filePDF
|
||||
},
|
||||
{
|
||||
name: "mdi-file-image",
|
||||
title: this.$i18n.t('asset.image'),
|
||||
icon: this.$globals.icons.fileImage
|
||||
},
|
||||
{
|
||||
name: "mdi-code-json",
|
||||
title: this.$i18n.t('asset.code'),
|
||||
icon: this.$globals.icons.codeJson
|
||||
},
|
||||
{
|
||||
name: "mdi-silverware-fork-knife",
|
||||
title: this.$i18n.t('asset.recipe'),
|
||||
icon: this.$globals.icons.primary
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getIconDefinition(val) {
|
||||
return this.iconOptions.find(({ name }) => name === val );
|
||||
getIcon(val) {
|
||||
switch (val) {
|
||||
case "mdi-file":
|
||||
return this.$globals.icons.file;
|
||||
case "mdi-file-pdf-box":
|
||||
return this.$globals.icons.filePDF;
|
||||
case "mdi-file-image":
|
||||
return this.$globals.icons.fileImage;
|
||||
case "mdi-code-json":
|
||||
return this.$globals.icons.codeJson;
|
||||
case "mdi-silverware-fork-knife":
|
||||
return this.$globals.icons.primary;
|
||||
default:
|
||||
return this.$globals.icons.file;
|
||||
}
|
||||
},
|
||||
assetURL(assetName) {
|
||||
return api.recipes.recipeAssetPath(this.slug, assetName);
|
||||
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
return split.map((element) => element.trim());
|
||||
return split;
|
||||
},
|
||||
save() {
|
||||
this.$emit("bulk-data", this.splitText());
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
</v-card-title>
|
||||
<v-card-text class="mt-n5">
|
||||
<div>
|
||||
<v-text-field :label="$t('general.url')" class="pt-5" clearable v-model="url" :messages="getMessages()">
|
||||
<v-text-field :label="$t('general.url')" class="pt-5" clearable v-model="url">
|
||||
<template v-slot:append-outer>
|
||||
<v-btn class="ml-2" color="primary" @click="getImageFromURL" :loading="loading" :disabled="!slug">
|
||||
<v-btn class="ml-2" color="primary" @click="getImageFromURL" :loading="loading" :disabled="slug">
|
||||
{{ $t("general.get") }}
|
||||
</v-btn>
|
||||
</template>
|
||||
@@ -66,9 +66,6 @@ export default {
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
getMessages() {
|
||||
return this.slug ? [""] : [this.$i18n.t("recipe.save-recipe-before-use")];
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
return {
|
||||
public: this.$t("recipe.public-recipe"),
|
||||
showNutrition: this.$t("recipe.show-nutrition-values"),
|
||||
showAssets: this.$t("asset.show-assets"),
|
||||
showAssets: this.$t("recipe.show-assets"),
|
||||
landscapeView: this.$t("recipe.landscape-view-coming-soon"),
|
||||
disableComments: this.$t("recipe.disable-comments"),
|
||||
disableAmount: this.$t("recipe.disable-amount"),
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
<template>
|
||||
<div v-if="edit || (value && value.length > 0)">
|
||||
<div v-if="edit || ( value && value.length > 0 )">
|
||||
<h2 class="mb-4">{{ $t("recipe.ingredients") }}</h2>
|
||||
<div v-if="edit">
|
||||
<draggable :value="value" @input="updateIndex" @start="drag = true" @end="drag = false" handle=".handle">
|
||||
<transition-group type="transition" :name="!drag ? 'flip-list' : null">
|
||||
<div v-for="(ingredient, index) in value" :key="generateKey('ingredient', index)">
|
||||
<v-row align="center">
|
||||
<v-text-field
|
||||
v-if="edit && showTitleEditor[index]"
|
||||
class="mx-3 mt-3"
|
||||
v-model="value[index].title"
|
||||
dense
|
||||
:label="$t('recipe.section-title')"
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
<v-textarea
|
||||
class="mr-2"
|
||||
:label="$t('recipe.ingredient')"
|
||||
@@ -24,18 +15,6 @@
|
||||
dense
|
||||
rows="1"
|
||||
>
|
||||
<template slot="append">
|
||||
<v-tooltip right nudge-right="10">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn icon small class="mt-n1" v-bind="attrs" v-on="on" @click="toggleShowTitle(index)">
|
||||
<v-icon>{{ showTitleEditor[index] ? $globals.icons.minus : $globals.icons.createAlt }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{
|
||||
showTitleEditor[index] ? $t("recipe.remove-section") : $t("recipe.insert-section")
|
||||
}}</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<template slot="append-outer">
|
||||
<v-icon class="handle">{{ $globals.icons.arrowUpDown }}</v-icon>
|
||||
</template>
|
||||
@@ -56,16 +35,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-for="(ingredient, index) in value" :key="generateKey('ingredient', index)">
|
||||
<h3 class="mt-2" v-if="showTitleEditor[index]">{{ ingredient.title }}</h3>
|
||||
<v-divider v-if="showTitleEditor[index]"></v-divider>
|
||||
<v-list-item dense @click="toggleChecked(index)">
|
||||
<v-checkbox hide-details :value="checked[index]" class="pt-0 my-auto py-auto" color="secondary"> </v-checkbox>
|
||||
<v-list-item-content>
|
||||
<vue-markdown class="ma-0 pa-0 text-subtitle-1 dense-markdown" :source="ingredient.note"> </vue-markdown>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</div>
|
||||
<v-list-item
|
||||
dense
|
||||
v-for="(ingredient, index) in value"
|
||||
:key="generateKey('ingredient', index)"
|
||||
@click="toggleChecked(index)"
|
||||
>
|
||||
<v-checkbox hide-details :value="checked[index]" class="pt-0 my-auto py-auto" color="secondary"> </v-checkbox>
|
||||
|
||||
<v-list-item-content>
|
||||
<vue-markdown class="ma-0 pa-0 text-subtitle-1 dense-markdown" :source="ingredient.note"> </vue-markdown>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -95,19 +76,10 @@ export default {
|
||||
return {
|
||||
drag: false,
|
||||
checked: [],
|
||||
showTitleEditor: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.checked = this.value.map(() => false);
|
||||
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler() {
|
||||
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
addIngredient(ingredients = null) {
|
||||
@@ -146,16 +118,6 @@ export default {
|
||||
removeByIndex(list, index) {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
validateTitle(title) {
|
||||
return !(title === null || title === "");
|
||||
},
|
||||
toggleShowTitle(index) {
|
||||
const newVal = !this.showTitleEditor[index];
|
||||
if (!newVal) {
|
||||
this.value[index].title = "";
|
||||
}
|
||||
this.$set(this.showTitleEditor, index, newVal);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -2,97 +2,74 @@
|
||||
<div>
|
||||
<h2 class="mb-4">{{ $t("recipe.instructions") }}</h2>
|
||||
<div>
|
||||
<draggable
|
||||
:disabled="!edit"
|
||||
:value="value"
|
||||
@input="updateIndex"
|
||||
@start="drag = true"
|
||||
@end="drag = false"
|
||||
handle=".handle"
|
||||
>
|
||||
<div v-for="(step, index) in value" :key="index">
|
||||
<v-app-bar v-if="showTitleEditor[index]" class="primary mx-1 mt-6" dark dense rounded>
|
||||
<v-toolbar-title class="headline" v-if="!edit">
|
||||
<v-app-bar-title v-text="step.title"> </v-app-bar-title>
|
||||
</v-toolbar-title>
|
||||
<v-text-field
|
||||
v-if="edit"
|
||||
class="headline pa-0 mt-5"
|
||||
v-model="step.title"
|
||||
dense
|
||||
solo
|
||||
flat
|
||||
:placeholder="$t('recipe.section-title')"
|
||||
background-color="primary"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-app-bar>
|
||||
<v-hover v-slot="{ hover }">
|
||||
<v-card
|
||||
class="ma-1"
|
||||
:class="[{ 'on-hover': hover }, isChecked(index)]"
|
||||
:elevation="hover ? 12 : 2"
|
||||
:ripple="!edit"
|
||||
@click="toggleDisabled(index)"
|
||||
>
|
||||
<v-card-title :class="{ 'pb-0': !isChecked(index) }">
|
||||
<v-btn
|
||||
v-if="edit"
|
||||
fab
|
||||
x-small
|
||||
color="white"
|
||||
class="mr-2"
|
||||
elevation="0"
|
||||
@click="removeByIndex(value, index)"
|
||||
>
|
||||
<v-icon size="24" color="error">{{ $globals.icons.delete }}</v-icon>
|
||||
</v-btn>
|
||||
|
||||
{{ $t("recipe.step-index", { step: index + 1 }) }}
|
||||
|
||||
<v-btn v-if="edit" text color="primary" class="ml-auto" @click="toggleShowTitle(index)">
|
||||
{{ !showTitleEditor[index] ? $t("recipe.insert-section") : $t("recipe.remove-section") }}
|
||||
</v-btn>
|
||||
<v-icon v-if="edit" class="handle">{{ $globals.icons.arrowUpDown }}</v-icon>
|
||||
<v-fade-transition>
|
||||
<v-icon v-show="isChecked(index)" size="24" class="ml-auto" color="success">
|
||||
{{ $globals.icons.checkboxMarkedCircle }}
|
||||
</v-icon>
|
||||
</v-fade-transition>
|
||||
</v-card-title>
|
||||
<v-card-text v-if="edit">
|
||||
<v-textarea
|
||||
auto-grow
|
||||
dense
|
||||
v-model="value[index]['text']"
|
||||
:key="generateKey('instructions', index)"
|
||||
rows="4"
|
||||
>
|
||||
</v-textarea>
|
||||
</v-card-text>
|
||||
<v-expand-transition>
|
||||
<div class="m-0 p-0" v-show="!isChecked(index) && !edit">
|
||||
<v-card-text>
|
||||
<vue-markdown :source="step.text"> </vue-markdown>
|
||||
</v-card-text>
|
||||
</div>
|
||||
</v-expand-transition>
|
||||
</v-card>
|
||||
</v-hover>
|
||||
</div>
|
||||
</draggable>
|
||||
<div v-for="(step, index) in value" :key="index">
|
||||
<v-app-bar v-if="showTitleEditor[index]" class="primary mx-1 mt-6" dark dense rounded>
|
||||
<v-toolbar-title class="headline" v-if="!edit">
|
||||
<v-app-bar-title v-text="step.title"> </v-app-bar-title>
|
||||
</v-toolbar-title>
|
||||
<v-text-field
|
||||
v-if="edit"
|
||||
class="headline pa-0 mt-5"
|
||||
v-model="step.title"
|
||||
dense
|
||||
solo
|
||||
flat
|
||||
:placeholder="$t('recipe.section-title')"
|
||||
background-color="primary"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-app-bar>
|
||||
<v-hover v-slot="{ hover }">
|
||||
<v-card
|
||||
class="ma-1"
|
||||
:class="[{ 'on-hover': hover }, isDisabled(index)]"
|
||||
:elevation="hover ? 12 : 2"
|
||||
:ripple="!edit"
|
||||
@click="toggleDisabled(index)"
|
||||
>
|
||||
<v-card-title>
|
||||
<v-btn
|
||||
v-if="edit"
|
||||
fab
|
||||
x-small
|
||||
color="white"
|
||||
class="mr-2"
|
||||
elevation="0"
|
||||
@click="removeByIndex(value, index)"
|
||||
>
|
||||
<v-icon size="24" color="error">{{ $globals.icons.delete }}</v-icon>
|
||||
</v-btn>
|
||||
{{ $t("recipe.step-index", { step: index + 1 }) }}
|
||||
<v-btn v-if="edit" text color="primary" class="ml-auto" @click="toggleShowTitle(index)">
|
||||
{{ !showTitleEditor[index] ? $t('recipe.insert-section') : $t('recipe.remove-section') }}
|
||||
</v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text v-if="edit">
|
||||
<v-textarea
|
||||
auto-grow
|
||||
dense
|
||||
v-model="value[index]['text']"
|
||||
:key="generateKey('instructions', index)"
|
||||
rows="4"
|
||||
>
|
||||
</v-textarea>
|
||||
</v-card-text>
|
||||
<v-card-text v-else>
|
||||
<vue-markdown :source="step.text"> </vue-markdown>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-hover>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import draggable from "vuedraggable";
|
||||
import VueMarkdown from "@adapttive/vue-markdown";
|
||||
import { utils } from "@/utils";
|
||||
export default {
|
||||
components: {
|
||||
VueMarkdown,
|
||||
draggable,
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
@@ -117,13 +94,12 @@ export default {
|
||||
|
||||
watch: {
|
||||
value: {
|
||||
handler() {
|
||||
this.disabledSteps = [];
|
||||
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
|
||||
},
|
||||
},
|
||||
handler() {
|
||||
this.disabledSteps = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
generateKey(item, index) {
|
||||
return utils.generateUniqueKey(item, index);
|
||||
@@ -145,7 +121,7 @@ export default {
|
||||
this.disabledSteps.push(stepIndex);
|
||||
}
|
||||
},
|
||||
isChecked(stepIndex) {
|
||||
isDisabled(stepIndex) {
|
||||
if (this.disabledSteps.includes(stepIndex) && !this.edit) {
|
||||
return "disabled-card";
|
||||
} else {
|
||||
@@ -159,11 +135,8 @@ export default {
|
||||
}
|
||||
this.$set(this.showTitleEditor, index, newVal);
|
||||
},
|
||||
updateIndex(data) {
|
||||
this.$emit("input", data);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
return utils.generateUniqueKey(item, index);
|
||||
},
|
||||
addNote() {
|
||||
this.value.push({ title: "", text: "" });
|
||||
this.value.push({ text: "" });
|
||||
},
|
||||
removeByIndex(list, index) {
|
||||
list.splice(index, 1);
|
||||
|
||||
@@ -125,13 +125,12 @@ export default {
|
||||
appendSteps(steps) {
|
||||
this.value.recipeInstructions.push(
|
||||
...steps.map(x => ({
|
||||
title: "",
|
||||
text: x,
|
||||
}))
|
||||
);
|
||||
},
|
||||
addStep() {
|
||||
this.value.recipeInstructions.push({ title: "", text: "" });
|
||||
this.value.recipeInstructions.push({ text: "" });
|
||||
},
|
||||
saveExtras(extras) {
|
||||
this.value.extras = extras;
|
||||
|
||||
@@ -18,26 +18,15 @@
|
||||
/>
|
||||
<v-spacer></v-spacer>
|
||||
<div v-if="!value" class="custom-btn-group ma-1">
|
||||
<FavoriteBadge class="mx-1" color="info" button-style v-if="loggedIn" :slug="slug" show-always />
|
||||
<v-tooltip bottom color="info">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
v-if="loggedIn"
|
||||
fab
|
||||
small
|
||||
class="mx-1"
|
||||
color="info"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
@click="$emit('input', true)"
|
||||
>
|
||||
<v-btn fab small class="mx-1" color="info" v-bind="attrs" v-on="on" @click="$emit('input', true)">
|
||||
<v-icon> {{ $globals.icons.edit }} </v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>{{ $t("general.edit") }}</span>
|
||||
</v-tooltip>
|
||||
<ContextMenu
|
||||
show-print
|
||||
:menu-top="false"
|
||||
:slug="slug"
|
||||
:name="name"
|
||||
@@ -67,15 +56,13 @@
|
||||
<script>
|
||||
import ConfirmationDialog from "@/components/UI/Dialogs/ConfirmationDialog.vue";
|
||||
import ContextMenu from "@/components/Recipe/ContextMenu.vue";
|
||||
import FavoriteBadge from "@/components/Recipe/FavoriteBadge.vue";
|
||||
|
||||
const SAVE_EVENT = "save";
|
||||
const DELETE_EVENT = "delete";
|
||||
const CLOSE_EVENT = "close";
|
||||
const JSON_EVENT = "json";
|
||||
|
||||
export default {
|
||||
components: { ConfirmationDialog, ContextMenu, FavoriteBadge },
|
||||
components: { ConfirmationDialog, ContextMenu },
|
||||
props: {
|
||||
slug: {
|
||||
type: String,
|
||||
@@ -87,10 +74,6 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
loggedIn: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -137,6 +120,7 @@ export default {
|
||||
break;
|
||||
case SAVE_EVENT:
|
||||
this.$emit(SAVE_EVENT);
|
||||
this.$emit("input", false);
|
||||
break;
|
||||
case JSON_EVENT:
|
||||
this.$emit(JSON_EVENT);
|
||||
|
||||
@@ -58,10 +58,8 @@ export default {
|
||||
let formData = new FormData();
|
||||
formData.append(this.fileName, this.file);
|
||||
|
||||
const response = await api.utils.uploadFile(this.url, formData);
|
||||
|
||||
if (response) {
|
||||
this.$emit(UPLOAD_EVENT, response);
|
||||
if (await api.utils.uploadFile(this.url, formData)) {
|
||||
this.$emit(UPLOAD_EVENT);
|
||||
}
|
||||
this.isSelecting = false;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn text :icon="$vuetify.breakpoint.xsOnly" v-bind="attrs" v-on="on" :loading="sortLoading">
|
||||
<v-icon :left="!$vuetify.breakpoint.xsOnly">
|
||||
{{ $globals.icons.sort }}
|
||||
{{ $globals.icons.diceMultiple }}
|
||||
</v-icon>
|
||||
{{ $vuetify.breakpoint.xsOnly ? null : $t("general.sort") }}
|
||||
</v-btn>
|
||||
|
||||