mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-24 16:53:12 -05:00
Compare commits
520 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bd5a82b92 | ||
|
|
cba076b6a4 | ||
|
|
2ff1135b00 | ||
|
|
467b9c6d65 | ||
|
|
176e471276 | ||
|
|
193888fb30 | ||
|
|
13edefbf41 | ||
|
|
fd33468fda | ||
|
|
2a541f081a | ||
|
|
8ab09cf03b | ||
|
|
9e6ae2e514 | ||
|
|
94678fe6e0 | ||
|
|
ed533c8fad | ||
|
|
93f7d15917 | ||
|
|
53aa4dab51 | ||
|
|
92659c64eb | ||
|
|
6f871c6bdb | ||
|
|
f4f511aad6 | ||
|
|
03d384f3a5 | ||
|
|
0c2917a112 | ||
|
|
606a8f03a3 | ||
|
|
2d31c0abf2 | ||
|
|
15c752d428 | ||
|
|
b254cf3833 | ||
|
|
0bd023d8a8 | ||
|
|
aad50f2267 | ||
|
|
fcbc57b392 | ||
|
|
a62299e6ef | ||
|
|
82563fa948 | ||
|
|
7583c56b35 | ||
|
|
b9cc2dc257 | ||
|
|
0dcf81e764 | ||
|
|
3d3763d4b9 | ||
|
|
517727a4b6 | ||
|
|
1c26dff1e9 | ||
|
|
ed1834d945 | ||
|
|
bf8bc88ffb | ||
|
|
6c48eba5f7 | ||
|
|
dc7df0d4aa | ||
|
|
45d5194f19 | ||
|
|
8ad1a15bf1 | ||
|
|
57aeb401b8 | ||
|
|
e15a2f35e2 | ||
|
|
b28e135ceb | ||
|
|
148aca5e85 | ||
|
|
1ac7f90c28 | ||
|
|
413a8a82fc | ||
|
|
72c414bf94 | ||
|
|
b67263e63f | ||
|
|
1673eedff7 | ||
|
|
d3ee5f34f8 | ||
|
|
683f1ac69e | ||
|
|
d6d0f7de71 | ||
|
|
dd0eaac45f | ||
|
|
f8e672c7ac | ||
|
|
2aa9d84d6c | ||
|
|
2c13c4760e | ||
|
|
62bf733548 | ||
|
|
2c72ea17a2 | ||
|
|
06406c86f5 | ||
|
|
b7f7712011 | ||
|
|
4b13686261 | ||
|
|
9fade36014 | ||
|
|
eb1d569e95 | ||
|
|
1099e30a1d | ||
|
|
fa9a2d64f7 | ||
|
|
de142c47df | ||
|
|
c990420a87 | ||
|
|
d772e3bb4f | ||
|
|
bb8080475c | ||
|
|
c1e05f57db | ||
|
|
9ad68542e0 | ||
|
|
83997dbb47 | ||
|
|
b5f3c5bef7 | ||
|
|
ddd97cce10 | ||
|
|
0ecd57a50b | ||
|
|
e4efcee0df | ||
|
|
a6920f057e | ||
|
|
dbb212ceda | ||
|
|
5d5805459a | ||
|
|
3e68920e69 | ||
|
|
91c978a309 | ||
|
|
e7c101c96b | ||
|
|
004f3552c0 | ||
|
|
cd56149371 | ||
|
|
8edea0a7e0 | ||
|
|
df15e97026 | ||
|
|
760462e12f | ||
|
|
60793bb560 | ||
|
|
7c84d3dea5 | ||
|
|
eee1c5733d | ||
|
|
cf0a7ae9c9 | ||
|
|
be80d3e74c | ||
|
|
db1fabf5c8 | ||
|
|
e7e73772e0 | ||
|
|
e5cab0e4d0 | ||
|
|
6a14d5b7db | ||
|
|
57106c4cce | ||
|
|
61c6a991f3 | ||
|
|
6824b3c269 | ||
|
|
6b13166880 | ||
|
|
b2747d77e1 | ||
|
|
fc4d1b88d0 | ||
|
|
8798bd6e55 | ||
|
|
cef61ae29f | ||
|
|
e304d48e84 | ||
|
|
4f1a7c55b9 | ||
|
|
bae7acbc3b | ||
|
|
c0cf6a9aca | ||
|
|
f4570faf1a | ||
|
|
9548a7eb70 | ||
|
|
d5e3a1dacb | ||
|
|
1ce760ec7e | ||
|
|
9e23ed1a07 | ||
|
|
b3885cc3f8 | ||
|
|
5da990abd4 | ||
|
|
f709d11952 | ||
|
|
2a3463b746 | ||
|
|
cb7302d2d9 | ||
|
|
a30084a199 | ||
|
|
c0654a5d95 | ||
|
|
737a370874 | ||
|
|
2a2b6f312b | ||
|
|
96d220acbd | ||
|
|
b9a9b8695d | ||
|
|
e80c8a50e6 | ||
|
|
41795799e6 | ||
|
|
9980e49eef | ||
|
|
945810c47a | ||
|
|
a283828461 | ||
|
|
7c365b7c03 | ||
|
|
16da55f58b | ||
|
|
35f6b0e80e | ||
|
|
ab37c2e8c0 | ||
|
|
d1f82df936 | ||
|
|
6c7cb7e795 | ||
|
|
ecf80b8e9c | ||
|
|
e280734e33 | ||
|
|
24d8854723 | ||
|
|
2f9b711973 | ||
|
|
2b09495e87 | ||
|
|
ae5a1a9af2 | ||
|
|
a312c4dbf3 | ||
|
|
79fb1fb299 | ||
|
|
b7c1cdfd46 | ||
|
|
09873d4814 | ||
|
|
7f596c653b | ||
|
|
bb06b0414b | ||
|
|
6b720bafd6 | ||
|
|
6449591143 | ||
|
|
8fb43246b2 | ||
|
|
95d3fd4958 | ||
|
|
dfbc890f2c | ||
|
|
21886ab4b8 | ||
|
|
4b0df3ace8 | ||
|
|
7505b5cf65 | ||
|
|
45e71da402 | ||
|
|
3ded63dfdf | ||
|
|
735c3e3146 | ||
|
|
83861cfcb8 | ||
|
|
c22ff8ccad | ||
|
|
9a17a484f3 | ||
|
|
bc6734399f | ||
|
|
8e6f2a3d61 | ||
|
|
20fa3a25f2 | ||
|
|
1a9f5470ca | ||
|
|
2254d114be | ||
|
|
ef22d29ef1 | ||
|
|
ef165cd276 | ||
|
|
e6477920ce | ||
|
|
c49584d027 | ||
|
|
e56eabf1e2 | ||
|
|
a35f2ae56a | ||
|
|
2a4a195dcb | ||
|
|
6318e8d1c6 | ||
|
|
b7a4899302 | ||
|
|
7fe6ef4da5 | ||
|
|
0391763d18 | ||
|
|
3250384862 | ||
|
|
1bf496751c | ||
|
|
580700458c | ||
|
|
6c6276cb79 | ||
|
|
787f9293fb | ||
|
|
aa0547ae69 | ||
|
|
1c6b0f1122 | ||
|
|
014721b6f7 | ||
|
|
692d8a5681 | ||
|
|
120d4cfc5a | ||
|
|
e3b3f70621 | ||
|
|
c5e55a2207 | ||
|
|
f6d508af92 | ||
|
|
516a732b12 | ||
|
|
dfd4943304 | ||
|
|
511e08e7e9 | ||
|
|
ed50dfc145 | ||
|
|
ee542255a5 | ||
|
|
32fa9d4439 | ||
|
|
f2be3383ac | ||
|
|
fd6874e8dd | ||
|
|
09e514fa84 | ||
|
|
f4678f99ed | ||
|
|
4e9670acf6 | ||
|
|
fb097ca095 | ||
|
|
8f40d13f20 | ||
|
|
2aaef9ae54 | ||
|
|
a6d31638e2 | ||
|
|
f73aefce4e | ||
|
|
ff5131018b | ||
|
|
1c6c5042ae | ||
|
|
d770009e0d | ||
|
|
4a0b211f27 | ||
|
|
7dcf2ca33d | ||
|
|
95c15504d0 | ||
|
|
4e38625bde | ||
|
|
4a411f0483 | ||
|
|
95b6d901bf | ||
|
|
c9d74e25ac | ||
|
|
54aef24caf | ||
|
|
6050b1e25a | ||
|
|
b54cef2702 | ||
|
|
abb2c8110c | ||
|
|
f1e8d633fc | ||
|
|
c4f60942b5 | ||
|
|
abbaf12e9e | ||
|
|
04e6601d5b | ||
|
|
1ebc7d27d4 | ||
|
|
59d53a02b3 | ||
|
|
370da5aee3 | ||
|
|
af2992eee9 | ||
|
|
e17b8b813c | ||
|
|
9b4e0dd0d9 | ||
|
|
d7bc1c75da | ||
|
|
b963b99a4c | ||
|
|
9270e22f19 | ||
|
|
7df34890d4 | ||
|
|
36b0661e1d | ||
|
|
6da50b576f | ||
|
|
517491e507 | ||
|
|
82aca1f77f | ||
|
|
8c4f657aa7 | ||
|
|
4352762e93 | ||
|
|
ad0ea09be9 | ||
|
|
52c6fe34b2 | ||
|
|
b6ccb9fbdb | ||
|
|
f83ab6ecc1 | ||
|
|
1af0f426ae | ||
|
|
d960947258 | ||
|
|
f2735ba22b | ||
|
|
aa4c02ef30 | ||
|
|
f1fbf0d120 | ||
|
|
63a362a48a | ||
|
|
e0d7341139 | ||
|
|
5f5b06683a | ||
|
|
42523bbfc9 | ||
|
|
0a344731c8 | ||
|
|
e83fa89ec4 | ||
|
|
13cd7a1c0f | ||
|
|
0e23a41bdb | ||
|
|
e17b320dc8 | ||
|
|
403038a5b2 | ||
|
|
430e1d7d4e | ||
|
|
c44cd7ffab | ||
|
|
73dfb523ec | ||
|
|
21d57735c9 | ||
|
|
05e13e6078 | ||
|
|
5f6844eceb | ||
|
|
bea1a592d7 | ||
|
|
b54cdf6425 | ||
|
|
02da2114f9 | ||
|
|
a67533a778 | ||
|
|
59ad834c12 | ||
|
|
315d5b370e | ||
|
|
130813ffe4 | ||
|
|
65ddb7c9e2 | ||
|
|
dbe29e15ae | ||
|
|
980b3c634b | ||
|
|
457d8c93ce | ||
|
|
23aad6358c | ||
|
|
7c896361f2 | ||
|
|
5b7f5738e3 | ||
|
|
5bfcb80c98 | ||
|
|
b1278b45e2 | ||
|
|
e7ae76ea48 | ||
|
|
e84e5e2910 | ||
|
|
5e6f5bc175 | ||
|
|
d577978f2f | ||
|
|
e30728e8e9 | ||
|
|
29368d9cc4 | ||
|
|
4776da7aea | ||
|
|
87518b1fbd | ||
|
|
d7deb5a3f8 | ||
|
|
445ec18bb4 | ||
|
|
3ecc289e1a | ||
|
|
805e1c2d7d | ||
|
|
58286013c9 | ||
|
|
1afdc400a8 | ||
|
|
f6d526741b | ||
|
|
c9b21f862e | ||
|
|
4ae7f6eca4 | ||
|
|
c9fdf862a3 | ||
|
|
cf97c2247c | ||
|
|
9c95c56f0a | ||
|
|
9f3aca5a3f | ||
|
|
dd87779476 | ||
|
|
2e7078e90b | ||
|
|
6b52b61604 | ||
|
|
41e2643755 | ||
|
|
170b4d338d | ||
|
|
ecd506c714 | ||
|
|
e6aadc4902 | ||
|
|
ae74e0d71c | ||
|
|
d6db8c23ce | ||
|
|
dcf7afa441 | ||
|
|
185c93100b | ||
|
|
cf68420976 | ||
|
|
dea3b756f1 | ||
|
|
825b19c634 | ||
|
|
8d59c35bc9 | ||
|
|
06ec8dd4f3 | ||
|
|
fc4ec3261f | ||
|
|
663716ca0f | ||
|
|
6c4ce585d6 | ||
|
|
0acf30db61 | ||
|
|
db9035f92c | ||
|
|
a475afd570 | ||
|
|
57ca357969 | ||
|
|
cac099eeb3 | ||
|
|
c0929634a9 | ||
|
|
52de8afe2d | ||
|
|
2809b87ab0 | ||
|
|
7aab87813c | ||
|
|
4a67fffccd | ||
|
|
12b7625d42 | ||
|
|
275e1dc85c | ||
|
|
3a8e814315 | ||
|
|
07ebd1e613 | ||
|
|
a626330139 | ||
|
|
5ac7645350 | ||
|
|
efc6064605 | ||
|
|
71a6f32665 | ||
|
|
d60c4c179b | ||
|
|
c5c8c59168 | ||
|
|
fca75c5c07 | ||
|
|
012142feec | ||
|
|
d532395d89 | ||
|
|
b25f9f2cdf | ||
|
|
5471e742f0 | ||
|
|
c5849b2a74 | ||
|
|
429b2adf98 | ||
|
|
df366cd82a | ||
|
|
0a4bb583ff | ||
|
|
dfb650c4b1 | ||
|
|
aa4527e5f7 | ||
|
|
ae8ea16dab | ||
|
|
d321c69244 | ||
|
|
478a4e5d73 | ||
|
|
44cd2fef1c | ||
|
|
0abe8b1921 | ||
|
|
4a13714177 | ||
|
|
ac3514f4c6 | ||
|
|
f9b71f4b4c | ||
|
|
7ca50b63f9 | ||
|
|
62adc920a9 | ||
|
|
eeda71e186 | ||
|
|
8e5ea1df5e | ||
|
|
0bf3aed287 | ||
|
|
74d6f58363 | ||
|
|
3d4405cd42 | ||
|
|
98c8694979 | ||
|
|
32812d6a6c | ||
|
|
1f8d7c0b21 | ||
|
|
8b88f6892c | ||
|
|
618c567392 | ||
|
|
fb44451c6f | ||
|
|
9e1edbacb6 | ||
|
|
f45d02299a | ||
|
|
7afd7b2334 | ||
|
|
0a28d36df9 | ||
|
|
2c1185e1d4 | ||
|
|
69bbf9fdcc | ||
|
|
38125fa362 | ||
|
|
5db7a735d7 | ||
|
|
4d2363ea22 | ||
|
|
994940f270 | ||
|
|
3adb324b25 | ||
|
|
fbfc5b31d6 | ||
|
|
2a016ecce9 | ||
|
|
782d4ec180 | ||
|
|
8c52448da2 | ||
|
|
7e194887f5 | ||
|
|
806a1b9392 | ||
|
|
d575a3b222 | ||
|
|
f61fdb8623 | ||
|
|
ea7005e822 | ||
|
|
a7775ea7ef | ||
|
|
ba4eddccd9 | ||
|
|
6fcda5e446 | ||
|
|
34d742963a | ||
|
|
59cd68d54a | ||
|
|
1e4dbe4e95 | ||
|
|
5d89d53a4a | ||
|
|
349ccbad6f | ||
|
|
5d68620382 | ||
|
|
cb06c8a877 | ||
|
|
7d57fdcd96 | ||
|
|
fa60d81e26 | ||
|
|
6c4294dc49 | ||
|
|
0a3542e97c | ||
|
|
83887e3c37 | ||
|
|
5fe29cdd93 | ||
|
|
f618c45767 | ||
|
|
e1a87b32d9 | ||
|
|
9e739c8b35 | ||
|
|
d6fab197e7 | ||
|
|
89a5326d3f | ||
|
|
f0b542c990 | ||
|
|
c1a3516b37 | ||
|
|
db467105b9 | ||
|
|
2b5372f693 | ||
|
|
1a2ff9540f | ||
|
|
28fdc8a9ac | ||
|
|
b0ce1483fe | ||
|
|
ad251b2449 | ||
|
|
0ebc2a746b | ||
|
|
9c6e3ebe5b | ||
|
|
1b404ee6d8 | ||
|
|
72052be92f | ||
|
|
f2e7deb5cb | ||
|
|
b2e0c51ead | ||
|
|
3d73e7498f | ||
|
|
690f595491 | ||
|
|
058d968833 | ||
|
|
da2adaa694 | ||
|
|
fb9be66f97 | ||
|
|
0a446928d7 | ||
|
|
dc01ff36dc | ||
|
|
2d90ae903b | ||
|
|
d324c6ac57 | ||
|
|
aebf229b86 | ||
|
|
3c76a82997 | ||
|
|
30ec65f43c | ||
|
|
2471c7b08e | ||
|
|
4be23ccffb | ||
|
|
99db24cdec | ||
|
|
719a33352a | ||
|
|
fe3bd95c85 | ||
|
|
8db08c21e5 | ||
|
|
a384e6716d | ||
|
|
e35b2e9fbf | ||
|
|
b48c2ab736 | ||
|
|
a12ee536d9 | ||
|
|
97d5439a4f | ||
|
|
c94a1d7c17 | ||
|
|
0ce05c781c | ||
|
|
0e0dfbf014 | ||
|
|
ae03e61bb9 | ||
|
|
f6167b1d81 | ||
|
|
df75cb4034 | ||
|
|
67313f8f03 | ||
|
|
39eab01885 | ||
|
|
9fb63a00fd | ||
|
|
f945cb8d2d | ||
|
|
7a107584c7 | ||
|
|
248459671e | ||
|
|
67e48c2fd1 | ||
|
|
368d25fa01 | ||
|
|
12b1d29413 | ||
|
|
dccc676b24 | ||
|
|
d9c1cf8bec | ||
|
|
0836c303d9 | ||
|
|
a43fd6b7fc | ||
|
|
e7ee189fbb | ||
|
|
b6708613b9 | ||
|
|
3317e061a8 | ||
|
|
0dc8584485 | ||
|
|
673ad6d42b | ||
|
|
1450d6fc4c | ||
|
|
b082242439 | ||
|
|
de69a3ca86 | ||
|
|
96e37b3ee1 | ||
|
|
cb2d8a9a50 | ||
|
|
19c5b7c7ab | ||
|
|
38a4215b35 | ||
|
|
77a05c754e | ||
|
|
2226d7cbf9 | ||
|
|
c1a2c7d485 | ||
|
|
8127f48924 | ||
|
|
a0e7f85c32 | ||
|
|
b45ffd2046 | ||
|
|
ef4f6245d5 | ||
|
|
7bd1c8ef14 | ||
|
|
5d049d5696 | ||
|
|
704d0a8392 | ||
|
|
12547feb4c | ||
|
|
7dbc031725 | ||
|
|
70ce34d6c9 | ||
|
|
dff351a8eb | ||
|
|
abf4b7706f | ||
|
|
813a124250 | ||
|
|
7299c9ec9a | ||
|
|
3a0e4ff119 | ||
|
|
9cc59e81d6 | ||
|
|
a04b6983e7 | ||
|
|
6beea06a41 | ||
|
|
e75b5f2f15 | ||
|
|
c9acc48bd6 | ||
|
|
f4df68a9e2 | ||
|
|
4cee8ea879 | ||
|
|
e7f5a4adff | ||
|
|
0301713214 | ||
|
|
5ef23e0330 | ||
|
|
88529457bf | ||
|
|
890b5d93a7 | ||
|
|
7dafa6c7fe | ||
|
|
8d2d571683 | ||
|
|
19e776a772 | ||
|
|
f77649abc8 | ||
|
|
33870dc845 | ||
|
|
265313919c | ||
|
|
dd5d1b9cba |
@@ -30,7 +30,6 @@
|
||||
"dbaeumer.vscode-eslint",
|
||||
"matangover.mypy",
|
||||
"ms-python.black-formatter",
|
||||
"ms-python.isort",
|
||||
"ms-python.pylint",
|
||||
"ms-python.python",
|
||||
"ms-python.vscode-pylance",
|
||||
@@ -42,6 +41,7 @@
|
||||
"forwardPorts": [
|
||||
3000,
|
||||
9000,
|
||||
9091, // used by docker production
|
||||
24678 // used by nuxt when hot-reloading using polling
|
||||
],
|
||||
// Use 'onCreateCommand' to run commands at the end of container creation.
|
||||
|
||||
9
.github/DISCUSSION_TEMPLATE/oauth-provider-example.yaml
vendored
Normal file
9
.github/DISCUSSION_TEMPLATE/oauth-provider-example.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: OAuth setup with <PROVIDER>
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Configuration Example
|
||||
description: Add your example configuration. You can provide code blocks, screenshots, and links.
|
||||
validations:
|
||||
required: true
|
||||
12
.github/ISSUE_TEMPLATE/task.yaml
vendored
12
.github/ISSUE_TEMPLATE/task.yaml
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: v1.0.0b Task
|
||||
name: Task
|
||||
description: "CONTRIBUTORS ONLY: Submit a Task that needs to be completed"
|
||||
title: "[v1.0.0b] [Task] - TASK DESCRIPTION"
|
||||
title: "[Task] - TASK DESCRIPTION"
|
||||
labels:
|
||||
- task
|
||||
- v1
|
||||
@@ -11,17 +11,17 @@ body:
|
||||
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.
|
||||
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 improving 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 are a contributor 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.
|
||||
If you're interested in completing this task 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:
|
||||
@@ -33,6 +33,6 @@ body:
|
||||
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
|
||||
placeholder: Provide as much context around the idea as possible with potential files and roadblocks that may come up.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
46
.github/workflows/e2e.yml
vendored
Normal file
46
.github/workflows/e2e.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: E2E Tests
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- mealie-next
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./tests/e2e
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: ./tests/e2e/yarn.lock
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build Image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: ./docker/Dockerfile
|
||||
context: .
|
||||
push: false
|
||||
load: true
|
||||
tags: mealie:e2e
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Deploy E2E Test Environment
|
||||
run: docker compose up -d
|
||||
working-directory: ./tests/e2e/docker
|
||||
- name: Install dependencies
|
||||
run: npm install -g yarn && yarn
|
||||
- name: Install Playwright Browsers
|
||||
run: yarn playwright install --with-deps
|
||||
- name: Check test environment
|
||||
run: docker ps
|
||||
- name: Run Playwright tests
|
||||
run: yarn playwright test
|
||||
- name: Destroy Test Environment
|
||||
if: always()
|
||||
run: docker compose down --volumes
|
||||
working-directory: ./tests/e2e/docker
|
||||
13
.github/workflows/nightly.yml
vendored
13
.github/workflows/nightly.yml
vendored
@@ -4,6 +4,12 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- mealie-next
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- '.devcontainer/**'
|
||||
# I'm not excluding .github as changes in there might be to workflows etc
|
||||
- '.vscode/**'
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: nightly-${{ github.ref }}
|
||||
@@ -22,7 +28,13 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
# The id-token write permission is needed to connect to Depot.dev
|
||||
# as part of the partial-builder.yml action. It needs to be declared
|
||||
# in the parent action, as noted here:
|
||||
# https://github.com/orgs/community/discussions/76409#discussioncomment-8131390
|
||||
id-token: write
|
||||
name: Build Tagged Release
|
||||
if: github.repository == 'mealie-recipes/mealie'
|
||||
uses: ./.github/workflows/partial-builder.yml
|
||||
needs:
|
||||
- frontend-tests
|
||||
@@ -35,6 +47,7 @@ jobs:
|
||||
|
||||
notify-discord:
|
||||
name: Notify Discord
|
||||
if: github.repository == 'mealie-recipes/mealie'
|
||||
needs:
|
||||
- build-release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
6
.github/workflows/partial-backend.yml
vendored
6
.github/workflows/partial-backend.yml
vendored
@@ -66,7 +66,7 @@ jobs:
|
||||
id: cache-validate
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
echo "import black;print('venv good?')" > test.py && poetry run python test.py && echo "cache-hit-success=true" >> $GITHUB_OUTPUT
|
||||
echo "import fastapi;print('venv good?')" > test.py && poetry run python test.py && echo "cache-hit-success=true" >> $GITHUB_OUTPUT
|
||||
rm test.py
|
||||
continue-on-error: true
|
||||
|
||||
@@ -78,9 +78,9 @@ jobs:
|
||||
poetry add "psycopg2-binary==2.9.9"
|
||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' || steps.cache-validate.outputs.cache-hit-success != 'true'
|
||||
|
||||
- name: Formatting (Black)
|
||||
- name: Formatting (Ruff)
|
||||
run: |
|
||||
poetry run black . --check
|
||||
poetry run ruff format . --check
|
||||
|
||||
- name: Lint (Ruff)
|
||||
run: |
|
||||
|
||||
16
.github/workflows/partial-builder.yml
vendored
16
.github/workflows/partial-builder.yml
vendored
@@ -35,19 +35,16 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Override __init__.py
|
||||
run: |
|
||||
echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
- uses: depot/setup-action@v1
|
||||
|
||||
- name: Build and push Docker image, via Depot.dev
|
||||
uses: depot/build-push-action@v1
|
||||
with:
|
||||
project: srzjb6mhzm
|
||||
file: ./docker/Dockerfile
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -58,6 +55,3 @@ jobs:
|
||||
${{ inputs.tags }}
|
||||
build-args: |
|
||||
COMMIT=${{ github.sha }}
|
||||
# https://docs.docker.com/build/ci/github-actions/cache/#github-cache
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -17,6 +17,11 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
# The id-token write permission is needed to connect to Depot.dev
|
||||
# as part of the partial-builder.yml action. It needs to be declared
|
||||
# in the parent action, as noted here:
|
||||
# https://github.com/orgs/community/discussions/76409#discussioncomment-8131390
|
||||
id-token: write
|
||||
name: Build Tagged Release
|
||||
uses: ./.github/workflows/partial-builder.yml
|
||||
needs:
|
||||
@@ -51,6 +56,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout 🛎
|
||||
uses: actions/checkout@v4
|
||||
@@ -60,11 +66,15 @@ jobs:
|
||||
sed -i 's/:v[0-9]*.[0-9]*.[0-9]*/:${{ github.event.release.tag_name }}/' docs/docs/documentation/getting-started/installation/sqlite.md
|
||||
sed -i 's/:v[0-9]*.[0-9]*.[0-9]*/:${{ github.event.release.tag_name }}/' docs/docs/documentation/getting-started/installation/postgres.md
|
||||
|
||||
- name: Commit updates
|
||||
uses: test-room-7/action-update-file@v1
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
# This doesn't currently work for us because it creates the PR but the workflows don't run.
|
||||
# TODO: Provide a personal access token as a parameter here, that solves that problem.
|
||||
# https://github.com/peter-evans/create-pull-request
|
||||
with:
|
||||
file-path: |
|
||||
docs/docs/documentation/getting-started/installation/sqlite.md
|
||||
docs/docs/documentation/getting-started/installation/postgres.md
|
||||
commit-msg: "Change image tag, for release ${{ github.event.release.tag_name }}"
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "Update image tag, for release ${{ github.event.release.tag_name }}"
|
||||
branch: "docs/newrelease-update-version-${{ github.event.release.tag_name }}"
|
||||
delete-branch: true
|
||||
base: mealie-next
|
||||
title: "docs(auto): Update image tag, for release ${{ github.event.release.tag_name }}"
|
||||
body: "Auto-generated by `.github/workflows/release.yml`, on publish of release ${{ github.event.release.tag_name }}"
|
||||
|
||||
@@ -10,7 +10,8 @@ repos:
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
exclude: ^tests/data/
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.1.0
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.3.5
|
||||
hooks:
|
||||
- id: black
|
||||
- id: ruff-format
|
||||
|
||||
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -60,8 +60,5 @@
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.formatOnSave": false
|
||||
},
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
10
.vscode/tasks.json
vendored
10
.vscode/tasks.json
vendored
@@ -24,16 +24,6 @@
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Init Database",
|
||||
"command": "poetry run python mealie/db/init_db.py",
|
||||
"type": "shell",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"group": "groupA"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Dev: Start Frontend",
|
||||
"command": "task ui",
|
||||
|
||||
@@ -71,12 +71,9 @@ Distributed under the AGPL License. See `LICENSE` for more information.
|
||||
|
||||
Huge thanks to all the sponsors of this project on [Github Sponsors](https://github.com/sponsors/hay-kot) and Buy Me a Coffee. Without you, this project would surely not be possible.
|
||||
|
||||
Thanks to Linode for providing Hosting for the Demo, Beta, and Documentation sites! Another big thanks to JetBrains for providing their IDEs for development.
|
||||
Thanks to Depot for providing build instances for our Docker image builds.
|
||||
|
||||
<div align='center'>
|
||||
<img height="100" src="docs/docs/assets/img/sponsors-linode.svg" />
|
||||
<img height="100" src="docs/docs/assets/img/sponsors-jetbrains.png" />
|
||||
</div>
|
||||
[](https://depot.dev?utm_source=Mealie)
|
||||
|
||||
|
||||
|
||||
|
||||
15
Taskfile.yml
15
Taskfile.yml
@@ -14,7 +14,9 @@ env:
|
||||
SMTP_HOST: localhost
|
||||
SMTP_PORT: 1025
|
||||
SMTP_FROM_NAME: MealieDev
|
||||
SMTP_FROM_EMAIL: mealie@example.com
|
||||
SMTP_AUTH_STRATEGY: NONE
|
||||
BASE_URL: http://localhost:3000
|
||||
LANG: en-US
|
||||
|
||||
# loads .env file if it exists
|
||||
@@ -72,6 +74,7 @@ tasks:
|
||||
desc: run code generators
|
||||
cmds:
|
||||
- poetry run python dev/code-generation/main.py
|
||||
- task: py:format
|
||||
|
||||
dev:services:
|
||||
desc: starts postgres and mailpit containers
|
||||
@@ -103,12 +106,12 @@ tasks:
|
||||
py:format:
|
||||
desc: runs python code formatter
|
||||
cmds:
|
||||
- poetry run black mealie
|
||||
- poetry run ruff format .
|
||||
|
||||
py:lint:
|
||||
desc: runs python linter
|
||||
cmds:
|
||||
- poetry run ruff mealie
|
||||
- poetry run ruff check mealie
|
||||
|
||||
py:check:
|
||||
desc: runs all linters, type checkers, and formatters
|
||||
@@ -130,7 +133,6 @@ tasks:
|
||||
py:
|
||||
desc: runs the backend server
|
||||
cmds:
|
||||
- poetry run python mealie/db/init_db.py
|
||||
- poetry run python mealie/app.py
|
||||
|
||||
py:postgres:
|
||||
@@ -143,9 +145,14 @@ tasks:
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: mealie
|
||||
cmds:
|
||||
- poetry run python mealie/db/init_db.py
|
||||
- poetry run python mealie/app.py
|
||||
|
||||
py:migrate:
|
||||
desc: generates a new migration file e.g. task py:migrate:generate "add new column"
|
||||
cmds:
|
||||
- poetry run alembic revision --autogenerate -m "{{ .CLI_ARGS }}"
|
||||
- task: py:format
|
||||
|
||||
ui:build:
|
||||
desc: builds the frontend in frontend/dist
|
||||
dir: frontend
|
||||
|
||||
12
alembic.ini
12
alembic.ini
@@ -58,15 +58,3 @@ sqlalchemy.url =
|
||||
# post_write_hooks defines scripts or Python functions that are run
|
||||
# on newly generated revision scripts. See the documentation for further
|
||||
# detail and examples
|
||||
|
||||
hooks = isort, black
|
||||
|
||||
# format using "isort" - use the console_scripts runner, against the "isort" entrypoint
|
||||
isort.type = console_scripts
|
||||
isort.entrypoint = isort
|
||||
isort.options = REVISION_SCRIPT_FILENAME
|
||||
|
||||
# format using "black" - use the console_scripts runner, against the "black" entrypoint
|
||||
black.type = console_scripts
|
||||
black.entrypoint = black
|
||||
black.options = REVISION_SCRIPT_FILENAME
|
||||
|
||||
@@ -22,7 +22,11 @@ target_metadata = SqlAlchemyBase.metadata
|
||||
|
||||
# Set DB url from config
|
||||
settings = get_app_settings()
|
||||
config.set_main_option("sqlalchemy.url", settings.DB_URL)
|
||||
|
||||
if not settings.DB_URL:
|
||||
raise Exception("DB URL not set in config")
|
||||
|
||||
config.set_main_option("sqlalchemy.url", settings.DB_URL.replace("%", "%%"))
|
||||
|
||||
|
||||
def run_migrations_offline():
|
||||
|
||||
@@ -9,7 +9,7 @@ Create Date: 2023-21-02 22:03:19.837244
|
||||
from uuid import uuid4
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.orm.session import Session
|
||||
from sqlalchemy import orm
|
||||
|
||||
import mealie.db.migration_types
|
||||
from alembic import op
|
||||
@@ -23,8 +23,10 @@ branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def populate_shopping_lists_multi_purpose_labels(shopping_lists_multi_purpose_labels_table: sa.Table, session: Session):
|
||||
shopping_lists = session.query(ShoppingList).all()
|
||||
def populate_shopping_lists_multi_purpose_labels(
|
||||
shopping_lists_multi_purpose_labels_table: sa.Table, session: orm.Session
|
||||
):
|
||||
shopping_lists = session.query(ShoppingList).options(orm.load_only(ShoppingList.id, ShoppingList.group_id)).all()
|
||||
|
||||
shopping_lists_labels_data: list[dict] = []
|
||||
for shopping_list in shopping_lists:
|
||||
@@ -60,7 +62,7 @@ def upgrade():
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
session = Session(bind=op.get_bind())
|
||||
session = orm.Session(bind=op.get_bind())
|
||||
populate_shopping_lists_multi_purpose_labels(shopping_lists_multi_purpose_labels_table, session)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
"""added user to shopping list
|
||||
|
||||
Revision ID: 2298bb460ffd
|
||||
Revises: ba1e4a6cfe99
|
||||
Create Date: 2024-02-23 16:15:07.115641
|
||||
|
||||
"""
|
||||
|
||||
from uuid import UUID
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
|
||||
import mealie.db.migration_types
|
||||
from alembic import op
|
||||
from mealie.core.root_logger import get_logger
|
||||
|
||||
logger = get_logger()
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "2298bb460ffd"
|
||||
down_revision = "ba1e4a6cfe99"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def is_postgres():
|
||||
return op.get_context().dialect.name == "postgresql"
|
||||
|
||||
|
||||
def find_user_id_for_group(group_id: UUID):
|
||||
bind = op.get_bind()
|
||||
session = orm.Session(bind=bind)
|
||||
|
||||
if is_postgres():
|
||||
stmt = "SELECT id FROM users WHERE group_id=:group_id AND admin = TRUE LIMIT 1"
|
||||
else:
|
||||
stmt = "SELECT id FROM users WHERE group_id=:group_id AND admin = 1 LIMIT 1"
|
||||
|
||||
with session:
|
||||
try:
|
||||
# try to find an admin user
|
||||
return session.execute(sa.text(stmt).bindparams(group_id=group_id)).scalar_one()
|
||||
except orm.exc.NoResultFound:
|
||||
pass
|
||||
|
||||
try:
|
||||
# fallback to any user
|
||||
return session.execute(
|
||||
sa.text("SELECT id FROM users WHERE group_id=:group_id LIMIT 1").bindparams(group_id=group_id)
|
||||
).scalar_one()
|
||||
except orm.exc.NoResultFound:
|
||||
pass
|
||||
|
||||
# no user could be found
|
||||
return None
|
||||
|
||||
|
||||
def populate_shopping_list_users():
|
||||
bind = op.get_bind()
|
||||
session = orm.Session(bind=bind)
|
||||
|
||||
with session:
|
||||
list_ids_and_group_ids = session.execute(sa.text("SELECT id, group_id FROM shopping_lists")).all()
|
||||
for list_id, group_id in list_ids_and_group_ids:
|
||||
user_id = find_user_id_for_group(group_id)
|
||||
if user_id:
|
||||
session.execute(
|
||||
sa.text(f"UPDATE shopping_lists SET user_id=:user_id WHERE id=:id").bindparams(
|
||||
user_id=user_id, id=list_id
|
||||
)
|
||||
)
|
||||
else:
|
||||
logger.warning(
|
||||
f"No user found for shopping list {list_id} with group {group_id}; deleting shopping list"
|
||||
)
|
||||
session.execute(sa.text(f"DELETE FROM shopping_lists WHERE id=:id").bindparams(id=list_id))
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("shopping_lists") as batch_op:
|
||||
# allow nulls during migration
|
||||
batch_op.add_column(sa.Column("user_id", mealie.db.migration_types.GUID(), nullable=True))
|
||||
batch_op.create_index(op.f("ix_shopping_lists_user_id"), ["user_id"], unique=False)
|
||||
batch_op.create_foreign_key("fk_user_shopping_lists", "users", ["user_id"], ["id"])
|
||||
# ### end Alembic commands ###
|
||||
|
||||
populate_shopping_list_users()
|
||||
|
||||
# forbid nulls after migration
|
||||
with op.batch_alter_table("shopping_lists") as batch_op:
|
||||
batch_op.alter_column("user_id", nullable=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint(None, "shopping_lists", type_="foreignkey")
|
||||
op.drop_index(op.f("ix_shopping_lists_user_id"), table_name="shopping_lists")
|
||||
op.drop_column("shopping_lists", "user_id")
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,31 @@
|
||||
"""add OIDC auth method
|
||||
|
||||
Revision ID: 09aba125b57a
|
||||
Revises: 2298bb460ffd
|
||||
Create Date: 2024-03-10 05:08:32.397027
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
import mealie.db.migration_types
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "09aba125b57a"
|
||||
down_revision = "2298bb460ffd"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def is_postgres():
|
||||
return op.get_context().dialect.name == "postgresql"
|
||||
|
||||
|
||||
def upgrade():
|
||||
if is_postgres():
|
||||
op.execute("ALTER TYPE authmethod ADD VALUE 'OIDC'")
|
||||
|
||||
|
||||
def downgrade():
|
||||
pass
|
||||
@@ -0,0 +1,229 @@
|
||||
"""migrate favorites and ratings to user_ratings
|
||||
|
||||
Revision ID: d7c6efd2de42
|
||||
Revises: 09aba125b57a
|
||||
Create Date: 2024-03-18 02:28:15.896959
|
||||
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from textwrap import dedent
|
||||
from typing import Any
|
||||
from uuid import uuid4
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
|
||||
import mealie.db.migration_types
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "d7c6efd2de42"
|
||||
down_revision = "09aba125b57a"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def is_postgres():
|
||||
return op.get_context().dialect.name == "postgresql"
|
||||
|
||||
|
||||
def new_user_rating(user_id: Any, recipe_id: Any, rating: float | None = None, is_favorite: bool = False):
|
||||
if is_postgres():
|
||||
id = str(uuid4())
|
||||
else:
|
||||
id = "%.32x" % uuid4().int
|
||||
|
||||
now = datetime.now().isoformat()
|
||||
return {
|
||||
"id": id,
|
||||
"user_id": user_id,
|
||||
"recipe_id": recipe_id,
|
||||
"rating": rating,
|
||||
"is_favorite": is_favorite,
|
||||
"created_at": now,
|
||||
"update_at": now,
|
||||
}
|
||||
|
||||
|
||||
def migrate_user_favorites_to_user_ratings():
|
||||
bind = op.get_bind()
|
||||
session = orm.Session(bind=bind)
|
||||
|
||||
with session:
|
||||
user_ids_and_recipe_ids = session.execute(sa.text("SELECT user_id, recipe_id FROM users_to_favorites")).all()
|
||||
rows = [
|
||||
new_user_rating(user_id, recipe_id, is_favorite=True)
|
||||
for user_id, recipe_id in user_ids_and_recipe_ids
|
||||
if user_id and recipe_id
|
||||
]
|
||||
|
||||
if is_postgres():
|
||||
query = dedent(
|
||||
"""
|
||||
INSERT INTO users_to_recipes (id, user_id, recipe_id, rating, is_favorite, created_at, update_at)
|
||||
VALUES (:id, :user_id, :recipe_id, :rating, :is_favorite, :created_at, :update_at)
|
||||
ON CONFLICT DO NOTHING
|
||||
"""
|
||||
)
|
||||
else:
|
||||
query = dedent(
|
||||
"""
|
||||
INSERT OR IGNORE INTO users_to_recipes
|
||||
(id, user_id, recipe_id, rating, is_favorite, created_at, update_at)
|
||||
VALUES (:id, :user_id, :recipe_id, :rating, :is_favorite, :created_at, :update_at)
|
||||
"""
|
||||
)
|
||||
|
||||
for row in rows:
|
||||
session.execute(sa.text(query), row)
|
||||
|
||||
|
||||
def migrate_group_to_user_ratings(group_id: Any):
|
||||
bind = op.get_bind()
|
||||
session = orm.Session(bind=bind)
|
||||
|
||||
with session:
|
||||
user_ids = (
|
||||
session.execute(sa.text("SELECT id FROM users WHERE group_id=:group_id").bindparams(group_id=group_id))
|
||||
.scalars()
|
||||
.all()
|
||||
)
|
||||
|
||||
recipe_ids_ratings = session.execute(
|
||||
sa.text(
|
||||
"SELECT id, rating FROM recipes WHERE group_id=:group_id AND rating > 0 AND rating IS NOT NULL"
|
||||
).bindparams(group_id=group_id)
|
||||
).all()
|
||||
|
||||
# Convert recipe ratings to user ratings. Since we don't know who
|
||||
# rated the recipe initially, we copy the rating to all users.
|
||||
rows: list[dict] = []
|
||||
for recipe_id, rating in recipe_ids_ratings:
|
||||
for user_id in user_ids:
|
||||
rows.append(new_user_rating(user_id, recipe_id, rating, is_favorite=False))
|
||||
|
||||
if is_postgres():
|
||||
insert_query = dedent(
|
||||
"""
|
||||
INSERT INTO users_to_recipes (id, user_id, recipe_id, rating, is_favorite, created_at, update_at)
|
||||
VALUES (:id, :user_id, :recipe_id, :rating, :is_favorite, :created_at, :update_at)
|
||||
ON CONFLICT (user_id, recipe_id) DO NOTHING;
|
||||
"""
|
||||
)
|
||||
else:
|
||||
insert_query = dedent(
|
||||
"""
|
||||
INSERT OR IGNORE INTO users_to_recipes
|
||||
(id, user_id, recipe_id, rating, is_favorite, created_at, update_at)
|
||||
VALUES (:id, :user_id, :recipe_id, :rating, :is_favorite, :created_at, :update_at);
|
||||
"""
|
||||
)
|
||||
|
||||
update_query = dedent(
|
||||
"""
|
||||
UPDATE users_to_recipes
|
||||
SET rating = :rating, update_at = :update_at
|
||||
WHERE user_id = :user_id AND recipe_id = :recipe_id;
|
||||
"""
|
||||
)
|
||||
|
||||
# Create new user ratings with is_favorite set to False
|
||||
for row in rows:
|
||||
session.execute(sa.text(insert_query), row)
|
||||
|
||||
# Update existing user ratings with the correct rating
|
||||
for row in rows:
|
||||
session.execute(sa.text(update_query), row)
|
||||
|
||||
|
||||
def migrate_to_user_ratings():
|
||||
migrate_user_favorites_to_user_ratings()
|
||||
|
||||
bind = op.get_bind()
|
||||
session = orm.Session(bind=bind)
|
||||
|
||||
with session:
|
||||
group_ids = session.execute(sa.text("SELECT id FROM groups")).scalars().all()
|
||||
|
||||
for group_id in group_ids:
|
||||
migrate_group_to_user_ratings(group_id)
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"users_to_recipes",
|
||||
sa.Column("user_id", mealie.db.migration_types.GUID(), nullable=False),
|
||||
sa.Column("recipe_id", mealie.db.migration_types.GUID(), nullable=False),
|
||||
sa.Column("rating", sa.Float(), nullable=True),
|
||||
sa.Column("is_favorite", sa.Boolean(), nullable=False),
|
||||
sa.Column("id", mealie.db.migration_types.GUID(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=True),
|
||||
sa.Column("update_at", sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["recipe_id"],
|
||||
["recipes.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["users.id"],
|
||||
),
|
||||
sa.PrimaryKeyConstraint("user_id", "recipe_id", "id"),
|
||||
sa.UniqueConstraint("user_id", "recipe_id", name="user_id_recipe_id_rating_key"),
|
||||
)
|
||||
op.create_index(op.f("ix_users_to_recipes_created_at"), "users_to_recipes", ["created_at"], unique=False)
|
||||
op.create_index(op.f("ix_users_to_recipes_is_favorite"), "users_to_recipes", ["is_favorite"], unique=False)
|
||||
op.create_index(op.f("ix_users_to_recipes_rating"), "users_to_recipes", ["rating"], unique=False)
|
||||
op.create_index(op.f("ix_users_to_recipes_recipe_id"), "users_to_recipes", ["recipe_id"], unique=False)
|
||||
op.create_index(op.f("ix_users_to_recipes_user_id"), "users_to_recipes", ["user_id"], unique=False)
|
||||
|
||||
migrate_to_user_ratings()
|
||||
|
||||
if is_postgres():
|
||||
op.drop_index("ix_users_to_favorites_recipe_id", table_name="users_to_favorites")
|
||||
op.drop_index("ix_users_to_favorites_user_id", table_name="users_to_favorites")
|
||||
op.alter_column("recipes", "rating", existing_type=sa.INTEGER(), type_=sa.Float(), existing_nullable=True)
|
||||
else:
|
||||
op.execute("DROP INDEX IF EXISTS ix_users_to_favorites_recipe_id")
|
||||
op.execute("DROP INDEX IF EXISTS ix_users_to_favorites_user_id")
|
||||
with op.batch_alter_table("recipes") as batch_op:
|
||||
batch_op.alter_column("rating", existing_type=sa.INTEGER(), type_=sa.Float(), existing_nullable=True)
|
||||
|
||||
op.drop_table("users_to_favorites")
|
||||
op.create_index(op.f("ix_recipes_rating"), "recipes", ["rating"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column(
|
||||
"recipes_ingredients", "quantity", existing_type=sa.Float(), type_=sa.INTEGER(), existing_nullable=True
|
||||
)
|
||||
op.drop_index(op.f("ix_recipes_rating"), table_name="recipes")
|
||||
op.alter_column("recipes", "rating", existing_type=sa.Float(), type_=sa.INTEGER(), existing_nullable=True)
|
||||
op.create_unique_constraint("ingredient_units_name_group_id_key", "ingredient_units", ["name", "group_id"])
|
||||
op.create_unique_constraint("ingredient_foods_name_group_id_key", "ingredient_foods", ["name", "group_id"])
|
||||
op.create_table(
|
||||
"users_to_favorites",
|
||||
sa.Column("user_id", sa.CHAR(length=32), nullable=True),
|
||||
sa.Column("recipe_id", sa.CHAR(length=32), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["recipe_id"],
|
||||
["recipes.id"],
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["user_id"],
|
||||
["users.id"],
|
||||
),
|
||||
sa.UniqueConstraint("user_id", "recipe_id", name="user_id_recipe_id_key"),
|
||||
)
|
||||
op.create_index("ix_users_to_favorites_user_id", "users_to_favorites", ["user_id"], unique=False)
|
||||
op.create_index("ix_users_to_favorites_recipe_id", "users_to_favorites", ["recipe_id"], unique=False)
|
||||
op.drop_index(op.f("ix_users_to_recipes_user_id"), table_name="users_to_recipes")
|
||||
op.drop_index(op.f("ix_users_to_recipes_recipe_id"), table_name="users_to_recipes")
|
||||
op.drop_index(op.f("ix_users_to_recipes_rating"), table_name="users_to_recipes")
|
||||
op.drop_index(op.f("ix_users_to_recipes_is_favorite"), table_name="users_to_recipes")
|
||||
op.drop_index(op.f("ix_users_to_recipes_created_at"), table_name="users_to_recipes")
|
||||
op.drop_table("users_to_recipes")
|
||||
# ### end Alembic commands ###
|
||||
@@ -3,8 +3,8 @@ from pathlib import Path
|
||||
|
||||
from fastapi import FastAPI
|
||||
from jinja2 import Template
|
||||
from pydantic import BaseModel
|
||||
from utils import PROJECT_DIR, CodeTemplates, HTTPRequest, RouteObject
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from utils import PROJECT_DIR, CodeTemplates, HTTPRequest, RouteObject, RequestType
|
||||
|
||||
CWD = Path(__file__).parent
|
||||
|
||||
@@ -12,23 +12,25 @@ OUTFILE = PROJECT_DIR / "tests" / "utils" / "api_routes" / "__init__.py"
|
||||
|
||||
|
||||
class PathObject(BaseModel):
|
||||
model_config = ConfigDict(arbitrary_types_allowed=True)
|
||||
route_object: RouteObject
|
||||
http_verbs: list[HTTPRequest]
|
||||
|
||||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
|
||||
|
||||
def get_path_objects(app: FastAPI):
|
||||
paths = []
|
||||
|
||||
for key, value in app.openapi().items():
|
||||
if key == "paths":
|
||||
for key, value in value.items():
|
||||
for key, value2 in value.items():
|
||||
verbs = []
|
||||
for k, v in value2.items():
|
||||
verbs.append(HTTPRequest(request_type=k, **v))
|
||||
|
||||
paths.append(
|
||||
PathObject(
|
||||
route_object=RouteObject(key),
|
||||
http_verbs=[HTTPRequest(request_type=k, **v) for k, v in value.items()],
|
||||
http_verbs=verbs,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
import dotenv
|
||||
import requests
|
||||
from jinja2 import Template
|
||||
from pydantic import Extra
|
||||
from pydantic import ConfigDict
|
||||
from requests import Response
|
||||
from utils import CodeDest, CodeKeys, inject_inline, log
|
||||
|
||||
@@ -56,7 +56,7 @@ LOCALE_DATA: dict[str, LocaleData] = {
|
||||
"zh-TW": LocaleData(name="繁體中文 (Chinese traditional)"),
|
||||
}
|
||||
|
||||
LOCALE_TEMPLATE = """// This Code is auto generated by gen_global_components.py
|
||||
LOCALE_TEMPLATE = """// This Code is auto generated by gen_ts_locales.py
|
||||
export const LOCALES = [{% for locale in locales %}
|
||||
{
|
||||
name: "{{ locale.name }}",
|
||||
@@ -70,6 +70,8 @@ export const LOCALES = [{% for locale in locales %}
|
||||
|
||||
|
||||
class TargetLanguage(MealieModel):
|
||||
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
||||
|
||||
id: str
|
||||
name: str
|
||||
locale: str
|
||||
@@ -78,10 +80,6 @@ class TargetLanguage(MealieModel):
|
||||
twoLettersCode: str
|
||||
progress: float = 0.0
|
||||
|
||||
class Config:
|
||||
extra = Extra.allow
|
||||
allow_population_by_field_name = True
|
||||
|
||||
|
||||
class CrowdinApi:
|
||||
project_name = "Mealie"
|
||||
@@ -152,6 +150,7 @@ PROJECT_DIR = Path(__file__).parent.parent.parent
|
||||
datetime_dir = PROJECT_DIR / "frontend" / "lang" / "dateTimeFormats"
|
||||
locales_dir = PROJECT_DIR / "frontend" / "lang" / "messages"
|
||||
nuxt_config = PROJECT_DIR / "frontend" / "nuxt.config.js"
|
||||
reg_valid = PROJECT_DIR / "mealie" / "schema" / "_mealie" / "validators.py"
|
||||
|
||||
"""
|
||||
This snippet walks the message and dat locales directories and generates the import information
|
||||
@@ -175,6 +174,19 @@ def inject_nuxt_values():
|
||||
inject_inline(nuxt_config, CodeKeys.nuxt_local_dates, all_date_locales)
|
||||
|
||||
|
||||
def inject_registration_validation_values():
|
||||
all_langs = []
|
||||
for match in locales_dir.glob("*.json"):
|
||||
lang_string = f'"{match.stem}",'
|
||||
all_langs.append(lang_string)
|
||||
|
||||
# sort
|
||||
all_langs.sort()
|
||||
|
||||
log.debug(f"injecting locales into user registration validation -> {reg_valid}")
|
||||
inject_inline(reg_valid, CodeKeys.nuxt_local_messages, all_langs)
|
||||
|
||||
|
||||
def generate_locales_ts_file():
|
||||
api = CrowdinApi("")
|
||||
models = api.get_languages()
|
||||
@@ -193,6 +205,7 @@ def main():
|
||||
|
||||
generate_locales_ts_file()
|
||||
inject_nuxt_values()
|
||||
inject_registration_validation_values()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -6,7 +6,7 @@ from utils import log
|
||||
|
||||
# ============================================================
|
||||
|
||||
template = """// This Code is auto generated by gen_global_components.py
|
||||
template = """// This Code is auto generated by gen_ts_types.py
|
||||
{% for name in global %}import {{ name }} from "@/components/global/{{ name }}.vue";
|
||||
{% endfor %}{% for name in layout %}import {{ name }} from "@/components/layout/{{ name }}.vue";
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import re
|
||||
from enum import Enum
|
||||
from typing import Optional
|
||||
|
||||
from humps import camelize
|
||||
from pydantic import BaseModel, Extra, Field
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from slugify import slugify
|
||||
|
||||
|
||||
@@ -34,33 +33,30 @@ class ParameterIn(str, Enum):
|
||||
|
||||
|
||||
class RouterParameter(BaseModel):
|
||||
model_config = ConfigDict(extra="allow")
|
||||
|
||||
required: bool = False
|
||||
name: str
|
||||
location: ParameterIn = Field(..., alias="in")
|
||||
|
||||
class Config:
|
||||
extra = Extra.allow
|
||||
|
||||
|
||||
class RequestBody(BaseModel):
|
||||
required: bool = False
|
||||
model_config = ConfigDict(extra="allow")
|
||||
|
||||
class Config:
|
||||
extra = Extra.allow
|
||||
required: bool = False
|
||||
|
||||
|
||||
class HTTPRequest(BaseModel):
|
||||
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
||||
|
||||
request_type: RequestType
|
||||
description: str = ""
|
||||
summary: str
|
||||
requestBody: Optional[RequestBody]
|
||||
request_body: RequestBody | None = None
|
||||
|
||||
parameters: list[RouterParameter] = []
|
||||
tags: list[str] | None = []
|
||||
|
||||
class Config:
|
||||
extra = Extra.allow
|
||||
|
||||
def list_as_js_object_string(self, parameters, braces=True):
|
||||
if len(parameters) == 0:
|
||||
return ""
|
||||
@@ -71,11 +67,11 @@ class HTTPRequest(BaseModel):
|
||||
return ", ".join(parameters)
|
||||
|
||||
def payload(self):
|
||||
return "payload" if self.requestBody else ""
|
||||
return "payload" if self.request_body else ""
|
||||
|
||||
def function_args(self):
|
||||
all_params = [p.name for p in self.parameters]
|
||||
if self.requestBody:
|
||||
if self.request_body:
|
||||
all_params.append("payload")
|
||||
return self.list_as_js_object_string(all_params)
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ import re
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
import black
|
||||
import isort
|
||||
from jinja2 import Template
|
||||
from rich.logging import RichHandler
|
||||
|
||||
@@ -23,10 +21,7 @@ def render_python_template(template_file: Path | str, dest: Path, data: dict):
|
||||
|
||||
text = tplt.render(data=data)
|
||||
|
||||
text = black.format_str(text, mode=black.FileMode())
|
||||
|
||||
dest.write_text(text)
|
||||
isort.file(dest)
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -50,7 +45,7 @@ class CodeSlicer:
|
||||
self._next_line += 1
|
||||
|
||||
|
||||
def get_indentation_of_string(line: str, comment_char: str = "//") -> str:
|
||||
def get_indentation_of_string(line: str, comment_char: str = "//|#") -> str:
|
||||
return re.sub(rf"{comment_char}.*", "", line).removesuffix("\n")
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ services:
|
||||
- 9091:9000
|
||||
environment:
|
||||
ALLOW_SIGNUP: "false"
|
||||
LOG_LEVEL: "DEBUG"
|
||||
|
||||
DB_ENGINE: sqlite # Optional: 'sqlite', 'postgres'
|
||||
# =====================================
|
||||
|
||||
@@ -33,9 +33,6 @@ init() {
|
||||
|
||||
# Activate our virtual environment here
|
||||
. /opt/pysetup/.venv/bin/activate
|
||||
|
||||
# Initialize Database Prerun
|
||||
poetry run python /app/mealie/db/init_db.py
|
||||
}
|
||||
|
||||
change_user
|
||||
@@ -43,10 +40,11 @@ init
|
||||
GUNICORN_PORT=${API_PORT:-9000}
|
||||
|
||||
# Start API
|
||||
hostip=`/sbin/ip route|awk '/default/ { print $3 }'`
|
||||
HOST_IP=`/sbin/ip route|awk '/default/ { print $3 }'`
|
||||
|
||||
if [ "$WEB_GUNICORN" = 'true' ]; then
|
||||
echo "Starting Gunicorn"
|
||||
exec gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT --forwarded-allow-ips=$hostip -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload
|
||||
exec gunicorn mealie.app:app -b 0.0.0.0:$GUNICORN_PORT --forwarded-allow-ips=$HOST_IP -k uvicorn.workers.UvicornWorker -c /app/gunicorn_conf.py --preload
|
||||
else
|
||||
exec uvicorn mealie.app:app --host 0.0.0.0 --forwarded-allow-ips=$hostip --port $GUNICORN_PORT
|
||||
exec python /app/mealie/main.py
|
||||
fi
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 230 90" width="2500" height="978"><path d="M93.8 27.8l5.8-1.4v28c0 3.1.9 4.9 2.7 5.5-.9 1.7-2.4 2.6-4.6 2.6-2.6 0-4-1.8-4-5.5V27.8zM108.4 62V41.8h-3.2V37h9.1v25h-5.9zm3-34.6c.9 0 1.7.3 2.4 1s1 1.5 1 2.4c0 .9-.3 1.7-1 2.4s-1.5 1-2.4 1c-.9 0-1.7-.3-2.4-1s-1-1.5-1-2.4c0-.9.3-1.7 1-2.4s1.5-1 2.4-1zM137.1 62V47.6c0-2.1-.4-3.7-1.2-4.6-.8-1-2.1-1.5-4-1.5-.9 0-1.8.2-2.7.7-1 .5-1.7 1.1-2.3 1.8v18h-5.8V37.1h4.2l1.1 2.3c1.6-1.9 3.9-2.8 7-2.8 3 0 5.3.9 7 2.7 1.7 1.8 2.6 4.3 2.6 7.4V62h-5.9zM147.5 49.5c0-3.8 1.1-6.9 3.3-9.3 2.2-2.4 5.1-3.6 8.7-3.6 3.8 0 6.7 1.1 8.8 3.4 2.1 2.3 3.1 5.4 3.1 9.4s-1.1 7.1-3.2 9.5c-2.1 2.3-5 3.5-8.8 3.5-3.8 0-6.7-1.2-8.8-3.5-2-2.4-3.1-5.5-3.1-9.4zm6.1 0c0 5.5 2 8.2 5.9 8.2 1.8 0 3.2-.7 4.3-2.1 1.1-1.4 1.6-3.5 1.6-6.1 0-5.4-2-8.1-5.9-8.1-1.8 0-3.3.7-4.3 2.1-1.1 1.4-1.6 3.4-1.6 6zM192.1 62v-1.5c-.5.5-1.3 1-2.4 1.4-1.1.4-2.3.6-3.6.6-3.5 0-6.2-1.1-8.2-3.3-2-2.2-3-5.3-3-9.2 0-3.9 1.1-7.1 3.4-9.6s5.1-3.7 8.6-3.7c1.9 0 3.6.4 5.2 1.2v-10l5.8-1.4V62h-5.8zm0-19c-1.2-1-2.5-1.5-3.9-1.5-2.3 0-4.1.7-5.4 2.1-1.3 1.4-1.9 3.5-1.9 6.1 0 5.2 2.5 7.8 7.5 7.8.6 0 1.2-.2 2.1-.5.8-.3 1.3-.7 1.6-1V43zM226 51.3h-17.8c.1 2 .8 3.5 2 4.6 1.3 1.1 2.9 1.7 5.1 1.7 2.6 0 4.7-.7 6-2.1l2.3 4.4c-2 1.7-5.1 2.5-9.2 2.5-3.8 0-6.8-1.1-9-3.3-2.2-2.2-3.3-5.3-3.3-9.3 0-3.9 1.2-7.1 3.6-9.5 2.4-2.4 5.3-3.6 8.7-3.6 3.6 0 6.5 1.1 8.7 3.2 2.2 2.2 3.3 4.9 3.3 8.2.1.7-.1 1.7-.4 3.2zm-17.6-4.4h12.2c-.4-3.6-2.4-5.5-6-5.5-3.3.1-5.4 1.9-6.2 5.5z"/><g><path fill="#004712" d="M65.9 47.4l-1 11.5-3.3-2.3.4-5.8v-.1-.1l-.1-.1-.1-.1-7.1-4.7.1-5.1 11.1 6.8zM48.5 59.9L43.4 56v.9c0 .2-.1.4-.2.5L39.4 60l4.2 3.4.1.1v.2l.2 4 4.7 3.9-.1-11.7zm-32.1 5l2.4 11.5 9.9 10.5L27 75.3 16.4 64.9zm9.3 1.7l-2.4-16.1-12-10 3.2 15.6 11.2 10.5zm-3.8-26l-3.3-22.8L4.8 9.2l4.5 21.5 12.6 9.9z"/><path fill="#00B259" d="M75.7 41.2l-1.5 10.9-8.2 6.6 1-11.2 8.7-6.3zM49.6 59.9l.1 11.8 10.5-8.4.7-11.5-11.3 8.1zm-6.8 4.8L28 75.3l1.8 12.2 13.4-10.7-.4-12.1zm-.4-8l-.7-16-17.3 9.9 2.4 16.6 15.6-10.5zm-1.1-25.3l-.9-21.6-20.8 8L23 41l18.3-9.6z"/><path d="M76.9 40c0-.1 0-.1 0 0v-.2s0-.1-.1-.1c0 0-.1 0-.1-.1l-12-6.7c-.2-.1-.4-.1-.5 0L54 39.1h-.1v.6l-.1 5.4-4.1-2.7c-.2-.1-.4-.1-.6 0L43 45.8l-.3-6v-.1-.1-.1-.1-.1h-.1l-6.2-4.1 5.8-3c.2-.1.3-.3.3-.5L41.4 9v-.1s0-.1-.1-.1c0 0 0-.1-.1-.1L25.5 1.1c-.1-.1-.2-.1-.3-.1L3.9 7.6s-.1 0-.1.1c0 0-.1 0-.1.1v.6l4.7 22.9c0 .1.1.2.2.3l6.4 5-4.7 2.2s-.1 0-.1.1c0 0 0 .1-.1.1v.2l3.6 17.2c0 .1.1.2.2.3l4.5 4.2-3 1.8-.1.1s0 .1-.1.1V63.2L18 76.5c0 .1.1.2.1.3l10.9 12h.1s.1 0 .1.1h.5l14.4-11.5c.1-.1.2-.3.2-.4l-.3-7.9 4.8 4s.1 0 .1.1h.5L61 64c.1-.1.2-.2.2-.4l.4-5.8 3.5 2.4h.4s.1 0 .1-.1l9.4-7.5c.1-.1.2-.2.2-.3L76.9 40c0 .1 0 .1 0 0zM66 58.7l1-11.2 8.8-6.3-1.5 10.9-8.3 6.6zm-4.4-2.1l.4-5.8v-.1-.1l-.1-.1-.1-.1-7.1-4.7.1-5.1 11.1 6.9-1 11.5-3.3-2.4zm-1.5 6.7l-10.5 8.4-.1-11.8 11.3-8.1-.7 11.5zM43.3 76.8L29.8 87.5 28 75.3l14.7-10.5.6 12zm-24.6-.4l-2.4-11.5L27 75.3l1.7 11.6-10-10.5zm-.2-58.6l3.3 22.8-12.5-9.9L4.8 9.2l13.7 8.6zm21.9-8l.9 21.6L23 41l-3.4-23.2 20.8-8zm2 46.9L26.8 67.1l-2.4-16.6 17.3-9.9.7 16.1zm-19.1-6.1l2.4 16.1-11.2-10.6-3.2-15.6 12 10.1zm20.5 13.1v-.1-.1l-.1-.1-4.2-3.4 3.8-2.6c.2-.1.2-.3.2-.5V56l5.1 3.9.1 11.8-4.7-3.9-.2-4.1z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -5,8 +5,8 @@
|
||||
## 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://docs.github.com/en/get-started/using-github/github-flow), 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://docs.github.com/en/get-started/using-github/github-flow)). We actively welcome your pull requests:
|
||||
|
||||
1. Fork the repo and create your branch from `mealie-next`.
|
||||
2. Checkout the Discord, the PRs page, or the Projects page to get an idea of what's already being worked on.
|
||||
@@ -28,8 +28,8 @@ 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
|
||||
* 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
|
||||
- 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)
|
||||
@@ -41,4 +41,4 @@ People *love* thorough bug reports. I'm not even kidding.
|
||||
By contributing, you agree that your contributions will be licensed under its AGPL 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/facebookarchive/draft-js/blob/main/CONTRIBUTING.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ This is the start of the maintainers guide for Mealie developers. Those who have
|
||||
|
||||
If you are working on issues, it can be helpful to understand the workflow for our repository. When an issue comes in it is tagged with the `bug` and `triage` flags. This is to indicate that they need to be reviewed by a maintainer to determine validity.
|
||||
|
||||
After you've reviered an issue it will generally move into one of two states:
|
||||
After you've reviewed an issue it will generally move into one of two states:
|
||||
|
||||
`bug:confirmed`
|
||||
: Your were able to verify the issue and we determined we need to fix it
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# OpenID Connect (OIDC) Authentication
|
||||
|
||||
:octicons-tag-24: v1.4.0
|
||||
|
||||
Mealie supports 3rd party authentication via [OpenID Connect (OIDC)](https://openid.net/connect/), an identity layer built on top of OAuth2. OIDC is supported by many Identity Providers (IdP), including:
|
||||
|
||||
- [Authentik](https://goauthentik.io/integrations/sources/oauth/#openid-connect)
|
||||
- [Authelia](https://www.authelia.com/configuration/identity-providers/open-id-connect/)
|
||||
- [Keycloak](https://www.keycloak.org/docs/latest/securing_apps/#_oidc)
|
||||
- [Okta](https://www.okta.com/openid-connect/)
|
||||
|
||||
## Account Linking
|
||||
|
||||
Signing in with OAuth will automatically find your account in Mealie and link to it. If a user does not exist in Mealie, then one will be created (if enabled), but will be unable to log in with any other authentication method. An admin can configure another authentication method for such a user.
|
||||
|
||||
## Provider Setup
|
||||
|
||||
Before you can start using OIDC Authentication, you must first configure a new client application in your identity provider. Your identity provider must support the OAuth **Authorization Code flow with PKCE**. The steps will vary by provider, but generally, the steps are as follows.
|
||||
|
||||
1. Create a new client application
|
||||
- The Provider type should be OIDC or OAuth2
|
||||
- The Grant type should be `Authorization Code`
|
||||
- The Application type should be `Web`
|
||||
- The Client type should be `public`
|
||||
|
||||
2. Configure redirect URI
|
||||
|
||||
The redirect URI(s) that are needed:
|
||||
|
||||
1. `http(s)://DOMAIN:PORT/login`
|
||||
2. `https(s)://DOMAIN:PORT/login?direct=1`
|
||||
1. This URI is only required if your IdP supports [RP-Initiated Logout](https://openid.net/specs/openid-connect-rpinitiated-1_0.html) such as Keycloak. You may also be able to combine this into the previous URI by using a wildcard: `http(s)://DOMAIN:PORT/login*`
|
||||
|
||||
The redirect URI(s) should include any URL that Mealie is accessible from. Some examples include
|
||||
|
||||
http://localhost:9091/login
|
||||
https://mealie.example.com/login
|
||||
|
||||
3. Configure origins
|
||||
|
||||
If your identity provider enforces CORS on any endpoints, you will need to specify your Mealie URL as an Allowed Origin.
|
||||
|
||||
4. Configure allowed scopes
|
||||
|
||||
The scopes required are `openid profile email groups`
|
||||
|
||||
## Mealie Setup
|
||||
|
||||
Take the client id and your discovery URL and update your environment variables to include the required OIDC variables described in [Installation - Backend Configuration](../installation/backend-config.md#openid-connect-oidc).
|
||||
|
||||
### Groups
|
||||
|
||||
There are two (optional) [environment variables](../installation/backend-config.md#openid-connect-oidc) that can control which of the users in your IdP can log in to Mealie and what permissions they will have. The groups should be **defined in your IdP** and be returned in the `groups` claim.
|
||||
|
||||
`OIDC_USER_GROUP`: Users must be a part of this group (within your IdP) to be able to log in.
|
||||
|
||||
`OIDC_ADMIN_GROUP`: Users that are in this group (within your IdP) will be made an **admin** in Mealie.
|
||||
|
||||
## Examples
|
||||
|
||||
Example configurations for several Identity Providers have been provided by the Community in the [GitHub Discussions](https://github.com/mealie-recipes/mealie/discussions/categories/oauth-provider-example).
|
||||
|
||||
If you don't see your provider and have successfully set it up, please consider [creating your own example](https://github.com/mealie-recipes/mealie/discussions/new?category=oauth-provider-example) so that others can have a smoother setup.
|
||||
@@ -94,6 +94,10 @@ docker exec -it mealie-next bash
|
||||
python /app/mealie/scripts/change_password.py
|
||||
```
|
||||
|
||||
## I can't log in with external auth. How can I change my authentication method?
|
||||
|
||||
Follow the [steps above](#how-can-i-change-my-password) for changing your password. You will be prompted if you would like to switch your authentication method back to local auth so you can log in again.
|
||||
|
||||
## How do private groups and recipes work?
|
||||
|
||||
Managing private groups and recipes can be confusing. The following diagram and notes should help explain how they work to determine if a recipe can be shared publicly.
|
||||
|
||||
@@ -4,17 +4,21 @@
|
||||
|
||||
### General
|
||||
|
||||
| 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 |
|
||||
| BASE_URL | http://localhost:8080 | Used for Notifications |
|
||||
| TOKEN_TIME | 48 | 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 |
|
||||
| ALLOW_SIGNUP | true | Allow user sign-up without token |
|
||||
| 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 |
|
||||
| BASE_URL | http://localhost:8080 | Used for Notifications |
|
||||
| TOKEN_TIME | 48 | 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 |
|
||||
| ALLOW_SIGNUP<super>\*</super> | false | Allow user sign-up without token |
|
||||
| LOG_CONFIG_OVERRIDE | | Override the config for logging with a custom path |
|
||||
| LOG_LEVEL | info | logging level configured |
|
||||
|
||||
<super>\*</super> Starting in v1.4.0 this was changed to default to `false` as apart of a security review of the application.
|
||||
|
||||
### Security
|
||||
|
||||
@@ -25,14 +29,15 @@
|
||||
|
||||
### Database
|
||||
|
||||
| Variables | Default | Description |
|
||||
| ----------------- | :------: | -------------------------------- |
|
||||
| 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 |
|
||||
| Variables | Default | Description |
|
||||
| --------------------- | :------: | ----------------------------------------------------------------------- |
|
||||
| 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 |
|
||||
| POSTGRES_URL_OVERRIDE | None | Optional Postgres URL override to use instead of POSTGRES\_\* variables |
|
||||
|
||||
### Email
|
||||
|
||||
@@ -54,8 +59,8 @@ Changing the webworker settings may cause unforeseen memory leak issues with Mea
|
||||
| ---------------- | :-----: | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| WEB_GUNICORN | false | Enables Gunicorn to manage Uvicorn web for multiple works |
|
||||
| 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 | 1 | Set the maximum number of workers to use. Default is not set meaning unlimited. More info [here][max_workers] |
|
||||
| WEB_CONCURRENCY | 1 | Override the automatic definition of number of workers. More info [here][web_concurrency] |
|
||||
| MAX_WORKERS | None | 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] |
|
||||
|
||||
### LDAP
|
||||
|
||||
@@ -75,6 +80,26 @@ Changing the webworker settings may cause unforeseen memory leak issues with Mea
|
||||
| LDAP_NAME_ATTRIBUTE | name | The LDAP attribute that maps to the user's name |
|
||||
| LDAP_MAIL_ATTRIBUTE | mail | The LDAP attribute that maps to the user's email |
|
||||
|
||||
### OpenID Connect (OIDC)
|
||||
|
||||
:octicons-tag-24: v1.4.0
|
||||
|
||||
For usage, see [Usage - OpenID Connect](../authentication/oidc.md)
|
||||
|
||||
| Variables | Default | Description |
|
||||
| ---------------------- | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| OIDC_AUTH_ENABLED | False | Enables authentication via OpenID Connect |
|
||||
| OIDC_SIGNUP_ENABLED | True | Enables new users to be created when signing in for the first time with OIDC |
|
||||
| OIDC_CONFIGURATION_URL | None | The URL to the OIDC configuration of your provider. This is usually something like https://auth.example.com/.well-known/openid-configuration |
|
||||
| OIDC_CLIENT_ID | None | The client id of your configured client in your provider |
|
||||
| OIDC_USER_GROUP | None | If specified, only users belonging to this group will be able to successfully authenticate, regardless of the `OIDC_ADMIN_GROUP`. For more information see [this page](../authentication/oidc.md#groups) |
|
||||
| OIDC_ADMIN_GROUP | None | If specified, users belonging to this group will be made an admin. For more information see [this page](../authentication/oidc.md#groups) |
|
||||
| OIDC_AUTO_REDIRECT | False | If `True`, then the login page will be bypassed an you will be sent directly to your Identity Provider. You can still get to the login page by adding `?direct=1` to the login URL |
|
||||
| OIDC_PROVIDER_NAME | OAuth | The provider name is shown in SSO login button. "Login with <OIDC_PROVIDER_NAME\>" |
|
||||
| OIDC_REMEMBER_ME | False | Because redirects bypass the login screen, you cant extend your session by clicking the "Remember Me" checkbox. By setting this value to true, a session will be extended as if "Remember Me" was checked |
|
||||
| OIDC_SIGNING_ALGORITHM | RS256 | The algorithm used to sign the id token (examples: RS256, HS256) |
|
||||
| OIDC_USER_CLAIM | email | Optional: 'email', 'preferred_username' |
|
||||
|
||||
### Themeing
|
||||
|
||||
Setting the following environmental variables will change the theme of the frontend. Note that the themes are the same for all users. This is a break-change when migration from v0.x.x -> 1.x.x.
|
||||
@@ -95,3 +120,7 @@ Setting the following environmental variables will change the theme of the front
|
||||
| THEME_DARK_INFO | #1976D2 | Dark Theme Config Variable |
|
||||
| THEME_DARK_WARNING | #FF6D00 | Dark Theme Config Variable |
|
||||
| THEME_DARK_ERROR | #EF5350 | Dark Theme Config Variable |
|
||||
|
||||
[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
|
||||
|
||||
16
docs/docs/documentation/getting-started/installation/logs.md
Normal file
16
docs/docs/documentation/getting-started/installation/logs.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Logs
|
||||
|
||||
:octicons-tag-24: v1.5.0
|
||||
|
||||
## Highlighs
|
||||
|
||||
- Logs are written to `/app/data/mealie.log` by default in the container.
|
||||
- Logs are also written to stdout and stderr.
|
||||
- You can adjust the log level using the `LOG_LEVEL` environment variable.
|
||||
|
||||
## Configuration
|
||||
|
||||
Starting in v1.5.0 logging is now highly configurable. Using the `LOG_CONFIG_OVERRIDE` you can provide the application with a custom configuration to log however you'd like. This configuration file is based off the [Python Logging Config](https://docs.python.org/3/library/logging.config.html#logging.config.fileConfig). It can be difficult to understand the configuration at first, so here are some resources to help get started.
|
||||
|
||||
- This [YouTube Video](https://www.youtube.com/watch?v=9L77QExPmI0) for a great walkthrough on the logging file format.
|
||||
- Our [Logging Config](https://github.com/mealie-recipes/mealie/blob/mealie-next/mealie/core/logger/logconf.prod.json)
|
||||
@@ -5,40 +5,39 @@ PostgreSQL might be considered if you need to support many concurrent users. In
|
||||
**For Environment Variable Configuration, see** [Backend Configuration](./backend-config.md)
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: "3.7"
|
||||
services:
|
||||
mealie:
|
||||
image: ghcr.io/mealie-recipes/mealie:v1.1.0 # (3)
|
||||
image: ghcr.io/mealie-recipes/mealie:v1.4.0 # (3)
|
||||
container_name: mealie
|
||||
restart: always
|
||||
ports:
|
||||
- "9925:9000" # (1)
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 1000M # (2)
|
||||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- mealie-data:/app/data/
|
||||
environment:
|
||||
# Set Backend ENV Variables Here
|
||||
- ALLOW_SIGNUP=true
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Anchorage
|
||||
- MAX_WORKERS=1
|
||||
- WEB_CONCURRENCY=1
|
||||
- BASE_URL=https://mealie.yourdomain.com
|
||||
# Set Backend ENV Variables Here
|
||||
ALLOW_SIGNUP: true
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: America/Anchorage
|
||||
MAX_WORKERS: 1
|
||||
WEB_CONCURRENCY: 1
|
||||
BASE_URL: https://mealie.yourdomain.com
|
||||
# Database Settings
|
||||
DB_ENGINE: postgres
|
||||
POSTGRES_USER: mealie
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_SERVER: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: mealie
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
# Database Settings
|
||||
- DB_ENGINE=postgres
|
||||
- POSTGRES_USER=mealie
|
||||
- POSTGRES_PASSWORD=mealie
|
||||
- POSTGRES_SERVER=postgres
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_DB=mealie
|
||||
restart: always
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres:15
|
||||
@@ -48,12 +47,15 @@ services:
|
||||
environment:
|
||||
POSTGRES_PASSWORD: mealie
|
||||
POSTGRES_USER: mealie
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
mealie-data:
|
||||
driver: local
|
||||
mealie-pgdata:
|
||||
driver: local
|
||||
```
|
||||
|
||||
<!-- Updating This? Be Sure to also update the SQLite Annotations -->
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
tags:
|
||||
- Security
|
||||
---
|
||||
|
||||
# Security Considerations
|
||||
|
||||
This page is a collection of security considerations for Mealie. It mostly deals with reported issues and how it's possible to mitigate them. Note that this page is for you to use as a guide for how secure you want to make your deployment. It's important to note that most of these will not apply to you, if you:
|
||||
|
||||
1. Run behind a VPN
|
||||
2. Use a strong password
|
||||
3. Disable Sign-Ups
|
||||
4. Don't host for malicious users
|
||||
|
||||
Use your best judgement when deciding what to do.
|
||||
|
||||
## Denial of Service
|
||||
|
||||
By default, the API is **not** rate limited. This leaves Mealie open to a potential **Denial of Service Attack**. While it's possible to perform a **Denial of Service Attack** on any endpoint, there are a few key endpoints that are more vulnerable than others.
|
||||
|
||||
- `/api/recipes/create-url`
|
||||
- `/api/recipes/{id}/image`
|
||||
|
||||
These endpoints are used to scrape data based off a user provided URL. It is possible for a malicious user to issue multiple requests to download an arbitrarily large external file (e.g a Debian ISO) and sufficiently saturate a CPU assigned to the container. While we do implement some protections against this by chunking the response, and using a timeout strategy, it's still possible to overload the CPU if an attacker issues multiple requests concurrently.
|
||||
|
||||
### Mitigation
|
||||
|
||||
If you'd like to mitigate this risk, we suggest that you rate limit the API in general, and apply strict rate limits to these endpoints. You can do this by utilizing a reverse proxy. See the following links to get started:
|
||||
|
||||
- [Traefik](https://doc.traefik.io/traefik/middlewares/http/ratelimit/)
|
||||
- [Nginx](https://nginx.org/en/docs/http/ngx_http_limit_req_module.html)
|
||||
- [Caddy](https://caddyserver.com/docs/modules/http.handlers.rate_limit)
|
||||
|
||||
## Server Side Request Forgery
|
||||
|
||||
- `/api/recipes/create-url`
|
||||
- `/api/recipes/{id}/image`
|
||||
|
||||
Given the nature of these APIs it's possible to perform a **Server Side Request Forgery** attack. This is where a malicious user can issue a request to an internal network resource, and potentially exfiltrate data. We _do_ perform some checks to mitigate access to resources within your network but at the end of the day, users of Mealie are allowed to trigger HTTP requests on **your server**.
|
||||
|
||||
### Mitigation
|
||||
|
||||
If you'd like to mitigate this risk, we suggest that you isolate the container that Mealie is running in to ensure that it's access to internal resources is limited only to what is required. _Note that Mealie does require access to the internet for recipe imports._ You might consider isolating Mealie from your home network entirely and only allowing access to the external internet.
|
||||
@@ -9,12 +9,11 @@ SQLite is a popular, open source, self-contained, zero-configuration database th
|
||||
**For Environment Variable Configuration, see** [Backend Configuration](./backend-config.md)
|
||||
|
||||
```yaml
|
||||
---
|
||||
version: "3.7"
|
||||
services:
|
||||
mealie:
|
||||
image: ghcr.io/mealie-recipes/mealie:v1.1.0 # (3)
|
||||
image: ghcr.io/mealie-recipes/mealie:v1.4.0 # (3)
|
||||
container_name: mealie
|
||||
restart: always
|
||||
ports:
|
||||
- "9925:9000" # (1)
|
||||
deploy:
|
||||
@@ -24,19 +23,17 @@ services:
|
||||
volumes:
|
||||
- mealie-data:/app/data/
|
||||
environment:
|
||||
# Set Backend ENV Variables Here
|
||||
- ALLOW_SIGNUP=true
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Anchorage
|
||||
- MAX_WORKERS=1
|
||||
- WEB_CONCURRENCY=1
|
||||
- BASE_URL=https://mealie.yourdomain.com
|
||||
restart: always
|
||||
# Set Backend ENV Variables Here
|
||||
ALLOW_SIGNUP: true
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: America/Anchorage
|
||||
MAX_WORKERS: 1
|
||||
WEB_CONCURRENCY: 1
|
||||
BASE_URL: https://mealie.yourdomain.com
|
||||
|
||||
volumes:
|
||||
mealie-data:
|
||||
driver: local
|
||||
```
|
||||
|
||||
<!-- Updating This? Be Sure to also update the Postgres Annotations -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Permissions and Public Access
|
||||
|
||||
Mealie provides various levels of user access and permissions. This includes:
|
||||
- Authentication and registration ([check out the LDAP guide](./ldap.md) for how to configure access using LDAP)
|
||||
- Authentication and registration ([LDAP](../authentication/ldap.md) and [OpenID Connect](../authentication/oidc.md) are both supported)
|
||||
- Customizable user permissions
|
||||
- Fine-tuned public access for non-users
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -41,7 +41,8 @@ markdown_extensions:
|
||||
custom_checkbox: true
|
||||
- admonition
|
||||
- attr_list
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
@@ -71,9 +72,15 @@ nav:
|
||||
- SQLite (Recommended): "documentation/getting-started/installation/sqlite.md"
|
||||
- PostgreSQL: "documentation/getting-started/installation/postgres.md"
|
||||
- Backend Configuration: "documentation/getting-started/installation/backend-config.md"
|
||||
- Security: "documentation/getting-started/installation/security.md"
|
||||
- Logs: "documentation/getting-started/installation/logs.md"
|
||||
- Usage:
|
||||
- Backup and Restoring: "documentation/getting-started/usage/backups-and-restoring.md"
|
||||
- LDAP Authentication: "documentation/getting-started/usage/ldap.md"
|
||||
- Permissions and Public Access: "documentation/getting-started/usage/permissions-and-public-access.md"
|
||||
|
||||
- Authentication:
|
||||
- LDAP: "documentation/getting-started/authentication/ldap.md"
|
||||
- OpenID Connect: "documentation/getting-started/authentication/oidc.md"
|
||||
|
||||
- Community Guides:
|
||||
- iOS Shortcuts: "documentation/community-guide/ios.md"
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- Edit Dialog -->
|
||||
<BaseDialog
|
||||
v-if="editTarget"
|
||||
v-model="dialogStates.edit"
|
||||
:width="650"
|
||||
:icon="$globals.icons.pages"
|
||||
:title="$t('general.edit')"
|
||||
:submit-icon="$globals.icons.save"
|
||||
:submit-text="$tc('general.save')"
|
||||
@submit="editCookbook"
|
||||
>
|
||||
<v-card-text>
|
||||
<CookbookEditor :cookbook="editTarget" :actions="actions" />
|
||||
</v-card-text>
|
||||
</BaseDialog>
|
||||
|
||||
<!-- Page -->
|
||||
<v-container v-if="book" fluid>
|
||||
<v-app-bar color="transparent" flat class="mt-n1 rounded">
|
||||
<v-app-bar color="transparent" flat class="mt-n1">
|
||||
<v-icon large left> {{ $globals.icons.pages }} </v-icon>
|
||||
<v-toolbar-title class="headline"> {{ book.name }} </v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<BaseButton
|
||||
v-if="isOwnGroup"
|
||||
class="mx-1"
|
||||
:edit="true"
|
||||
@click="handleEditCookbook"
|
||||
/>
|
||||
</v-app-bar>
|
||||
<v-card flat>
|
||||
<v-card-text class="py-0">
|
||||
@@ -22,17 +47,20 @@
|
||||
/>
|
||||
</v-container>
|
||||
</v-container>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, useRoute, ref, useContext, useMeta } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent, useRoute, ref, useContext, useMeta, reactive, useRouter } from "@nuxtjs/composition-api";
|
||||
import { useLazyRecipes } from "~/composables/recipes";
|
||||
import RecipeCardSection from "@/components/Domain/Recipe/RecipeCardSection.vue";
|
||||
import { useCookbook } from "~/composables/use-group-cookbooks";
|
||||
import { useCookbook, useCookbooks } from "~/composables/use-group-cookbooks";
|
||||
import { useLoggedInState } from "~/composables/use-logged-in-state";
|
||||
import { RecipeCookBook } from "~/lib/api/types/cookbook";
|
||||
import CookbookEditor from "~/components/Domain/Cookbook/CookbookEditor.vue";
|
||||
|
||||
export default defineComponent({
|
||||
components: { RecipeCardSection },
|
||||
components: { RecipeCardSection, CookbookEditor },
|
||||
setup() {
|
||||
const { $auth } = useContext();
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
@@ -43,10 +71,36 @@
|
||||
const { recipes, appendRecipes, assignSorted, removeRecipe, replaceRecipes } = useLazyRecipes(isOwnGroup.value ? null : groupSlug.value);
|
||||
const slug = route.value.params.slug;
|
||||
const { getOne } = useCookbook(isOwnGroup.value ? null : groupSlug.value);
|
||||
const { actions } = useCookbooks();
|
||||
const router = useRouter();
|
||||
|
||||
const tab = ref(null);
|
||||
const book = getOne(slug);
|
||||
|
||||
const dialogStates = reactive({
|
||||
edit: false,
|
||||
});
|
||||
|
||||
const editTarget = ref<RecipeCookBook | null>(null);
|
||||
function handleEditCookbook() {
|
||||
dialogStates.edit = true;
|
||||
editTarget.value = book.value;
|
||||
}
|
||||
|
||||
async function editCookbook() {
|
||||
if (!editTarget.value) {
|
||||
return;
|
||||
}
|
||||
const response = await actions.updateOne(editTarget.value);
|
||||
|
||||
// if name changed, redirect to new slug
|
||||
if (response?.slug && book.value?.slug !== response?.slug) {
|
||||
router.push(`/g/${route.value.params.groupSlug}/cookbooks/${response?.slug}`);
|
||||
}
|
||||
dialogStates.edit = false;
|
||||
editTarget.value = null;
|
||||
}
|
||||
|
||||
useMeta(() => {
|
||||
return {
|
||||
title: book?.value?.name || "Cookbook",
|
||||
@@ -62,6 +116,12 @@
|
||||
recipes,
|
||||
removeRecipe,
|
||||
replaceRecipes,
|
||||
isOwnGroup,
|
||||
dialogStates,
|
||||
editTarget,
|
||||
handleEditCookbook,
|
||||
editCookbook,
|
||||
actions,
|
||||
};
|
||||
},
|
||||
head: {}, // Must include for useMeta
|
||||
|
||||
@@ -107,7 +107,7 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
async function getShoppingLists() {
|
||||
const { data } = await api.shopping.lists.getAll();
|
||||
const { data } = await api.shopping.lists.getAll(1, -1, { orderBy: "name", orderDirection: "asc" });
|
||||
if (data) {
|
||||
shoppingLists.value = data.items ?? [];
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, computed, useContext } from "@nuxtjs/composition-api";
|
||||
import RecipeOrganizerSelector from "~/components/Domain/Recipe/RecipeOrganizerSelector.vue";
|
||||
import { RecipeTag, RecipeCategory } from "~/lib/api/types/group";
|
||||
import { RecipeTag, RecipeCategory } from "~/lib/api/types/recipe";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
<div v-if="!open" class="custom-btn-group ma-1">
|
||||
<RecipeFavoriteBadge v-if="loggedIn" class="mx-1" color="info" button-style :slug="recipe.slug" show-always />
|
||||
<RecipeFavoriteBadge v-if="loggedIn" class="mx-1" color="info" button-style :recipe-id="recipe.id" show-always />
|
||||
<RecipeTimelineBadge v-if="loggedIn" button-style :slug="recipe.slug" :recipe-name="recipe.name" />
|
||||
<div v-if="loggedIn">
|
||||
<v-tooltip v-if="!locked" bottom color="info">
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<v-hover v-slot="{ hover }" :open-delay="50">
|
||||
<v-card
|
||||
:class="{ 'on-hover': hover }"
|
||||
:style="{ cursor }"
|
||||
:elevation="hover ? 12 : 2"
|
||||
:to="route ? recipeRoute : ''"
|
||||
:to="recipeRoute"
|
||||
:min-height="imageHeight + 75"
|
||||
@click="$emit('click')"
|
||||
>
|
||||
@@ -33,10 +34,10 @@
|
||||
</v-card-title>
|
||||
|
||||
<slot name="actions">
|
||||
<v-card-actions class="px-1">
|
||||
<RecipeFavoriteBadge v-if="isOwnGroup" class="absolute" :slug="slug" show-always />
|
||||
<v-card-actions v-if="showRecipeContent" class="px-1">
|
||||
<RecipeFavoriteBadge v-if="isOwnGroup" class="absolute" :recipe-id="recipeId" show-always />
|
||||
|
||||
<RecipeRating class="pb-1" :value="rating" :name="name" :slug="slug" :small="true" />
|
||||
<RecipeRating class="pb-1" :value="rating" :recipe-id="recipeId" :slug="slug" :small="true" />
|
||||
<v-spacer></v-spacer>
|
||||
<RecipeChips :truncate="true" :items="tags" :title="false" :limit="2" :small="true" url-prefix="tags" />
|
||||
|
||||
@@ -96,15 +97,15 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
ratingColor: {
|
||||
type: String,
|
||||
default: "secondary",
|
||||
},
|
||||
image: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "abc123",
|
||||
},
|
||||
route: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
tags: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
@@ -123,14 +124,18 @@ export default defineComponent({
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "")
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "");
|
||||
const showRecipeContent = computed(() => props.recipeId && props.slug);
|
||||
const recipeRoute = computed<string>(() => {
|
||||
return `/g/${groupSlug.value}/r/${props.slug}`;
|
||||
return showRecipeContent.value ? `/g/${groupSlug.value}/r/${props.slug}` : "";
|
||||
});
|
||||
const cursor = computed(() => showRecipeContent.value ? "pointer" : "auto");
|
||||
|
||||
return {
|
||||
isOwnGroup,
|
||||
recipeRoute,
|
||||
showRecipeContent,
|
||||
cursor,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<v-card
|
||||
:ripple="false"
|
||||
:class="isFlat ? 'mx-auto flat' : 'mx-auto'"
|
||||
:style="{ cursor }"
|
||||
hover
|
||||
:to="$listeners.selected ? undefined : recipeRoute"
|
||||
@click="$emit('selected')"
|
||||
@@ -37,22 +38,20 @@
|
||||
</v-list-item-subtitle>
|
||||
<div class="d-flex flex-wrap justify-end align-center">
|
||||
<slot name="actions">
|
||||
<RecipeFavoriteBadge v-if="isOwnGroup" :slug="slug" show-always />
|
||||
<v-rating
|
||||
color="secondary"
|
||||
<RecipeFavoriteBadge v-if="isOwnGroup && showRecipeContent" :recipe-id="recipeId" show-always />
|
||||
<RecipeRating
|
||||
:class="isOwnGroup ? 'ml-auto' : 'ml-auto pb-2'"
|
||||
background-color="secondary lighten-3"
|
||||
dense
|
||||
length="5"
|
||||
size="15"
|
||||
:value="rating"
|
||||
></v-rating>
|
||||
:recipe-id="recipeId"
|
||||
:slug="slug"
|
||||
:small="true"
|
||||
/>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<!-- If we're not logged-in, no items display, so we hide this menu -->
|
||||
<!-- We also add padding to the v-rating above to compensate -->
|
||||
<RecipeContextMenu
|
||||
v-if="isOwnGroup"
|
||||
v-if="isOwnGroup && showRecipeContent"
|
||||
:slug="slug"
|
||||
:menu-icon="$globals.icons.dotsHorizontal"
|
||||
:name="name"
|
||||
@@ -83,12 +82,14 @@ import { computed, defineComponent, useContext, useRoute } from "@nuxtjs/composi
|
||||
import RecipeFavoriteBadge from "./RecipeFavoriteBadge.vue";
|
||||
import RecipeContextMenu from "./RecipeContextMenu.vue";
|
||||
import RecipeCardImage from "./RecipeCardImage.vue";
|
||||
import RecipeRating from "./RecipeRating.vue";
|
||||
import { useLoggedInState } from "~/composables/use-logged-in-state";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
RecipeFavoriteBadge,
|
||||
RecipeContextMenu,
|
||||
RecipeRating,
|
||||
RecipeCardImage,
|
||||
},
|
||||
props: {
|
||||
@@ -113,10 +114,6 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: "abc123",
|
||||
},
|
||||
route: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
recipeId: {
|
||||
type: String,
|
||||
required: true,
|
||||
@@ -135,14 +132,19 @@ export default defineComponent({
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "")
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "");
|
||||
const showRecipeContent = computed(() => props.recipeId && props.slug);
|
||||
const recipeRoute = computed<string>(() => {
|
||||
return `/g/${groupSlug.value}/r/${props.slug}`;
|
||||
return showRecipeContent.value ? `/g/${groupSlug.value}/r/${props.slug}` : "";
|
||||
});
|
||||
const cursor = computed(() => showRecipeContent.value ? "pointer" : "auto");
|
||||
|
||||
|
||||
return {
|
||||
isOwnGroup,
|
||||
recipeRoute,
|
||||
showRecipeContent,
|
||||
cursor,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
color="accent"
|
||||
:small="small"
|
||||
dark
|
||||
:to="isOwnGroup ? `${baseRecipeRoute}?${urlPrefix}=${category.id}` : undefined"
|
||||
:to="`${baseRecipeRoute}?${urlPrefix}=${category.id}`"
|
||||
>
|
||||
{{ truncateText(category.name) }}
|
||||
</v-chip>
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, useContext, useRoute } from "@nuxtjs/composition-api";
|
||||
import { useLoggedInState } from "~/composables/use-logged-in-state";
|
||||
import { RecipeCategory, RecipeTag, RecipeTool } from "~/lib/api/types/user";
|
||||
import { RecipeCategory, RecipeTag, RecipeTool } from "~/lib/api/types/recipe";
|
||||
|
||||
export type UrlPrefixParam = "tags" | "categories" | "tools";
|
||||
|
||||
@@ -56,7 +55,6 @@ export default defineComponent({
|
||||
},
|
||||
setup(props) {
|
||||
const { $auth } = useContext();
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "")
|
||||
@@ -74,7 +72,6 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
baseRecipeRoute,
|
||||
isOwnGroup,
|
||||
truncateText,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -59,7 +59,13 @@
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="newMealdate" no-title @input="pickerMenu = false"></v-date-picker>
|
||||
<v-date-picker
|
||||
v-model="newMealdate"
|
||||
no-title
|
||||
:first-day-of-week="firstDayOfWeek"
|
||||
:local="$i18n.locale"
|
||||
@input="pickerMenu = false"
|
||||
/>
|
||||
</v-menu>
|
||||
<v-select
|
||||
v-model="newMealType"
|
||||
@@ -111,6 +117,7 @@ import RecipeDialogPrintPreferences from "./RecipeDialogPrintPreferences.vue";
|
||||
import RecipeDialogShare from "./RecipeDialogShare.vue";
|
||||
import { useLoggedInState } from "~/composables/use-logged-in-state";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { useGroupSelf } from "~/composables/use-groups";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
import { usePlanTypeOptions } from "~/composables/use-group-mealplan";
|
||||
import { Recipe } from "~/lib/api/types/recipe";
|
||||
@@ -224,11 +231,16 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const { i18n, $auth, $globals } = useContext();
|
||||
const { group } = useGroupSelf();
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "");
|
||||
|
||||
const firstDayOfWeek = computed(() => {
|
||||
return group.value?.preferences?.firstDayOfWeek || 0;
|
||||
});
|
||||
|
||||
// ===========================================================================
|
||||
// Context Menu Setup
|
||||
|
||||
@@ -321,7 +333,7 @@ export default defineComponent({
|
||||
const recipeRefWithScale = computed(() => recipeRef.value ? { scale: props.recipeScale, ...recipeRef.value } : undefined);
|
||||
|
||||
async function getShoppingLists() {
|
||||
const { data } = await api.shopping.lists.getAll();
|
||||
const { data } = await api.shopping.lists.getAll(1, -1, { orderBy: "name", orderDirection: "asc" });
|
||||
if (data) {
|
||||
shoppingLists.value = data.items ?? [];
|
||||
}
|
||||
@@ -432,6 +444,7 @@ export default defineComponent({
|
||||
addRecipeToPlan,
|
||||
icon,
|
||||
planTypeOptions,
|
||||
firstDayOfWeek,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<BaseDialog v-if="shoppingListDialog" v-model="dialog" :title="$t('recipe.add-to-list')" :icon="$globals.icons.cartCheck">
|
||||
<v-card-text>
|
||||
<v-card
|
||||
v-for="list in shoppingLists"
|
||||
v-for="list in shoppingListChoices"
|
||||
:key="list.id"
|
||||
hover
|
||||
class="my-2 left-border"
|
||||
@@ -14,6 +14,18 @@
|
||||
</v-card-title>
|
||||
</v-card>
|
||||
</v-card-text>
|
||||
<template #card-actions>
|
||||
<v-btn
|
||||
text
|
||||
color="grey"
|
||||
@click="dialog = false"
|
||||
>
|
||||
{{ $t("general.cancel") }}
|
||||
</v-btn>
|
||||
<div class="d-flex justify-end" style="width: 100%;">
|
||||
<v-checkbox v-model="preferences.viewAllLists" hide-details :label="$tc('general.show-all')" class="my-auto mr-4" />
|
||||
</div>
|
||||
</template>
|
||||
</BaseDialog>
|
||||
<BaseDialog
|
||||
v-if="shoppingListIngredientDialog"
|
||||
@@ -120,6 +132,7 @@ import { toRefs } from "@vueuse/core";
|
||||
import RecipeIngredientListItem from "./RecipeIngredientListItem.vue";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
import { useShoppingListPreferences } from "~/composables/use-users/preferences";
|
||||
import { ShoppingListSummary } from "~/lib/api/types/group";
|
||||
import { Recipe, RecipeIngredient } from "~/lib/api/types/recipe";
|
||||
|
||||
@@ -164,8 +177,9 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
setup(props, context) {
|
||||
const { i18n } = useContext();
|
||||
const { $auth, i18n } = useContext();
|
||||
const api = useUserApi();
|
||||
const preferences = useShoppingListPreferences();
|
||||
|
||||
// v-model support
|
||||
const dialog = computed({
|
||||
@@ -183,6 +197,10 @@ export default defineComponent({
|
||||
shoppingListIngredientDialog: false,
|
||||
});
|
||||
|
||||
const shoppingListChoices = computed(() => {
|
||||
return props.shoppingLists.filter((list) => preferences.value.viewAllLists || list.userId === $auth.user?.id);
|
||||
});
|
||||
|
||||
const recipeIngredientSections = ref<ShoppingListRecipeIngredientSection[]>([]);
|
||||
const selectedShoppingList = ref<ShoppingListSummary | null>(null);
|
||||
|
||||
@@ -334,6 +352,8 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
dialog,
|
||||
preferences,
|
||||
shoppingListChoices,
|
||||
...toRefs(state),
|
||||
addRecipesToList,
|
||||
bulkCheckIngredients,
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
:rating="recipe.rating"
|
||||
:image="recipe.image"
|
||||
:recipe-id="recipe.id"
|
||||
:route="true"
|
||||
v-on="$listeners.selected ? { selected: () => handleSelect(recipe) } : {}"
|
||||
/>
|
||||
</v-card>
|
||||
|
||||
@@ -22,7 +22,13 @@
|
||||
v-on="on"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="expirationDate" no-title @input="datePickerMenu = false"></v-date-picker>
|
||||
<v-date-picker
|
||||
v-model="expirationDate"
|
||||
no-title
|
||||
:first-day-of-week="firstDayOfWeek"
|
||||
:local="$i18n.locale"
|
||||
@input="datePickerMenu = false"
|
||||
/>
|
||||
</v-menu>
|
||||
</v-card-text>
|
||||
<v-card-actions class="justify-end">
|
||||
@@ -60,6 +66,7 @@ import { defineComponent, computed, toRefs, reactive, useContext, useRoute } fro
|
||||
import { useClipboard, useShare, whenever } from "@vueuse/core";
|
||||
import { RecipeShareToken } from "~/lib/api/types/recipe";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { useGroupSelf } from "~/composables/use-groups";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
|
||||
export default defineComponent({
|
||||
@@ -106,9 +113,14 @@ export default defineComponent({
|
||||
);
|
||||
|
||||
const { $auth, i18n } = useContext();
|
||||
const { group } = useGroupSelf();
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "");
|
||||
|
||||
const firstDayOfWeek = computed(() => {
|
||||
return group.value?.preferences?.firstDayOfWeek || 0;
|
||||
});
|
||||
|
||||
// ============================================================
|
||||
// Token Actions
|
||||
|
||||
@@ -185,6 +197,7 @@ export default defineComponent({
|
||||
dialog,
|
||||
createNewToken,
|
||||
deleteToken,
|
||||
firstDayOfWeek,
|
||||
shareRecipe,
|
||||
copyTokenLink,
|
||||
};
|
||||
|
||||
@@ -67,12 +67,16 @@
|
||||
<v-list>
|
||||
<v-list-item @click="toggleOrderDirection()">
|
||||
<v-icon left>
|
||||
{{ $globals.icons.sort }}
|
||||
{{
|
||||
state.orderDirection === "asc" ?
|
||||
$globals.icons.sortDescending : $globals.icons.sortAscending
|
||||
}}
|
||||
</v-icon>
|
||||
<v-list-item-title>
|
||||
{{ state.orderDirection === "asc" ? "Sort Descending" : "Sort Ascending" }}
|
||||
{{ state.orderDirection === "asc" ? $tc("general.sort-descending") : $tc("general.sort-ascending") }}
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-divider />
|
||||
<v-list-item
|
||||
v-for="v in sortable"
|
||||
:key="v.name"
|
||||
@@ -120,11 +124,12 @@
|
||||
<v-divider></v-divider>
|
||||
<v-container class="mt-6 px-md-6">
|
||||
<RecipeCardSection
|
||||
v-if="state.ready"
|
||||
class="mt-n5"
|
||||
:icon="$globals.icons.search"
|
||||
:title="$tc('search.results')"
|
||||
:recipes="recipes"
|
||||
:query="passedQuery"
|
||||
:query="passedQueryWithSeed"
|
||||
@replaceRecipes="replaceRecipes"
|
||||
@appendRecipes="appendRecipes"
|
||||
/>
|
||||
@@ -133,11 +138,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, defineComponent, useRouter, onMounted, useContext, computed, Ref, useRoute } from "@nuxtjs/composition-api";
|
||||
import { ref, defineComponent, useRouter, onMounted, useContext, computed, Ref, useRoute, watch } from "@nuxtjs/composition-api";
|
||||
import { watchDebounced } from "@vueuse/shared";
|
||||
import SearchFilter from "~/components/Domain/SearchFilter.vue";
|
||||
import { useLoggedInState } from "~/composables/use-logged-in-state";
|
||||
import { useCategoryStore, useFoodStore, useTagStore, useToolStore } from "~/composables/store";
|
||||
import { useUserSortPreferences } from "~/composables/use-users/preferences";
|
||||
import RecipeCardSection from "~/components/Domain/Recipe/RecipeCardSection.vue";
|
||||
import { IngredientFood, RecipeCategory, RecipeTag, RecipeTool } from "~/lib/api/types/recipe";
|
||||
import { NoUndefinedField } from "~/lib/api/types/non-generated";
|
||||
@@ -157,6 +163,7 @@ export default defineComponent({
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
const state = ref({
|
||||
auto: true,
|
||||
ready: false,
|
||||
search: "",
|
||||
orderBy: "created_at",
|
||||
orderDirection: "desc" as "asc" | "desc",
|
||||
@@ -170,6 +177,7 @@ export default defineComponent({
|
||||
|
||||
const route = useRoute();
|
||||
const groupSlug = computed(() => route.value.params.groupSlug || $auth.user?.groupSlug || "");
|
||||
const preferences = useUserSortPreferences();
|
||||
|
||||
const { recipes, appendRecipes, assignSorted, removeRecipe, replaceRecipes } = useLazyRecipes(isOwnGroup.value ? null : groupSlug.value);
|
||||
const categories = isOwnGroup.value ? useCategoryStore() : usePublicCategoryStore(groupSlug.value);
|
||||
@@ -184,7 +192,30 @@ export default defineComponent({
|
||||
const tools = isOwnGroup.value ? useToolStore() : usePublicToolStore(groupSlug.value);
|
||||
const selectedTools = ref<NoUndefinedField<RecipeTool>[]>([]);
|
||||
|
||||
const passedQuery = ref<RecipeSearchQuery | null>(null);
|
||||
function calcPassedQuery(): RecipeSearchQuery {
|
||||
return {
|
||||
search: state.value.search,
|
||||
categories: toIDArray(selectedCategories.value),
|
||||
foods: toIDArray(selectedFoods.value),
|
||||
tags: toIDArray(selectedTags.value),
|
||||
tools: toIDArray(selectedTools.value),
|
||||
requireAllCategories: state.value.requireAllCategories,
|
||||
requireAllTags: state.value.requireAllTags,
|
||||
requireAllTools: state.value.requireAllTools,
|
||||
requireAllFoods: state.value.requireAllFoods,
|
||||
orderBy: state.value.orderBy,
|
||||
orderDirection: state.value.orderDirection,
|
||||
};
|
||||
}
|
||||
const passedQuery = ref<RecipeSearchQuery>(calcPassedQuery());
|
||||
|
||||
// we calculate this separately because otherwise we can't check for query changes
|
||||
const passedQueryWithSeed = computed(() => {
|
||||
return {
|
||||
...passedQuery.value,
|
||||
_searchSeed: Date.now().toString()
|
||||
};
|
||||
})
|
||||
|
||||
function reset() {
|
||||
state.value.search = "";
|
||||
@@ -199,10 +230,6 @@ export default defineComponent({
|
||||
selectedTags.value = [];
|
||||
selectedTools.value = [];
|
||||
|
||||
router.push({
|
||||
query: {},
|
||||
});
|
||||
|
||||
search();
|
||||
}
|
||||
|
||||
@@ -211,7 +238,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function toIDArray(array: { id: string }[]) {
|
||||
return array.map((item) => item.id);
|
||||
// we sort the array to make sure the query is always the same
|
||||
return array.map((item) => item.id).sort();
|
||||
}
|
||||
|
||||
function hideKeyboard() {
|
||||
@@ -221,40 +249,33 @@ export default defineComponent({
|
||||
const input: Ref<any> = ref(null);
|
||||
|
||||
async function search() {
|
||||
await router.push({
|
||||
query: {
|
||||
categories: toIDArray(selectedCategories.value),
|
||||
foods: toIDArray(selectedFoods.value),
|
||||
tags: toIDArray(selectedTags.value),
|
||||
tools: toIDArray(selectedTools.value),
|
||||
// Only add the query param if it's or not default
|
||||
...{
|
||||
auto: state.value.auto ? undefined : "false",
|
||||
search: state.value.search === "" ? undefined : state.value.search,
|
||||
orderBy: state.value.orderBy === "createdAt" ? undefined : state.value.orderBy,
|
||||
orderDirection: state.value.orderDirection === "desc" ? undefined : state.value.orderDirection,
|
||||
requireAllCategories: state.value.requireAllCategories ? "true" : undefined,
|
||||
requireAllTags: state.value.requireAllTags ? "true" : undefined,
|
||||
requireAllTools: state.value.requireAllTools ? "true" : undefined,
|
||||
requireAllFoods: state.value.requireAllFoods ? "true" : undefined,
|
||||
},
|
||||
},
|
||||
});
|
||||
const oldQueryValueString = JSON.stringify(passedQuery.value);
|
||||
const newQueryValue = calcPassedQuery();
|
||||
const newQueryValueString = JSON.stringify(newQueryValue);
|
||||
if (oldQueryValueString === newQueryValueString) {
|
||||
return;
|
||||
}
|
||||
|
||||
passedQuery.value = {
|
||||
search: state.value.search,
|
||||
categories: toIDArray(selectedCategories.value),
|
||||
foods: toIDArray(selectedFoods.value),
|
||||
tags: toIDArray(selectedTags.value),
|
||||
tools: toIDArray(selectedTools.value),
|
||||
requireAllCategories: state.value.requireAllCategories,
|
||||
requireAllTags: state.value.requireAllTags,
|
||||
requireAllTools: state.value.requireAllTools,
|
||||
requireAllFoods: state.value.requireAllFoods,
|
||||
orderBy: state.value.orderBy,
|
||||
orderDirection: state.value.orderDirection,
|
||||
_searchSeed: Date.now().toString()
|
||||
};
|
||||
passedQuery.value = newQueryValue;
|
||||
const query = {
|
||||
categories: passedQuery.value.categories,
|
||||
foods: passedQuery.value.foods,
|
||||
tags: passedQuery.value.tags,
|
||||
tools: passedQuery.value.tools,
|
||||
// Only add the query param if it's or not default
|
||||
...{
|
||||
auto: state.value.auto ? undefined : "false",
|
||||
search: passedQuery.value.search === "" ? undefined : passedQuery.value.search,
|
||||
orderBy: passedQuery.value.orderBy === "created_at" ? undefined : passedQuery.value.orderBy,
|
||||
orderDirection: passedQuery.value.orderDirection === "desc" ? undefined : passedQuery.value.orderDirection,
|
||||
requireAllCategories: passedQuery.value.requireAllCategories ? "true" : undefined,
|
||||
requireAllTags: passedQuery.value.requireAllTags ? "true" : undefined,
|
||||
requireAllTools: passedQuery.value.requireAllTools ? "true" : undefined,
|
||||
requireAllFoods: passedQuery.value.requireAllFoods ? "true" : undefined,
|
||||
},
|
||||
}
|
||||
await router.push({ query });
|
||||
preferences.value.searchQuery = JSON.stringify(query);
|
||||
}
|
||||
|
||||
function waitUntilAndExecute(
|
||||
@@ -325,13 +346,20 @@ export default defineComponent({
|
||||
},
|
||||
];
|
||||
|
||||
onMounted(() => {
|
||||
// Hydrate Search
|
||||
// wait for stores to be hydrated
|
||||
watch(
|
||||
() => route.value.query,
|
||||
() => {
|
||||
if (state.value.ready) {
|
||||
hydrateSearch();
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
},
|
||||
)
|
||||
|
||||
// read query params
|
||||
async function hydrateSearch() {
|
||||
const query = router.currentRoute.query;
|
||||
|
||||
if (query.auto) {
|
||||
state.value.auto = query.auto === "true";
|
||||
}
|
||||
@@ -363,6 +391,8 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
);
|
||||
} else {
|
||||
selectedCategories.value = [];
|
||||
}
|
||||
|
||||
if (query.foods) {
|
||||
@@ -380,6 +410,8 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
);
|
||||
} else {
|
||||
selectedFoods.value = [];
|
||||
}
|
||||
|
||||
if (query.tags) {
|
||||
@@ -392,6 +424,8 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
);
|
||||
} else {
|
||||
selectedTags.value = [];
|
||||
}
|
||||
|
||||
if (query.tools) {
|
||||
@@ -404,11 +438,28 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
);
|
||||
} else {
|
||||
selectedTools.value = [];
|
||||
}
|
||||
|
||||
Promise.allSettled(promises).then(() => {
|
||||
search();
|
||||
});
|
||||
await Promise.allSettled(promises);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// restore the user's last search query
|
||||
if (preferences.value.searchQuery && !(Object.keys(route.value.query).length > 0)) {
|
||||
try {
|
||||
const query = JSON.parse(preferences.value.searchQuery);
|
||||
await router.replace({ query });
|
||||
} catch (error) {
|
||||
preferences.value.searchQuery = "";
|
||||
router.replace({ query: {} });
|
||||
}
|
||||
}
|
||||
|
||||
await hydrateSearch();
|
||||
await search();
|
||||
state.value.ready = true;
|
||||
});
|
||||
|
||||
watchDebounced(
|
||||
@@ -426,7 +477,7 @@ export default defineComponent({
|
||||
selectedTools,
|
||||
],
|
||||
async () => {
|
||||
if (state.value.auto) {
|
||||
if (state.value.ready && state.value.auto) {
|
||||
await search();
|
||||
}
|
||||
},
|
||||
@@ -459,7 +510,7 @@ export default defineComponent({
|
||||
recipes,
|
||||
removeRecipe,
|
||||
replaceRecipes,
|
||||
passedQuery,
|
||||
passedQueryWithSeed,
|
||||
};
|
||||
},
|
||||
head: {},
|
||||
|
||||
@@ -22,11 +22,12 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, useContext } from "@nuxtjs/composition-api";
|
||||
import { useUserSelfRatings } from "~/composables/use-users";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { UserOut } from "~/lib/api/types/user";
|
||||
export default defineComponent({
|
||||
props: {
|
||||
slug: {
|
||||
recipeId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
@@ -42,19 +43,23 @@ export default defineComponent({
|
||||
setup(props) {
|
||||
const api = useUserApi();
|
||||
const { $auth } = useContext();
|
||||
const { userRatings, refreshUserRatings } = useUserSelfRatings();
|
||||
|
||||
// TODO Setup the correct type for $auth.user
|
||||
// See https://github.com/nuxt-community/auth-module/issues/1097
|
||||
const user = computed(() => $auth.user as unknown as UserOut);
|
||||
const isFavorite = computed(() => user.value?.favoriteRecipes?.includes(props.slug));
|
||||
const isFavorite = computed(() => {
|
||||
const rating = userRatings.value.find((r) => r.recipeId === props.recipeId);
|
||||
return rating?.isFavorite || false;
|
||||
});
|
||||
|
||||
async function toggleFavorite() {
|
||||
if (!isFavorite.value) {
|
||||
await api.users.addFavorite(user.value?.id, props.slug);
|
||||
await api.users.addFavorite(user.value?.id, props.recipeId);
|
||||
} else {
|
||||
await api.users.removeFavorite(user.value?.id, props.slug);
|
||||
await api.users.removeFavorite(user.value?.id, props.recipeId);
|
||||
}
|
||||
$auth.fetchUser();
|
||||
await refreshUserRatings();
|
||||
}
|
||||
|
||||
return { isFavorite, toggleFavorite };
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<v-date-picker
|
||||
v-model="newTimelineEventTimestamp"
|
||||
no-title
|
||||
:first-day-of-week="firstDayOfWeek"
|
||||
:local="$i18n.locale"
|
||||
@input="datePickerMenu = false"
|
||||
/>
|
||||
@@ -109,10 +110,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive, ref, toRefs, useContext } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent, reactive, ref, toRefs, useContext } from "@nuxtjs/composition-api";
|
||||
import { whenever } from "@vueuse/core";
|
||||
import { VForm } from "~/types/vuetify";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { useGroupSelf } from "~/composables/use-groups";
|
||||
import { Recipe, RecipeTimelineEventIn } from "~/lib/api/types/recipe";
|
||||
|
||||
export default defineComponent({
|
||||
@@ -129,11 +131,11 @@ export default defineComponent({
|
||||
setup(props, context) {
|
||||
const madeThisDialog = ref(false);
|
||||
const userApi = useUserApi();
|
||||
const { group } = useGroupSelf();
|
||||
const { $auth, i18n } = useContext();
|
||||
const domMadeThisForm = ref<VForm>();
|
||||
const newTimelineEvent = ref<RecipeTimelineEventIn>({
|
||||
// @ts-expect-error - TS doesn't like the $auth global user attribute
|
||||
subject: i18n.t("recipe.user-made-this", { user: $auth.user.fullName } as string),
|
||||
subject: "",
|
||||
eventType: "comment",
|
||||
eventMessage: "",
|
||||
timestamp: undefined,
|
||||
@@ -154,6 +156,10 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
const firstDayOfWeek = computed(() => {
|
||||
return group.value?.preferences?.firstDayOfWeek || 0;
|
||||
});
|
||||
|
||||
function clearImage() {
|
||||
newTimelineEventImage.value = undefined;
|
||||
newTimelineEventImageName.value = "";
|
||||
@@ -178,6 +184,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
newTimelineEvent.value.recipeId = props.recipe.id
|
||||
// @ts-expect-error - TS doesn't like the $auth global user attribute
|
||||
newTimelineEvent.value.subject = i18n.t("recipe.user-made-this", { user: $auth.user.fullName })
|
||||
|
||||
// the user only selects the date, so we set the time to end of day local time
|
||||
// we choose the end of day so it always comes after "new recipe" events
|
||||
@@ -225,6 +233,7 @@ export default defineComponent({
|
||||
...toRefs(state),
|
||||
domMadeThisForm,
|
||||
madeThisDialog,
|
||||
firstDayOfWeek,
|
||||
newTimelineEvent,
|
||||
newTimelineEventImage,
|
||||
newTimelineEventImagePreviewUrl,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
|
||||
<div v-if="edit" class="d-flex justify-end">
|
||||
<BaseButton class="ml-auto my-2" @click="addNote"> {{ $t("general.new") }}</BaseButton>
|
||||
<BaseButton class="ml-auto my-2" @click="addNote"> {{ $t("general.add") }}</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-list v-if="showViewer" dense class="mt-0 pt-0">
|
||||
<v-list-item v-for="(item, key, index) in labels" :key="index" style="min-height: 25px" dense>
|
||||
<v-list-item v-for="(item, key, index) in renderedList" :key="index" style="min-height: 25px" dense>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="pl-4 caption flex row">
|
||||
<div>{{ item.label }}</div>
|
||||
<div class="ml-auto mr-1">{{ value[key] }}</div>
|
||||
<div class="ml-auto mr-1">{{ item.value }}</div>
|
||||
<div>{{ item.suffix }}</div>
|
||||
</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
@@ -37,6 +37,14 @@
|
||||
import { computed, defineComponent, useContext } from "@nuxtjs/composition-api";
|
||||
import { Nutrition } from "~/lib/api/types/recipe";
|
||||
|
||||
type NutritionLabelType = {
|
||||
[key: string]: {
|
||||
label: string;
|
||||
suffix: string;
|
||||
value?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
value: {
|
||||
@@ -50,34 +58,34 @@ export default defineComponent({
|
||||
},
|
||||
setup(props, context) {
|
||||
const { i18n } = useContext();
|
||||
const labels = {
|
||||
const labels = <NutritionLabelType>{
|
||||
calories: {
|
||||
label: i18n.t("recipe.calories"),
|
||||
suffix: i18n.t("recipe.calories-suffix"),
|
||||
label: i18n.tc("recipe.calories"),
|
||||
suffix: i18n.tc("recipe.calories-suffix"),
|
||||
},
|
||||
fatContent: {
|
||||
label: i18n.t("recipe.fat-content"),
|
||||
suffix: i18n.t("recipe.grams"),
|
||||
label: i18n.tc("recipe.fat-content"),
|
||||
suffix: i18n.tc("recipe.grams"),
|
||||
},
|
||||
fiberContent: {
|
||||
label: i18n.t("recipe.fiber-content"),
|
||||
suffix: i18n.t("recipe.grams"),
|
||||
label: i18n.tc("recipe.fiber-content"),
|
||||
suffix: i18n.tc("recipe.grams"),
|
||||
},
|
||||
proteinContent: {
|
||||
label: i18n.t("recipe.protein-content"),
|
||||
suffix: i18n.t("recipe.grams"),
|
||||
label: i18n.tc("recipe.protein-content"),
|
||||
suffix: i18n.tc("recipe.grams"),
|
||||
},
|
||||
sodiumContent: {
|
||||
label: i18n.t("recipe.sodium-content"),
|
||||
suffix: i18n.t("recipe.milligrams"),
|
||||
label: i18n.tc("recipe.sodium-content"),
|
||||
suffix: i18n.tc("recipe.milligrams"),
|
||||
},
|
||||
sugarContent: {
|
||||
label: i18n.t("recipe.sugar-content"),
|
||||
suffix: i18n.t("recipe.grams"),
|
||||
label: i18n.tc("recipe.sugar-content"),
|
||||
suffix: i18n.tc("recipe.grams"),
|
||||
},
|
||||
carbohydrateContent: {
|
||||
label: i18n.t("recipe.carbohydrate-content"),
|
||||
suffix: i18n.t("recipe.grams"),
|
||||
label: i18n.tc("recipe.carbohydrate-content"),
|
||||
suffix: i18n.tc("recipe.grams"),
|
||||
},
|
||||
};
|
||||
const valueNotNull = computed(() => {
|
||||
@@ -96,11 +104,25 @@ export default defineComponent({
|
||||
context.emit("input", { ...props.value, [key]: event });
|
||||
}
|
||||
|
||||
// Build a new list that only contains nutritional information that has a value
|
||||
const renderedList = computed(() => {
|
||||
return Object.entries(labels).reduce((item: NutritionLabelType, [key, label]) => {
|
||||
if (props.value[key]?.trim()) {
|
||||
item[key] = {
|
||||
...label,
|
||||
value: props.value[key],
|
||||
};
|
||||
}
|
||||
return item;
|
||||
}, {});
|
||||
});
|
||||
|
||||
return {
|
||||
labels,
|
||||
valueNotNull,
|
||||
showViewer,
|
||||
updateValue,
|
||||
renderedList,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
$globals.icons.tags"
|
||||
return-object
|
||||
v-bind="inputAttrs"
|
||||
auto-select-first
|
||||
:search-input.sync="searchInput"
|
||||
@change="resetSearchInput"
|
||||
>
|
||||
<template #selection="data">
|
||||
<v-chip
|
||||
@@ -43,7 +46,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, useContext, computed, onMounted } from "@nuxtjs/composition-api";
|
||||
import RecipeOrganizerDialog from "./RecipeOrganizerDialog.vue";
|
||||
import { RecipeCategory, RecipeTag } from "~/lib/api/types/user";
|
||||
import { RecipeCategory, RecipeTag } from "~/lib/api/types/recipe";
|
||||
import { RecipeTool } from "~/lib/api/types/admin";
|
||||
import { useTagStore } from "~/composables/store/use-tag-store";
|
||||
import { useCategoryStore, useToolStore } from "~/composables/store";
|
||||
@@ -138,7 +141,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function appendCreated(item: RecipeTag | RecipeCategory | RecipeTool) {
|
||||
console.log(item);
|
||||
if (selected.value === undefined) {
|
||||
return;
|
||||
}
|
||||
@@ -148,6 +150,12 @@ export default defineComponent({
|
||||
|
||||
const dialog = ref(false);
|
||||
|
||||
const searchInput = ref("");
|
||||
|
||||
function resetSearchInput() {
|
||||
searchInput.value = "";
|
||||
}
|
||||
|
||||
return {
|
||||
Organizer,
|
||||
appendCreated,
|
||||
@@ -156,6 +164,8 @@ export default defineComponent({
|
||||
label,
|
||||
selected,
|
||||
removeByIndex,
|
||||
searchInput,
|
||||
resetSearchInput,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/>
|
||||
<div v-if="isEditForm" class="d-flex">
|
||||
<RecipeDialogBulkAdd class="ml-auto my-2 mr-1" @bulk-data="addStep" />
|
||||
<BaseButton class="my-2" @click="addStep()"> {{ $t("general.new") }}</BaseButton>
|
||||
<BaseButton class="my-2" @click="addStep()"> {{ $t("general.add") }}</BaseButton>
|
||||
</div>
|
||||
<div v-if="!$vuetify.breakpoint.mdAndUp">
|
||||
<RecipePageOrganizers :recipe="recipe" />
|
||||
@@ -112,6 +112,7 @@ import { useUserApi } from "~/composables/api";
|
||||
import { uuid4, deepCopy } from "~/composables/use-utils";
|
||||
import RecipeDialogBulkAdd from "~/components/Domain/Recipe/RecipeDialogBulkAdd.vue";
|
||||
import RecipeNotes from "~/components/Domain/Recipe/RecipeNotes.vue";
|
||||
import { useNavigationWarning } from "~/composables/use-navigation-warning";
|
||||
|
||||
const EDITOR_OPTIONS = {
|
||||
mode: "code",
|
||||
@@ -151,6 +152,7 @@ export default defineComponent({
|
||||
const api = useUserApi();
|
||||
const { pageMode, editMode, setMode, isEditForm, isEditJSON, isCookMode, isEditMode, toggleCookMode } =
|
||||
usePageState(props.recipe.slug);
|
||||
const { deactivateNavigationWarning } = useNavigationWarning();
|
||||
|
||||
/** =============================================================
|
||||
* Recipe Snapshot on Mount
|
||||
@@ -175,6 +177,7 @@ export default defineComponent({
|
||||
await api.recipes.updateOne(props.recipe.slug, props.recipe);
|
||||
}
|
||||
}
|
||||
deactivateNavigationWarning();
|
||||
});
|
||||
|
||||
/** =============================================================
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<v-card-text>
|
||||
<v-card-title class="headline pa-0 flex-column align-center">
|
||||
{{ recipe.name }}
|
||||
<RecipeRating :key="recipe.slug" v-model="recipe.rating" :name="recipe.name" :slug="recipe.slug" />
|
||||
<RecipeRating :key="recipe.slug" :value="recipe.rating" :recipe-id="recipe.id" :slug="recipe.slug" />
|
||||
</v-card-title>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<SafeMarkdown :source="recipe.description" />
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<span>{{ parserToolTip }}</span>
|
||||
</v-tooltip>
|
||||
<RecipeDialogBulkAdd class="mx-1 mb-1" @bulk-data="addIngredient" />
|
||||
<BaseButton class="mb-1" @click="addIngredient" > {{ $t("general.new") }} </BaseButton>
|
||||
<BaseButton class="mb-1" @click="addIngredient" > {{ $t("general.add") }} </BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -148,10 +148,6 @@
|
||||
text: $tc('recipe.link-ingredients'),
|
||||
event: 'link-ingredients',
|
||||
},
|
||||
{
|
||||
text: $tc('recipe.merge-above'),
|
||||
event: 'merge-above',
|
||||
},
|
||||
{
|
||||
text: $tc('recipe.upload-image'),
|
||||
event: 'upload-image'
|
||||
@@ -160,11 +156,26 @@
|
||||
icon: previewStates[index] ? $globals.icons.edit : $globals.icons.eye,
|
||||
text: previewStates[index] ? $tc('recipe.edit-markdown') : $tc('markdown-editor.preview-markdown-button-label'),
|
||||
event: 'preview-step',
|
||||
divider: true,
|
||||
},
|
||||
{
|
||||
text: $tc('recipe.merge-above'),
|
||||
event: 'merge-above',
|
||||
},
|
||||
{
|
||||
text: $tc('recipe.move-to-top'),
|
||||
event: 'move-to-top',
|
||||
},
|
||||
{
|
||||
text: $tc('recipe.move-to-bottom'),
|
||||
event: 'move-to-bottom',
|
||||
},
|
||||
],
|
||||
},
|
||||
]"
|
||||
@merge-above="mergeAbove(index - 1, index)"
|
||||
@move-to-top="moveTo('top', index)"
|
||||
@move-to-bottom="moveTo('bottom', index)"
|
||||
@toggle-section="toggleShowTitle(step.id)"
|
||||
@link-ingredients="openDialog(index, step.text, step.ingredientReferences)"
|
||||
@preview-step="togglePreviewState(index)"
|
||||
@@ -531,6 +542,14 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function moveTo(dest: string, source: number) {
|
||||
if (dest === "top") {
|
||||
props.value.unshift(props.value.splice(source, 1)[0]);
|
||||
} else {
|
||||
props.value.push(props.value.splice(source, 1)[0]);
|
||||
}
|
||||
}
|
||||
|
||||
const previewStates = ref<boolean[]>([]);
|
||||
|
||||
function togglePreviewState(index: number) {
|
||||
@@ -646,6 +665,7 @@ export default defineComponent({
|
||||
getIngredientByRefId,
|
||||
showTitleEditor,
|
||||
mergeAbove,
|
||||
moveTo,
|
||||
openDialog,
|
||||
setIngredientIds,
|
||||
availableNextStep,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
v-if="landscape && $vuetify.breakpoint.smAndUp"
|
||||
:key="recipe.slug"
|
||||
v-model="recipe.rating"
|
||||
:name="recipe.name"
|
||||
:recipe-id="recipe.id"
|
||||
:slug="recipe.slug"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
v-if="$vuetify.breakpoint.smAndDown"
|
||||
:key="recipe.slug"
|
||||
v-model="recipe.rating"
|
||||
:name="recipe.name"
|
||||
:recipe-id="recipe.id"
|
||||
:slug="recipe.slug"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,34 +1,35 @@
|
||||
<template>
|
||||
<div @click.prevent>
|
||||
<v-rating
|
||||
v-model="rating"
|
||||
:readonly="!isOwnGroup"
|
||||
color="secondary"
|
||||
background-color="secondary lighten-3"
|
||||
length="5"
|
||||
:dense="small ? true : undefined"
|
||||
:size="small ? 15 : undefined"
|
||||
hover
|
||||
:value="value"
|
||||
clearable
|
||||
@input="updateRating"
|
||||
@click="updateRating"
|
||||
></v-rating>
|
||||
<v-hover v-slot="{ hover }">
|
||||
<v-rating
|
||||
:value="rating.ratingValue"
|
||||
:half-increments="(!hover) || (!isOwnGroup)"
|
||||
:readonly="!isOwnGroup"
|
||||
:color="hover ? attrs.hoverColor : attrs.color"
|
||||
:background-color="attrs.backgroundColor"
|
||||
length="5"
|
||||
:dense="small ? true : undefined"
|
||||
:size="small ? 15 : undefined"
|
||||
hover
|
||||
clearable
|
||||
@input="updateRating"
|
||||
@click="updateRating"
|
||||
/>
|
||||
</v-hover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent, ref, useContext, watch } from "@nuxtjs/composition-api";
|
||||
import { useLoggedInState } from "~/composables/use-logged-in-state";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { useUserSelfRatings } from "~/composables/use-users";
|
||||
export default defineComponent({
|
||||
props: {
|
||||
emitOnly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// TODO Remove name prop?
|
||||
name: {
|
||||
recipeId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
@@ -44,26 +45,79 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
preferGroupRating: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, context) {
|
||||
const { $auth } = useContext();
|
||||
const { isOwnGroup } = useLoggedInState();
|
||||
const { userRatings, setRating, ready: ratingsLoaded } = useUserSelfRatings();
|
||||
const hideGroupRating = ref(false);
|
||||
|
||||
const rating = ref(props.value);
|
||||
type Rating = {
|
||||
ratingValue: number | undefined;
|
||||
hasUserRating: boolean | undefined
|
||||
};
|
||||
|
||||
const api = useUserApi();
|
||||
function updateRating(val: number | null) {
|
||||
if (val === 0) {
|
||||
val = null;
|
||||
// prefer user rating over group rating
|
||||
const rating = computed<Rating>(() => {
|
||||
if (!ratingsLoaded.value) {
|
||||
return { ratingValue: undefined, hasUserRating: undefined };
|
||||
}
|
||||
if (!($auth.user?.id) || props.preferGroupRating) {
|
||||
return { ratingValue: props.value, hasUserRating: false };
|
||||
}
|
||||
|
||||
const userRating = userRatings.value.find((r) => r.recipeId === props.recipeId);
|
||||
return {
|
||||
ratingValue: userRating?.rating || (hideGroupRating.value ? 0 : props.value),
|
||||
hasUserRating: !!userRating?.rating
|
||||
};
|
||||
});
|
||||
|
||||
// if a user unsets their rating, we don't want to fall back to the group rating since it's out of sync
|
||||
watch(
|
||||
() => rating.value.hasUserRating,
|
||||
() => {
|
||||
if (rating.value.hasUserRating && !props.preferGroupRating) {
|
||||
hideGroupRating.value = true;
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const attrs = computed(() => {
|
||||
return isOwnGroup.value ? {
|
||||
// Logged-in user
|
||||
color: rating.value.hasUserRating ? "secondary" : "grey darken-1",
|
||||
hoverColor: "secondary",
|
||||
backgroundColor: "secondary lighten-3",
|
||||
} : {
|
||||
// Anonymous user
|
||||
color: "secondary",
|
||||
hoverColor: "secondary",
|
||||
backgroundColor: "secondary lighten-3",
|
||||
};
|
||||
})
|
||||
|
||||
function updateRating(val: number | null) {
|
||||
if (!isOwnGroup.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!props.emitOnly) {
|
||||
api.recipes.patchOne(props.slug, {
|
||||
rating: val,
|
||||
});
|
||||
setRating(props.slug, val || 0, null);
|
||||
}
|
||||
context.emit("input", val);
|
||||
}
|
||||
|
||||
return { isOwnGroup, rating, updateRating };
|
||||
return {
|
||||
attrs,
|
||||
isOwnGroup,
|
||||
rating,
|
||||
updateRating,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -3,9 +3,53 @@
|
||||
<v-row class="my-0 mx-7">
|
||||
<v-spacer />
|
||||
<v-col class="text-right">
|
||||
<v-btn fab small color="info" @click="reverseSort">
|
||||
<v-icon> {{ preferences.orderDirection === "asc" ? $globals.icons.sortCalendarAscending : $globals.icons.sortCalendarDescending }} </v-icon>
|
||||
</v-btn>
|
||||
<!-- Filters -->
|
||||
<v-menu offset-y bottom left nudge-bottom="3" :close-on-content-click="false">
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-badge :content="filterBadgeCount" :value="filterBadgeCount" bordered overlap>
|
||||
<v-btn fab small color="info" v-bind="attrs" v-on="on">
|
||||
<v-icon> {{ $globals.icons.filter }} </v-icon>
|
||||
</v-btn>
|
||||
</v-badge>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-list>
|
||||
<v-list-item @click="reverseSort">
|
||||
<v-icon left>
|
||||
{{
|
||||
preferences.orderDirection === "asc" ?
|
||||
$globals.icons.sortCalendarDescending : $globals.icons.sortCalendarAscending
|
||||
}}
|
||||
</v-icon>
|
||||
<v-list-item-title>
|
||||
{{ preferences.orderDirection === "asc" ? $tc("general.sort-descending") : $tc("general.sort-ascending") }}
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-divider />
|
||||
<v-list-item class="pa-0">
|
||||
<v-list class="py-0" style="width: 100%;">
|
||||
<v-list-item
|
||||
v-for="option, idx in eventTypeFilterState"
|
||||
:key="idx"
|
||||
>
|
||||
<v-checkbox
|
||||
:input-value="option.checked"
|
||||
readonly
|
||||
@click="toggleEventTypeOption(option.value)"
|
||||
>
|
||||
<template #label>
|
||||
<v-icon left>
|
||||
{{ option.icon }}
|
||||
</v-icon>
|
||||
{{ option.label }}
|
||||
</template>
|
||||
</v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="mx-2"/>
|
||||
@@ -29,9 +73,9 @@
|
||||
/>
|
||||
</v-timeline>
|
||||
</div>
|
||||
<v-card v-else-if="!loading">
|
||||
<v-card v-else-if="!loading" class="mt-2">
|
||||
<v-card-title class="justify-center pa-9">
|
||||
{{ $t("recipe.timeline-is-empty") }}
|
||||
{{ $t("recipe.timeline-no-events-found-try-adjusting-filters") }}
|
||||
</v-card-title>
|
||||
</v-card>
|
||||
<div v-if="loading" class="mb-3 text-center">
|
||||
@@ -41,14 +85,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted, ref, useAsync, useContext } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent, onMounted, ref, useAsync, useContext } from "@nuxtjs/composition-api";
|
||||
import { useThrottleFn, whenever } from "@vueuse/core";
|
||||
import RecipeTimelineItem from "./RecipeTimelineItem.vue"
|
||||
import { useTimelinePreferences } from "~/composables/use-users/preferences";
|
||||
import { useTimelineEventTypes } from "~/composables/recipes/use-recipe-timeline-events";
|
||||
import { useAsyncKey } from "~/composables/use-utils";
|
||||
import { alert } from "~/composables/use-toast";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { Recipe, RecipeTimelineEventOut, RecipeTimelineEventUpdate } from "~/lib/api/types/recipe"
|
||||
import { Recipe, RecipeTimelineEventOut, RecipeTimelineEventUpdate, TimelineEventType } from "~/lib/api/types/recipe";
|
||||
|
||||
export default defineComponent({
|
||||
components: { RecipeTimelineItem },
|
||||
@@ -76,6 +121,7 @@ export default defineComponent({
|
||||
const api = useUserApi();
|
||||
const { i18n } = useContext();
|
||||
const preferences = useTimelinePreferences();
|
||||
const { eventTypeOptions } = useTimelineEventTypes();
|
||||
const loading = ref(true);
|
||||
const ready = ref(false);
|
||||
|
||||
@@ -85,6 +131,15 @@ export default defineComponent({
|
||||
|
||||
const timelineEvents = ref([] as RecipeTimelineEventOut[]);
|
||||
const recipes = new Map<string, Recipe>();
|
||||
const filterBadgeCount = computed(() => eventTypeOptions.value.length - preferences.value.types.length);
|
||||
const eventTypeFilterState = computed(() => {
|
||||
return eventTypeOptions.value.map(option => {
|
||||
return {
|
||||
...option,
|
||||
checked: preferences.value.types.includes(option.value),
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
interface ScrollEvent extends Event {
|
||||
target: HTMLInputElement;
|
||||
@@ -112,7 +167,7 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
// Sorting
|
||||
// Preferences
|
||||
function reverseSort() {
|
||||
if (loading.value) {
|
||||
return;
|
||||
@@ -122,6 +177,21 @@ export default defineComponent({
|
||||
initializeTimelineEvents();
|
||||
}
|
||||
|
||||
function toggleEventTypeOption(option: TimelineEventType) {
|
||||
if (loading.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const index = preferences.value.types.indexOf(option);
|
||||
if (index === -1) {
|
||||
preferences.value.types.push(option);
|
||||
} else {
|
||||
preferences.value.types.splice(index, 1);
|
||||
}
|
||||
|
||||
initializeTimelineEvents();
|
||||
}
|
||||
|
||||
// Timeline Actions
|
||||
async function updateTimelineEvent(index: number) {
|
||||
const event = timelineEvents.value[index]
|
||||
@@ -179,8 +249,11 @@ export default defineComponent({
|
||||
async function scrollTimelineEvents() {
|
||||
const orderBy = "timestamp";
|
||||
const orderDirection = preferences.value.orderDirection === "asc" ? "asc" : "desc";
|
||||
// eslint-disable-next-line quotes
|
||||
const eventTypeValue = `["${preferences.value.types.join('", "')}"]`;
|
||||
const queryFilter = `(${props.queryFilter}) AND eventType IN ${eventTypeValue}`
|
||||
|
||||
const response = await api.recipes.getAllTimelineEvents(page.value, perPage, { orderBy, orderDirection, queryFilter: props.queryFilter });
|
||||
const response = await api.recipes.getAllTimelineEvents(page.value, perPage, { orderBy, orderDirection, queryFilter });
|
||||
page.value += 1;
|
||||
if (!response?.data) {
|
||||
return;
|
||||
@@ -256,11 +329,14 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
deleteTimelineEvent,
|
||||
filterBadgeCount,
|
||||
loading,
|
||||
onScroll,
|
||||
preferences,
|
||||
eventTypeFilterState,
|
||||
recipes,
|
||||
reverseSort,
|
||||
toggleEventTypeOption,
|
||||
timelineEvents,
|
||||
updateTimelineEvent,
|
||||
};
|
||||
|
||||
@@ -99,6 +99,7 @@ import { computed, defineComponent, ref, useContext, useRoute } from "@nuxtjs/co
|
||||
import RecipeCardMobile from "./RecipeCardMobile.vue";
|
||||
import RecipeTimelineContextMenu from "./RecipeTimelineContextMenu.vue";
|
||||
import { useStaticRoutes } from "~/composables/api";
|
||||
import { useTimelineEventTypes } from "~/composables/recipes/use-recipe-timeline-events";
|
||||
import { Recipe, RecipeTimelineEventOut } from "~/lib/api/types/recipe"
|
||||
import UserAvatar from "~/components/Domain/User/UserAvatar.vue";
|
||||
import SafeMarkdown from "~/components/global/SafeMarkdown.vue";
|
||||
@@ -124,6 +125,7 @@ export default defineComponent({
|
||||
setup(props) {
|
||||
const { $auth, $globals, $vuetify } = useContext();
|
||||
const { recipeTimelineEventImage } = useStaticRoutes();
|
||||
const { eventTypeOptions } = useTimelineEventTypes();
|
||||
const timelineEvents = ref([] as RecipeTimelineEventOut[]);
|
||||
|
||||
const route = useRoute();
|
||||
@@ -164,21 +166,10 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
const icon = computed( () => {
|
||||
switch (props.event.eventType) {
|
||||
case "comment":
|
||||
return $globals.icons.commentTextMultiple;
|
||||
|
||||
case "info":
|
||||
return $globals.icons.informationVariant;
|
||||
|
||||
case "system":
|
||||
return $globals.icons.cog;
|
||||
|
||||
default:
|
||||
return $globals.icons.informationVariant;
|
||||
};
|
||||
})
|
||||
const icon = computed(() => {
|
||||
const option = eventTypeOptions.value.find((option) => option.value === props.event.eventType);
|
||||
return option ? option.icon : $globals.icons.informationVariant;
|
||||
});
|
||||
|
||||
const hideImage = ref(false);
|
||||
const eventImageUrl = computed<string>( () => {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
:label="$t('shopping-list.note')"
|
||||
rows="1"
|
||||
auto-grow
|
||||
@keypress="handleNoteKeyPress"
|
||||
></v-textarea>
|
||||
</div>
|
||||
<div class="d-flex align-end" style="gap: 20px">
|
||||
@@ -95,7 +96,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, computed } from "@nuxtjs/composition-api";
|
||||
import { defineComponent, computed, watch } from "@nuxtjs/composition-api";
|
||||
import { ShoppingListItemCreate, ShoppingListItemOut } from "~/lib/api/types/group";
|
||||
import { MultiPurposeLabelOut } from "~/lib/api/types/labels";
|
||||
import { IngredientFood, IngredientUnit } from "~/lib/api/types/recipe";
|
||||
@@ -128,9 +129,28 @@ export default defineComponent({
|
||||
context.emit("input", val);
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.value.food,
|
||||
(newFood) => {
|
||||
// @ts-ignore our logic already assumes there's a label attribute, even if TS doesn't think there is
|
||||
listItem.value.label = newFood?.label || null;
|
||||
listItem.value.labelId = listItem.value.label?.id || null;
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
listItem,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleNoteKeyPress(event) {
|
||||
// Save on Enter
|
||||
if (!event.shiftKey && event.key === "Enter") {
|
||||
event.preventDefault();
|
||||
this.$emit("save");
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
160
frontend/components/Domain/User/UserRegistrationForm.vue
Normal file
160
frontend/components/Domain/User/UserRegistrationForm.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card-title>
|
||||
<v-icon large class="mr-3"> {{ $globals.icons.user }}</v-icon>
|
||||
<span class="headline"> {{ $t("user-registration.account-details") }}</span>
|
||||
</v-card-title>
|
||||
<v-divider />
|
||||
<v-card-text>
|
||||
<v-form ref="domAccountForm" @submit.prevent>
|
||||
<v-text-field
|
||||
v-model="accountDetails.username.value"
|
||||
autofocus
|
||||
v-bind="inputAttrs"
|
||||
:label="$tc('user.username')"
|
||||
:prepend-icon="$globals.icons.user"
|
||||
:rules="[validators.required]"
|
||||
:error-messages="usernameErrorMessages"
|
||||
@blur="validateUsername"
|
||||
/>
|
||||
<v-text-field
|
||||
v-model="accountDetails.fullName.value"
|
||||
v-bind="inputAttrs"
|
||||
:label="$tc('user.full-name')"
|
||||
:prepend-icon="$globals.icons.user"
|
||||
:rules="[validators.required]"
|
||||
/>
|
||||
<v-text-field
|
||||
v-model="accountDetails.email.value"
|
||||
v-bind="inputAttrs"
|
||||
:prepend-icon="$globals.icons.email"
|
||||
:label="$tc('user.email')"
|
||||
:rules="[validators.required, validators.email]"
|
||||
:error-messages="emailErrorMessages"
|
||||
@blur="validateEmail"
|
||||
/>
|
||||
<v-text-field
|
||||
v-model="credentials.password1.value"
|
||||
v-bind="inputAttrs"
|
||||
:type="pwFields.inputType.value"
|
||||
:append-icon="pwFields.passwordIcon.value"
|
||||
:prepend-icon="$globals.icons.lock"
|
||||
:label="$tc('user.password')"
|
||||
:rules="[validators.required, validators.minLength(8), validators.maxLength(258)]"
|
||||
@click:append="pwFields.togglePasswordShow"
|
||||
/>
|
||||
|
||||
<UserPasswordStrength :value="credentials.password1.value" />
|
||||
|
||||
<v-text-field
|
||||
v-model="credentials.password2.value"
|
||||
v-bind="inputAttrs"
|
||||
:type="pwFields.inputType.value"
|
||||
:append-icon="pwFields.passwordIcon.value"
|
||||
:prepend-icon="$globals.icons.lock"
|
||||
:label="$tc('user.confirm-password')"
|
||||
:rules="[validators.required, credentials.passwordMatch]"
|
||||
@click:append="pwFields.togglePasswordShow"
|
||||
/>
|
||||
<div class="px-2">
|
||||
<v-checkbox
|
||||
v-model="accountDetails.advancedOptions.value"
|
||||
:label="$tc('user.enable-advanced-content')"
|
||||
/>
|
||||
<p class="text-caption mt-n4">
|
||||
{{ $tc("user.enable-advanced-content-description") }}
|
||||
</p>
|
||||
</div>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref } from "@nuxtjs/composition-api";
|
||||
import { useDark } from "@vueuse/core";
|
||||
import { validators } from "~/composables/use-validators";
|
||||
import { useUserRegistrationForm } from "~/composables/use-users/user-registration-form";
|
||||
import { usePasswordField } from "~/composables/use-passwords";
|
||||
import UserPasswordStrength from "~/components/Domain/User/UserPasswordStrength.vue";
|
||||
|
||||
const inputAttrs = {
|
||||
filled: true,
|
||||
rounded: true,
|
||||
validateOnBlur: true,
|
||||
class: "rounded-lg",
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
components: { UserPasswordStrength },
|
||||
layout: "blank",
|
||||
setup() {
|
||||
const isDark = useDark();
|
||||
const langDialog = ref(false);
|
||||
|
||||
const pwFields = usePasswordField();
|
||||
const {
|
||||
accountDetails,
|
||||
credentials,
|
||||
emailErrorMessages,
|
||||
usernameErrorMessages,
|
||||
validateUsername,
|
||||
validateEmail,
|
||||
domAccountForm,
|
||||
} = useUserRegistrationForm();
|
||||
return {
|
||||
accountDetails,
|
||||
credentials,
|
||||
emailErrorMessages,
|
||||
inputAttrs,
|
||||
isDark,
|
||||
langDialog,
|
||||
pwFields,
|
||||
usernameErrorMessages,
|
||||
validators,
|
||||
// Validators
|
||||
validateUsername,
|
||||
validateEmail,
|
||||
// Dom Refs
|
||||
domAccountForm,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.icon-primary {
|
||||
fill: var(--v-primary-base);
|
||||
}
|
||||
|
||||
.icon-white {
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
.icon-divider {
|
||||
width: 100%;
|
||||
margin-bottom: -2.5rem;
|
||||
}
|
||||
|
||||
.icon-avatar {
|
||||
border-color: rgba(0, 0, 0, 0.12);
|
||||
border: 2px;
|
||||
}
|
||||
|
||||
.bg-off-white {
|
||||
background: #f5f8fa;
|
||||
}
|
||||
|
||||
.preferred-width {
|
||||
width: 840px;
|
||||
}
|
||||
</style>
|
||||
@@ -6,8 +6,6 @@
|
||||
v-model="sidebar"
|
||||
absolute
|
||||
:top-link="topLinks"
|
||||
:secondary-header="cookbookLinks.length ? $tc('sidebar.cookbooks') : undefined"
|
||||
:secondary-header-link="isOwnGroup && cookbookLinks.length ? `/g/${groupSlug}/cookbooks` : undefined"
|
||||
:secondary-links="cookbookLinks || []"
|
||||
:bottom-links="isAdmin ? bottomLinks : []"
|
||||
>
|
||||
@@ -146,14 +144,6 @@
|
||||
to: `/g/${groupSlug.value}/r/create/new`,
|
||||
restricted: true,
|
||||
},
|
||||
{
|
||||
insertDivider: true,
|
||||
icon: $globals.icons.pages,
|
||||
title: i18n.tc("sidebar.cookbook"),
|
||||
subtitle: i18n.tc("sidebar.create-cookbook"),
|
||||
to: `/g/${groupSlug.value}/cookbooks`,
|
||||
restricted: true,
|
||||
},
|
||||
]);
|
||||
|
||||
const bottomLinks = computed<SidebarLinks>(() => [
|
||||
@@ -191,22 +181,35 @@
|
||||
restricted: true,
|
||||
},
|
||||
{
|
||||
icon: $globals.icons.categories,
|
||||
to: `/g/${groupSlug.value}/recipes/categories`,
|
||||
title: i18n.tc("sidebar.categories"),
|
||||
icon: $globals.icons.book,
|
||||
to: `/g/${groupSlug.value}/cookbooks`,
|
||||
title: i18n.tc("cookbook.cookbooks"),
|
||||
restricted: true,
|
||||
},
|
||||
{
|
||||
icon: $globals.icons.tags,
|
||||
to: `/g/${groupSlug.value}/recipes/tags`,
|
||||
title: i18n.tc("sidebar.tags"),
|
||||
restricted: true,
|
||||
},
|
||||
{
|
||||
icon: $globals.icons.potSteam,
|
||||
to: `/g/${groupSlug.value}/recipes/tools`,
|
||||
title: i18n.tc("tool.tools"),
|
||||
icon: $globals.icons.organizers,
|
||||
title: i18n.tc("general.organizers"),
|
||||
restricted: true,
|
||||
children: [
|
||||
{
|
||||
icon: $globals.icons.categories,
|
||||
to: `/g/${groupSlug.value}/recipes/categories`,
|
||||
title: i18n.tc("sidebar.categories"),
|
||||
restricted: true,
|
||||
},
|
||||
{
|
||||
icon: $globals.icons.tags,
|
||||
to: `/g/${groupSlug.value}/recipes/tags`,
|
||||
title: i18n.tc("sidebar.tags"),
|
||||
restricted: true,
|
||||
},
|
||||
{
|
||||
icon: $globals.icons.potSteam,
|
||||
to: `/g/${groupSlug.value}/recipes/tools`,
|
||||
title: i18n.tc("tool.tools"),
|
||||
restricted: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
@@ -39,13 +39,12 @@
|
||||
<v-list-item-title>{{ nav.title }}</v-list-item-title>
|
||||
</template>
|
||||
|
||||
<v-list-item v-for="child in nav.children" :key="child.title" exact :to="child.to">
|
||||
<v-list-item v-for="child in nav.children" :key="child.title" exact :to="child.to" class="ml-2">
|
||||
<v-list-item-icon>
|
||||
<v-icon>{{ child.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ child.title }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-divider class="mb-4"></v-divider>
|
||||
</v-list-group>
|
||||
|
||||
<!-- Single Item -->
|
||||
@@ -68,18 +67,8 @@
|
||||
</template>
|
||||
|
||||
<!-- Secondary Links -->
|
||||
<template v-if="secondaryLinks">
|
||||
<router-link v-if="secondaryHeader && secondaryHeaderLink" :to="secondaryHeaderLink" style="text-decoration: none;">
|
||||
<v-subheader :to="secondaryHeaderLink" class="pb-0">
|
||||
{{ secondaryHeader }}
|
||||
</v-subheader>
|
||||
</router-link>
|
||||
<div v-else-if="secondaryHeader">
|
||||
<v-subheader :to="secondaryHeaderLink" class="pb-0">
|
||||
{{ secondaryHeader }}
|
||||
</v-subheader>
|
||||
</div>
|
||||
<v-divider v-if="secondaryHeader"></v-divider>
|
||||
<template v-if="secondaryLinks.length > 0">
|
||||
<v-divider class="mt-2"></v-divider>
|
||||
<v-list nav dense exact>
|
||||
<template v-for="nav in secondaryLinks">
|
||||
<div v-if="!nav.restricted || isOwnGroup" :key="nav.title">
|
||||
@@ -179,14 +168,6 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
secondaryHeader: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
secondaryHeaderLink: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, context) {
|
||||
// V-Model Support
|
||||
|
||||
@@ -15,12 +15,22 @@
|
||||
v-if="inputField.type === fieldTypes.BOOLEAN"
|
||||
v-model="value[inputField.varName]"
|
||||
class="my-0 py-0"
|
||||
:label="inputField.label"
|
||||
:name="inputField.varName"
|
||||
:hint="inputField.hint || ''"
|
||||
:disabled="(inputField.disableUpdate && updateMode) || (!updateMode && inputField.disableCreate) || (disabledFields && disabledFields.includes(inputField.varName))"
|
||||
@change="emitBlur"
|
||||
/>
|
||||
>
|
||||
<template #label>
|
||||
<div>
|
||||
<v-card-text class="text-body-1 my-0 py-0">
|
||||
{{ inputField.label }}
|
||||
</v-card-text>
|
||||
<v-card-text v-if="inputField.hint" class="text-caption my-0 py-0">
|
||||
{{ inputField.hint }}
|
||||
</v-card-text>
|
||||
</div>
|
||||
</template>
|
||||
</v-checkbox>
|
||||
|
||||
|
||||
<!-- Text Field -->
|
||||
<v-text-field
|
||||
|
||||
@@ -10,9 +10,12 @@
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-list dense>
|
||||
<v-list-item v-for="(child, idx) in btn.children" :key="idx" dense @click="$emit(child.event)">
|
||||
<v-list-item-title>{{ child.text }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<template v-for="(child, idx) in btn.children">
|
||||
<v-list-item :key="idx" dense @click="$emit(child.event)">
|
||||
<v-list-item-title>{{ child.text }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-divider v-if="child.divider" :key="`divider-${idx}`" class="my-1"></v-divider>
|
||||
</template>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-tooltip
|
||||
@@ -55,6 +58,7 @@ export interface ButtonOption {
|
||||
event: string;
|
||||
children?: ButtonOption[];
|
||||
disabled?: boolean;
|
||||
divider?: boolean;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<v-icon>{{ item.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ item.text }}</v-list-item-title>
|
||||
<v-divider v-if="item.divider" :key="`divider-${index}`" class="my-1" ></v-divider>
|
||||
</v-list-item>
|
||||
<v-divider v-if="item.divider" :key="`divider-${index}`" class="my-1" ></v-divider>
|
||||
</template>
|
||||
</v-list-item-group>
|
||||
</v-list>
|
||||
@@ -47,8 +47,8 @@
|
||||
<v-icon>{{ item.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ item.text }}</v-list-item-title>
|
||||
<v-divider v-if="item.divider" :key="`divider-${index}`" class="my-1" ></v-divider>
|
||||
</v-list-item>
|
||||
<v-divider v-if="item.divider" :key="`divider-${index}`" class="my-1" ></v-divider>
|
||||
</template>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
|
||||
259
frontend/components/global/BaseWizard.vue
Normal file
259
frontend/components/global/BaseWizard.vue
Normal file
@@ -0,0 +1,259 @@
|
||||
<template>
|
||||
<div :style="`width: ${width}; height: 100%;`">
|
||||
<LanguageDialog v-model="langDialog" />
|
||||
<v-card>
|
||||
<div>
|
||||
<v-toolbar width="100%" color="primary" class="d-flex justify-center" style="margin-bottom: 4rem" dark>
|
||||
<v-toolbar-title class="headline text-h4"> Mealie </v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
<div class="icon-container">
|
||||
<v-divider class="icon-divider"></v-divider>
|
||||
<v-avatar class="pa-2 icon-avatar" color="primary" size="75">
|
||||
<svg class="icon-white" style="width: 75" viewBox="0 0 24 24">
|
||||
<path
|
||||
d="M8.1,13.34L3.91,9.16C2.35,7.59 2.35,5.06 3.91,3.5L10.93,10.5L8.1,13.34M13.41,13L20.29,19.88L18.88,21.29L12,14.41L5.12,21.29L3.71,19.88L13.36,10.22L13.16,10C12.38,9.23 12.38,7.97 13.16,7.19L17.5,2.82L18.43,3.74L15.19,7L16.15,7.94L19.39,4.69L20.31,5.61L17.06,8.85L18,9.81L21.26,6.56L22.18,7.5L17.81,11.84C17.03,12.62 15.77,12.62 15,11.84L14.78,11.64L13.41,13Z"
|
||||
/>
|
||||
</svg>
|
||||
</v-avatar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-center grow items-center my-4">
|
||||
<slot :width="pageWidth"></slot>
|
||||
</div>
|
||||
<div class="mx-2 my-4">
|
||||
<v-progress-linear
|
||||
v-if="value > 0"
|
||||
:value="Math.ceil((value/maxPageNumber)*100)"
|
||||
striped
|
||||
height="10"
|
||||
/>
|
||||
</div>
|
||||
<v-divider class="ma-2" />
|
||||
<v-card-actions width="100%">
|
||||
<v-btn
|
||||
v-if="prevButtonShow"
|
||||
:disabled="!prevButtonEnable"
|
||||
:color="prevButtonColor"
|
||||
@click="decrementPage"
|
||||
>
|
||||
<v-icon v-if="prevButtonIconRef">
|
||||
{{ prevButtonIconRef }}
|
||||
</v-icon>
|
||||
{{ prevButtonTextRef }}
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
v-if="nextButtonShow"
|
||||
:disabled="!nextButtonEnable"
|
||||
:color="nextButtonColorRef"
|
||||
@click="incrementPage"
|
||||
>
|
||||
<div v-if="isSubmitting">
|
||||
<v-progress-circular indeterminate color="white" size="24" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<v-icon v-if="nextButtonIconRef && !nextButtonIconAfter">
|
||||
{{ nextButtonIconRef }}
|
||||
</v-icon>
|
||||
{{ nextButtonTextRef }}
|
||||
<v-icon v-if="nextButtonIconRef && nextButtonIconAfter">
|
||||
{{ nextButtonIconRef }}
|
||||
</v-icon>
|
||||
</div>
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
<v-card-actions class="justify-center flex-column py-8">
|
||||
<BaseButton large color="primary" @click="langDialog = true">
|
||||
<template #icon> {{ $globals.icons.translate }}</template>
|
||||
{{ $t("language-dialog.choose-language") }}
|
||||
</BaseButton>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, ref, useContext } from "@nuxtjs/composition-api";
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
minPageNumber: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
maxPageNumber: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
width: {
|
||||
type: [String, Number],
|
||||
default: "1200px",
|
||||
},
|
||||
pageWidth: {
|
||||
type: [String, Number],
|
||||
default: "600px",
|
||||
},
|
||||
prevButtonText: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
prevButtonIcon: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
prevButtonColor: {
|
||||
type: String,
|
||||
default: "grey-darken-3",
|
||||
},
|
||||
prevButtonShow: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
prevButtonEnable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
nextButtonText: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
nextButtonIcon: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
nextButtonIconAfter: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
nextButtonColor: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
nextButtonShow: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
nextButtonEnable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
nextButtonIsSubmit: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
isSubmitting: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
setup(props, context) {
|
||||
const { $globals, i18n } = useContext();
|
||||
const ready = ref(false);
|
||||
const langDialog = ref(false);
|
||||
|
||||
const prevButtonTextRef = computed(() => props.prevButtonText || i18n.tc("general.back"));
|
||||
const prevButtonIconRef = computed(() => props.prevButtonIcon || $globals.icons.back);
|
||||
const nextButtonTextRef = computed(
|
||||
() => props.nextButtonText || (
|
||||
props.nextButtonIsSubmit ? i18n.tc("general.submit") : i18n.tc("general.next")
|
||||
)
|
||||
);
|
||||
const nextButtonIconRef = computed(
|
||||
() => props.nextButtonIcon || (
|
||||
props.nextButtonIsSubmit ? $globals.icons.createAlt : $globals.icons.forward
|
||||
)
|
||||
);
|
||||
const nextButtonColorRef = computed(
|
||||
() => props.nextButtonColor || (props.nextButtonIsSubmit ? "success" : "info")
|
||||
);
|
||||
|
||||
function goToPage(page: number) {
|
||||
if (page < props.minPageNumber) {
|
||||
goToPage(props.minPageNumber);
|
||||
return;
|
||||
} else if (page > props.maxPageNumber) {
|
||||
goToPage(props.maxPageNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
context.emit("input", page);
|
||||
}
|
||||
|
||||
function decrementPage() {
|
||||
goToPage(props.value - 1);
|
||||
}
|
||||
|
||||
function incrementPage() {
|
||||
if (props.nextButtonIsSubmit) {
|
||||
context.emit("submit", props.value);
|
||||
} else {
|
||||
goToPage(props.value + 1);
|
||||
}
|
||||
}
|
||||
|
||||
ready.value = true;
|
||||
|
||||
return {
|
||||
ready,
|
||||
langDialog,
|
||||
prevButtonTextRef,
|
||||
prevButtonIconRef,
|
||||
nextButtonTextRef,
|
||||
nextButtonIconRef,
|
||||
nextButtonColorRef,
|
||||
decrementPage,
|
||||
incrementPage,
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.icon-primary {
|
||||
fill: var(--v-primary-base);
|
||||
}
|
||||
|
||||
.icon-white {
|
||||
fill: white;
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
.icon-divider {
|
||||
width: 100%;
|
||||
margin-bottom: -2.5rem;
|
||||
}
|
||||
|
||||
.icon-avatar {
|
||||
border-color: rgba(0, 0, 0, 0.12);
|
||||
border: 2px;
|
||||
}
|
||||
|
||||
.bg-off-white {
|
||||
background: #f5f8fa;
|
||||
}
|
||||
|
||||
.preferred-width {
|
||||
width: 840px;
|
||||
}
|
||||
</style>
|
||||
@@ -37,6 +37,7 @@ export function usePublicStoreActions<T extends BoundT>(
|
||||
loading.value = true;
|
||||
const allItems = useAsync(async () => {
|
||||
const { data } = await api.getAll(page, perPage, params);
|
||||
loading.value = false;
|
||||
|
||||
if (data && allRef) {
|
||||
allRef.value = data.items;
|
||||
@@ -49,7 +50,6 @@ export function usePublicStoreActions<T extends BoundT>(
|
||||
}
|
||||
}, useAsyncKey());
|
||||
|
||||
loading.value = false;
|
||||
return allItems;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ export function useStoreActions<T extends BoundT>(
|
||||
loading.value = true;
|
||||
const allItems = useAsync(async () => {
|
||||
const { data } = await api.getAll(page, perPage, params);
|
||||
loading.value = false;
|
||||
|
||||
if (data && allRef) {
|
||||
allRef.value = data.items;
|
||||
@@ -100,7 +101,6 @@ export function useStoreActions<T extends BoundT>(
|
||||
}
|
||||
}, useAsyncKey());
|
||||
|
||||
loading.value = false;
|
||||
return allItems;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { computed, ComputedRef, ref, Ref, useContext } from "@nuxtjs/composition-api";
|
||||
import { UserOut } from "~/lib/api/types/user";
|
||||
import { useNavigationWarning } from "~/composables/use-navigation-warning";
|
||||
|
||||
export enum PageMode {
|
||||
EDIT = "EDIT",
|
||||
@@ -65,6 +66,8 @@ function pageRefs(slug: string) {
|
||||
}
|
||||
|
||||
function pageState({ slugRef, pageModeRef, editModeRef, imageKey }: PageRefs): PageState {
|
||||
const { activateNavigationWarning, deactivateNavigationWarning } = useNavigationWarning();
|
||||
|
||||
const toggleEditMode = () => {
|
||||
if (editModeRef.value === EditorMode.FORM) {
|
||||
editModeRef.value = EditorMode.JSON;
|
||||
@@ -88,8 +91,13 @@ function pageState({ slugRef, pageModeRef, editModeRef, imageKey }: PageRefs): P
|
||||
const setMode = (toMode: PageMode) => {
|
||||
const fromMode = pageModeRef.value;
|
||||
|
||||
if (fromMode === PageMode.EDIT && toMode === PageMode.VIEW) {
|
||||
setEditMode(EditorMode.FORM);
|
||||
if (fromMode === PageMode.EDIT) {
|
||||
if (toMode === PageMode.VIEW) {
|
||||
setEditMode(EditorMode.FORM);
|
||||
}
|
||||
deactivateNavigationWarning();
|
||||
} else if (toMode === PageMode.EDIT) {
|
||||
activateNavigationWarning();
|
||||
}
|
||||
|
||||
pageModeRef.value = toMode;
|
||||
|
||||
35
frontend/composables/recipes/use-recipe-timeline-events.ts
Normal file
35
frontend/composables/recipes/use-recipe-timeline-events.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { computed, useContext } from "@nuxtjs/composition-api";
|
||||
import { TimelineEventType } from "~/lib/api/types/recipe";
|
||||
|
||||
export interface TimelineEventTypeData {
|
||||
value: TimelineEventType;
|
||||
label: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
export const useTimelineEventTypes = () => {
|
||||
const { $globals, i18n } = useContext();
|
||||
const eventTypeOptions = computed<TimelineEventTypeData[]>(() => {
|
||||
return [
|
||||
{
|
||||
value: "comment",
|
||||
label: i18n.tc("recipe.comment"),
|
||||
icon: $globals.icons.commentTextMultiple,
|
||||
},
|
||||
{
|
||||
value: "info",
|
||||
label: i18n.tc("settings.theme.info"),
|
||||
icon: $globals.icons.informationVariant,
|
||||
},
|
||||
{
|
||||
value: "system",
|
||||
label: i18n.tc("general.system"),
|
||||
icon: $globals.icons.cog,
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
return {
|
||||
eventTypeOptions,
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { reactive, ref, useAsync } from "@nuxtjs/composition-api";
|
||||
import { useAsyncKey } from "../use-utils";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { VForm } from "~/types/vuetify";
|
||||
import { RecipeTool } from "~/lib/api/types/user";
|
||||
import { RecipeTool } from "~/lib/api/types/recipe";
|
||||
|
||||
export const useTools = function (eager = true) {
|
||||
const workingToolData = reactive<RecipeTool>({
|
||||
|
||||
@@ -2,9 +2,11 @@ import { reactive, ref, Ref } from "@nuxtjs/composition-api";
|
||||
import { usePublicStoreActions, useStoreActions } from "../partials/use-actions-factory";
|
||||
import { usePublicExploreApi } from "../api/api-client";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { RecipeCategory } from "~/lib/api/types/admin";
|
||||
import { RecipeCategory } from "~/lib/api/types/recipe";
|
||||
|
||||
const categoryStore: Ref<RecipeCategory[]> = ref([]);
|
||||
const publicStoreLoading = ref(false);
|
||||
const storeLoading = ref(false);
|
||||
|
||||
export function useCategoryData() {
|
||||
const data = reactive({
|
||||
@@ -27,7 +29,7 @@ export function useCategoryData() {
|
||||
|
||||
export function usePublicCategoryStore(groupSlug: string) {
|
||||
const api = usePublicExploreApi(groupSlug).explore;
|
||||
const loading = ref(false);
|
||||
const loading = publicStoreLoading;
|
||||
|
||||
const actions = {
|
||||
...usePublicStoreActions<RecipeCategory>(api.categories, categoryStore, loading),
|
||||
@@ -36,7 +38,7 @@ export function usePublicCategoryStore(groupSlug: string) {
|
||||
},
|
||||
};
|
||||
|
||||
if (!categoryStore.value || categoryStore.value?.length === 0) {
|
||||
if (!loading.value && (!categoryStore.value || categoryStore.value?.length === 0)) {
|
||||
actions.getAll();
|
||||
}
|
||||
|
||||
@@ -50,7 +52,7 @@ export function usePublicCategoryStore(groupSlug: string) {
|
||||
export function useCategoryStore() {
|
||||
// passing the group slug switches to using the public API
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
const loading = storeLoading;
|
||||
|
||||
const actions = {
|
||||
...useStoreActions<RecipeCategory>(api.categories, categoryStore, loading),
|
||||
@@ -59,7 +61,7 @@ export function useCategoryStore() {
|
||||
},
|
||||
};
|
||||
|
||||
if (!categoryStore.value || categoryStore.value?.length === 0) {
|
||||
if (!loading.value && (!categoryStore.value || categoryStore.value?.length === 0)) {
|
||||
actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import { useUserApi } from "~/composables/api";
|
||||
import { IngredientFood } from "~/lib/api/types/recipe";
|
||||
|
||||
let foodStore: Ref<IngredientFood[] | null> = ref([]);
|
||||
const publicStoreLoading = ref(false);
|
||||
const storeLoading = ref(false);
|
||||
|
||||
/**
|
||||
* useFoodData returns a template reactive object
|
||||
@@ -34,7 +36,7 @@ export const useFoodData = function () {
|
||||
|
||||
export const usePublicFoodStore = function (groupSlug: string) {
|
||||
const api = usePublicExploreApi(groupSlug).explore;
|
||||
const loading = ref(false);
|
||||
const loading = publicStoreLoading;
|
||||
|
||||
const actions = {
|
||||
...usePublicStoreActions(api.foods, foodStore, loading),
|
||||
@@ -43,7 +45,7 @@ export const usePublicFoodStore = function (groupSlug: string) {
|
||||
},
|
||||
};
|
||||
|
||||
if (!foodStore.value || foodStore.value.length === 0) {
|
||||
if (!loading.value && (!foodStore.value || foodStore.value.length === 0)) {
|
||||
foodStore = actions.getAll();
|
||||
}
|
||||
|
||||
@@ -52,7 +54,7 @@ export const usePublicFoodStore = function (groupSlug: string) {
|
||||
|
||||
export const useFoodStore = function () {
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
const loading = storeLoading;
|
||||
|
||||
const actions = {
|
||||
...useStoreActions(api.foods, foodStore, loading),
|
||||
@@ -61,7 +63,7 @@ export const useFoodStore = function () {
|
||||
},
|
||||
};
|
||||
|
||||
if (!foodStore.value || foodStore.value.length === 0) {
|
||||
if (!loading.value && (!foodStore.value || foodStore.value.length === 0)) {
|
||||
foodStore = actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { MultiPurposeLabelOut } from "~/lib/api/types/labels";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
|
||||
let labelStore: Ref<MultiPurposeLabelOut[] | null> = ref([]);
|
||||
const storeLoading = ref(false);
|
||||
|
||||
export function useLabelData() {
|
||||
const data = reactive({
|
||||
@@ -28,7 +29,7 @@ export function useLabelData() {
|
||||
|
||||
export function useLabelStore() {
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
const loading = storeLoading;
|
||||
|
||||
const actions = {
|
||||
...useStoreActions<MultiPurposeLabelOut>(api.multiPurposeLabels, labelStore, loading),
|
||||
@@ -37,7 +38,7 @@ export function useLabelStore() {
|
||||
},
|
||||
};
|
||||
|
||||
if (!labelStore.value || labelStore.value?.length === 0) {
|
||||
if (!loading.value && (!labelStore.value || labelStore.value?.length === 0)) {
|
||||
labelStore = actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import { useUserApi } from "~/composables/api";
|
||||
import { RecipeTag } from "~/lib/api/types/admin";
|
||||
|
||||
const items: Ref<RecipeTag[]> = ref([]);
|
||||
const publicStoreLoading = ref(false);
|
||||
const storeLoading = ref(false);
|
||||
|
||||
export function useTagData() {
|
||||
const data = reactive({
|
||||
@@ -27,7 +29,7 @@ export function useTagData() {
|
||||
|
||||
export function usePublicTagStore(groupSlug: string) {
|
||||
const api = usePublicExploreApi(groupSlug).explore;
|
||||
const loading = ref(false);
|
||||
const loading = publicStoreLoading;
|
||||
|
||||
const actions = {
|
||||
...usePublicStoreActions<RecipeTag>(api.tags, items, loading),
|
||||
@@ -36,7 +38,7 @@ export function usePublicTagStore(groupSlug: string) {
|
||||
},
|
||||
};
|
||||
|
||||
if (!items.value || items.value?.length === 0) {
|
||||
if (!loading.value && (!items.value || items.value?.length === 0)) {
|
||||
actions.getAll();
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ export function usePublicTagStore(groupSlug: string) {
|
||||
|
||||
export function useTagStore() {
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
const loading = storeLoading;
|
||||
|
||||
const actions = {
|
||||
...useStoreActions<RecipeTag>(api.tags, items, loading),
|
||||
@@ -58,7 +60,7 @@ export function useTagStore() {
|
||||
},
|
||||
};
|
||||
|
||||
if (!items.value || items.value?.length === 0) {
|
||||
if (!loading.value && (!items.value || items.value?.length === 0)) {
|
||||
actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import { useUserApi } from "~/composables/api";
|
||||
import { RecipeTool } from "~/lib/api/types/recipe";
|
||||
|
||||
const toolStore: Ref<RecipeTool[]> = ref([]);
|
||||
const publicStoreLoading = ref(false);
|
||||
const storeLoading = ref(false);
|
||||
|
||||
export function useToolData() {
|
||||
const data = reactive({
|
||||
@@ -29,7 +31,7 @@ export function useToolData() {
|
||||
|
||||
export function usePublicToolStore(groupSlug: string) {
|
||||
const api = usePublicExploreApi(groupSlug).explore;
|
||||
const loading = ref(false);
|
||||
const loading = publicStoreLoading;
|
||||
|
||||
const actions = {
|
||||
...usePublicStoreActions<RecipeTool>(api.tools, toolStore, loading),
|
||||
@@ -38,7 +40,7 @@ export function usePublicToolStore(groupSlug: string) {
|
||||
},
|
||||
};
|
||||
|
||||
if (!toolStore.value || toolStore.value?.length === 0) {
|
||||
if (!loading.value && (!toolStore.value || toolStore.value?.length === 0)) {
|
||||
actions.getAll();
|
||||
}
|
||||
|
||||
@@ -51,7 +53,7 @@ export function usePublicToolStore(groupSlug: string) {
|
||||
|
||||
export function useToolStore() {
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
const loading = storeLoading;
|
||||
|
||||
const actions = {
|
||||
...useStoreActions<RecipeTool>(api.tools, toolStore, loading),
|
||||
@@ -60,7 +62,7 @@ export function useToolStore() {
|
||||
},
|
||||
};
|
||||
|
||||
if (!toolStore.value || toolStore.value?.length === 0) {
|
||||
if (!loading.value && (!toolStore.value || toolStore.value?.length === 0)) {
|
||||
actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useUserApi } from "~/composables/api";
|
||||
import { IngredientUnit } from "~/lib/api/types/recipe";
|
||||
|
||||
let unitStore: Ref<IngredientUnit[] | null> = ref([]);
|
||||
const storeLoading = ref(false);
|
||||
|
||||
/**
|
||||
* useUnitData returns a template reactive object
|
||||
@@ -35,7 +36,7 @@ export const useUnitData = function () {
|
||||
|
||||
export const useUnitStore = function () {
|
||||
const api = useUserApi();
|
||||
const loading = ref(false);
|
||||
const loading = storeLoading;
|
||||
|
||||
const actions = {
|
||||
...useStoreActions<IngredientUnit>(api.units, unitStore, loading),
|
||||
@@ -44,7 +45,7 @@ export const useUnitStore = function () {
|
||||
},
|
||||
};
|
||||
|
||||
if (!unitStore.value || unitStore.value.length === 0) {
|
||||
if (!loading.value && (!unitStore.value || unitStore.value.length === 0)) {
|
||||
unitStore = actions.getAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ export const useCookbooks = function () {
|
||||
this.refreshAll();
|
||||
}
|
||||
loading.value = false;
|
||||
return data;
|
||||
},
|
||||
|
||||
async updateOrder() {
|
||||
|
||||
@@ -1,30 +1,39 @@
|
||||
import { useAsync, ref } from "@nuxtjs/composition-api";
|
||||
import { useAsyncKey } from "./use-utils";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { GroupBase } from "~/lib/api/types/user";
|
||||
import { GroupBase, GroupSummary } from "~/lib/api/types/user";
|
||||
|
||||
const groupSelfRef = ref<GroupSummary | null>(null);
|
||||
const loading = ref(false);
|
||||
|
||||
export const useGroupSelf = function () {
|
||||
const api = useUserApi();
|
||||
async function refreshGroupSelf() {
|
||||
loading.value = true;
|
||||
const { data } = await api.groups.getCurrentUserGroup();
|
||||
groupSelfRef.value = data;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
const actions = {
|
||||
get() {
|
||||
const group = useAsync(async () => {
|
||||
const { data } = await api.groups.getCurrentUserGroup();
|
||||
if (!(groupSelfRef.value || loading.value)) {
|
||||
refreshGroupSelf();
|
||||
}
|
||||
|
||||
return data;
|
||||
}, useAsyncKey());
|
||||
|
||||
return group;
|
||||
return groupSelfRef;
|
||||
},
|
||||
async updatePreferences() {
|
||||
if (!group.value?.preferences) {
|
||||
if (!groupSelfRef.value) {
|
||||
await refreshGroupSelf();
|
||||
}
|
||||
if (!groupSelfRef.value?.preferences) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { data } = await api.groups.setPreferences(group.value.preferences);
|
||||
const { data } = await api.groups.setPreferences(groupSelfRef.value.preferences);
|
||||
|
||||
if (data) {
|
||||
group.value.preferences = data;
|
||||
groupSelfRef.value.preferences = data;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// This Code is auto generated by gen_global_components.py
|
||||
// This Code is auto generated by gen_ts_locales.py
|
||||
export const LOCALES = [
|
||||
{
|
||||
name: "繁體中文 (Chinese traditional)",
|
||||
value: "zh-TW",
|
||||
progress: 30,
|
||||
progress: 29,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -15,7 +15,7 @@ export const LOCALES = [
|
||||
{
|
||||
name: "Tiếng Việt (Vietnamese)",
|
||||
value: "vi-VN",
|
||||
progress: 1,
|
||||
progress: 0,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -27,43 +27,43 @@ export const LOCALES = [
|
||||
{
|
||||
name: "Türkçe (Turkish)",
|
||||
value: "tr-TR",
|
||||
progress: 53,
|
||||
progress: 62,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Svenska (Swedish)",
|
||||
value: "sv-SE",
|
||||
progress: 94,
|
||||
progress: 99,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "српски (Serbian)",
|
||||
value: "sr-SP",
|
||||
progress: 32,
|
||||
progress: 31,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Slovenian",
|
||||
value: "sl-SI",
|
||||
progress: 47,
|
||||
progress: 49,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Slovak",
|
||||
value: "sk-SK",
|
||||
progress: 93,
|
||||
progress: 91,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Pусский (Russian)",
|
||||
value: "ru-RU",
|
||||
progress: 98,
|
||||
progress: 99,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Română (Romanian)",
|
||||
value: "ro-RO",
|
||||
progress: 42,
|
||||
progress: 44,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -75,19 +75,19 @@ export const LOCALES = [
|
||||
{
|
||||
name: "Português do Brasil (Brazilian Portuguese)",
|
||||
value: "pt-BR",
|
||||
progress: 97,
|
||||
progress: 95,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Polski (Polish)",
|
||||
value: "pl-PL",
|
||||
progress: 98,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Norsk (Norwegian)",
|
||||
value: "no-NO",
|
||||
progress: 99,
|
||||
progress: 97,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -99,25 +99,25 @@ export const LOCALES = [
|
||||
{
|
||||
name: "Latvian",
|
||||
value: "lv-LV",
|
||||
progress: 1,
|
||||
progress: 0,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Lithuanian",
|
||||
value: "lt-LT",
|
||||
progress: 93,
|
||||
progress: 91,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "한국어 (Korean)",
|
||||
value: "ko-KR",
|
||||
progress: 5,
|
||||
progress: 3,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "日本語 (Japanese)",
|
||||
value: "ja-JP",
|
||||
progress: 12,
|
||||
progress: 11,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -135,25 +135,25 @@ export const LOCALES = [
|
||||
{
|
||||
name: "Magyar (Hungarian)",
|
||||
value: "hu-HU",
|
||||
progress: 100,
|
||||
progress: 98,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Croatian",
|
||||
value: "hr-HR",
|
||||
progress: 93,
|
||||
progress: 91,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "עברית (Hebrew)",
|
||||
value: "he-IL",
|
||||
progress: 97,
|
||||
progress: 98,
|
||||
dir: "rtl",
|
||||
},
|
||||
{
|
||||
name: "Galician",
|
||||
value: "gl-ES",
|
||||
progress: 1,
|
||||
progress: 3,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -165,19 +165,19 @@ export const LOCALES = [
|
||||
{
|
||||
name: "French, Canada",
|
||||
value: "fr-CA",
|
||||
progress: 97,
|
||||
progress: 95,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Suomi (Finnish)",
|
||||
value: "fi-FI",
|
||||
progress: 91,
|
||||
progress: 89,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Español (Spanish)",
|
||||
value: "es-ES",
|
||||
progress: 79,
|
||||
progress: 93,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -189,13 +189,13 @@ export const LOCALES = [
|
||||
{
|
||||
name: "British English",
|
||||
value: "en-GB",
|
||||
progress: 3,
|
||||
progress: 2,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Ελληνικά (Greek)",
|
||||
value: "el-GR",
|
||||
progress: 34,
|
||||
progress: 33,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -219,7 +219,7 @@ export const LOCALES = [
|
||||
{
|
||||
name: "Català (Catalan)",
|
||||
value: "ca-ES",
|
||||
progress: 75,
|
||||
progress: 74,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
@@ -231,13 +231,13 @@ export const LOCALES = [
|
||||
{
|
||||
name: "العربية (Arabic)",
|
||||
value: "ar-SA",
|
||||
progress: 20,
|
||||
progress: 18,
|
||||
dir: "rtl",
|
||||
},
|
||||
{
|
||||
name: "Afrikaans (Afrikaans)",
|
||||
value: "af-ZA",
|
||||
progress: 92,
|
||||
progress: 90,
|
||||
dir: "ltr",
|
||||
},
|
||||
]
|
||||
|
||||
20
frontend/composables/use-navigation-warning.ts
Normal file
20
frontend/composables/use-navigation-warning.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export function useNavigationWarning() {
|
||||
return { activateNavigationWarning, deactivateNavigationWarning };
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a warning before the user navigates to another page
|
||||
* e.g., by clicking a link (which isn't internal and rendered without page load),
|
||||
* reloading the page,
|
||||
* or closing the tab.
|
||||
*/
|
||||
const activateNavigationWarning = () => {
|
||||
window.onbeforeunload = () => true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the warning when navigating to a page
|
||||
*/
|
||||
const deactivateNavigationWarning = () => {
|
||||
window.onbeforeunload = null;
|
||||
}
|
||||
30
frontend/composables/use-setup/common-settings-form.ts
Normal file
30
frontend/composables/use-setup/common-settings-form.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { useContext } from "@nuxtjs/composition-api";
|
||||
import { fieldTypes } from "../forms";
|
||||
import { AutoFormItems } from "~/types/auto-forms";
|
||||
|
||||
export const useCommonSettingsForm = () => {
|
||||
const { i18n } = useContext();
|
||||
|
||||
const commonSettingsForm: AutoFormItems = [
|
||||
{
|
||||
section: i18n.tc("profile.group-settings"),
|
||||
label: i18n.tc("group.enable-public-access"),
|
||||
hint: i18n.tc("group.enable-public-access-description"),
|
||||
varName: "makeGroupRecipesPublic",
|
||||
type: fieldTypes.BOOLEAN,
|
||||
rules: ["required"],
|
||||
},
|
||||
{
|
||||
section: i18n.tc("data-pages.data-management"),
|
||||
label: i18n.tc("user-registration.use-seed-data"),
|
||||
hint: i18n.tc("user-registration.use-seed-data-description"),
|
||||
varName: "useSeedData",
|
||||
type: fieldTypes.BOOLEAN,
|
||||
rules: ["required"],
|
||||
},
|
||||
];
|
||||
|
||||
return {
|
||||
commonSettingsForm,
|
||||
}
|
||||
}
|
||||
1
frontend/composables/use-setup/index.ts
Normal file
1
frontend/composables/use-setup/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { useCommonSettingsForm } from "./common-settings-form";
|
||||
@@ -1 +1,3 @@
|
||||
export { useUserForm } from "./user-form";
|
||||
export { useUserRegistrationForm } from "./user-registration-form";
|
||||
export { useUserSelfRatings } from "./user-ratings";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Ref, useContext } from "@nuxtjs/composition-api";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { TimelineEventType } from "~/lib/api/types/recipe";
|
||||
|
||||
export interface UserPrintPreferences {
|
||||
imagePosition: string;
|
||||
@@ -19,14 +20,17 @@ export interface UserRecipePreferences {
|
||||
filterNull: boolean;
|
||||
sortIcon: string;
|
||||
useMobileCards: boolean;
|
||||
searchQuery: string;
|
||||
}
|
||||
|
||||
export interface UserShoppingListPreferences {
|
||||
viewAllLists: boolean;
|
||||
viewByLabel: boolean;
|
||||
}
|
||||
|
||||
export interface UserTimelinePreferences {
|
||||
orderDirection: string;
|
||||
types: TimelineEventType[];
|
||||
}
|
||||
|
||||
export function useUserPrintPreferences(): Ref<UserPrintPreferences> {
|
||||
@@ -56,6 +60,7 @@ export function useUserSortPreferences(): Ref<UserRecipePreferences> {
|
||||
filterNull: false,
|
||||
sortIcon: $globals.icons.sortAlphabeticalAscending,
|
||||
useMobileCards: false,
|
||||
searchQuery: "",
|
||||
},
|
||||
{ mergeDefaults: true }
|
||||
// we cast to a Ref because by default it will return an optional type ref
|
||||
@@ -70,6 +75,7 @@ export function useShoppingListPreferences(): Ref<UserShoppingListPreferences> {
|
||||
const fromStorage = useLocalStorage(
|
||||
"shopping-list-preferences",
|
||||
{
|
||||
viewAllLists: false,
|
||||
viewByLabel: false,
|
||||
},
|
||||
{ mergeDefaults: true }
|
||||
@@ -85,6 +91,7 @@ export function useTimelinePreferences(): Ref<UserTimelinePreferences> {
|
||||
"timeline-preferences",
|
||||
{
|
||||
orderDirection: "asc",
|
||||
types: ["info", "system", "comment"] as TimelineEventType[],
|
||||
},
|
||||
{ mergeDefaults: true }
|
||||
// we cast to a Ref because by default it will return an optional type ref
|
||||
|
||||
@@ -38,7 +38,7 @@ export const useUserForm = () => {
|
||||
type: fieldTypes.SELECT,
|
||||
hint: i18n.tc("user.authentication-method-hint"),
|
||||
disableCreate: true,
|
||||
options: [{ text: "Mealie" }, { text: "LDAP" }],
|
||||
options: [{ text: "Mealie" }, { text: "LDAP" }, { text: "OIDC" }],
|
||||
},
|
||||
{
|
||||
section: i18n.tc("user.permissions"),
|
||||
|
||||
40
frontend/composables/use-users/user-ratings.ts
Normal file
40
frontend/composables/use-users/user-ratings.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { ref, useContext } from "@nuxtjs/composition-api";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { UserRatingSummary } from "~/lib/api/types/user";
|
||||
|
||||
const userRatings = ref<UserRatingSummary[]>([]);
|
||||
const loading = ref(false);
|
||||
const ready = ref(false);
|
||||
|
||||
export const useUserSelfRatings = function () {
|
||||
const { $auth } = useContext();
|
||||
const api = useUserApi();
|
||||
|
||||
async function refreshUserRatings() {
|
||||
if (loading.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
const { data } = await api.users.getSelfRatings();
|
||||
userRatings.value = data?.ratings || [];
|
||||
loading.value = false;
|
||||
ready.value = true;
|
||||
}
|
||||
|
||||
async function setRating(slug: string, rating: number | null, isFavorite: boolean | null) {
|
||||
loading.value = true;
|
||||
const userId = $auth.user?.id || "";
|
||||
await api.users.setRating(userId, slug, rating, isFavorite);
|
||||
loading.value = false;
|
||||
await refreshUserRatings();
|
||||
}
|
||||
|
||||
refreshUserRatings();
|
||||
return {
|
||||
userRatings,
|
||||
refreshUserRatings,
|
||||
setRating,
|
||||
ready,
|
||||
}
|
||||
}
|
||||
87
frontend/composables/use-users/user-registration-form.ts
Normal file
87
frontend/composables/use-users/user-registration-form.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import { ref, Ref, useContext } from "@nuxtjs/composition-api";
|
||||
import { useAsyncValidator } from "~/composables/use-validators";
|
||||
import { VForm } from "~/types/vuetify";
|
||||
import { usePublicApi } from "~/composables/api/api-client";
|
||||
|
||||
const domAccountForm = ref<VForm | null>(null);
|
||||
const username = ref("");
|
||||
const fullName = ref("");
|
||||
const email = ref("");
|
||||
const password1 = ref("");
|
||||
const password2 = ref("");
|
||||
const advancedOptions = ref(false);
|
||||
|
||||
export const useUserRegistrationForm = () => {
|
||||
const { i18n } = useContext();
|
||||
function safeValidate(form: Ref<VForm | null>) {
|
||||
if (form.value && form.value.validate) {
|
||||
return form.value.validate();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// ================================================================
|
||||
// Provide Group Details
|
||||
const publicApi = usePublicApi();
|
||||
// ================================================================
|
||||
// Provide Account Details
|
||||
|
||||
const usernameErrorMessages = ref<string[]>([]);
|
||||
const { validate: validateUsername, valid: validUsername } = useAsyncValidator(
|
||||
username,
|
||||
(v: string) => publicApi.validators.username(v),
|
||||
i18n.tc("validation.username-is-taken"),
|
||||
usernameErrorMessages
|
||||
);
|
||||
const emailErrorMessages = ref<string[]>([]);
|
||||
const { validate: validateEmail, valid: validEmail } = useAsyncValidator(
|
||||
email,
|
||||
(v: string) => publicApi.validators.email(v),
|
||||
i18n.tc("validation.email-is-taken"),
|
||||
emailErrorMessages
|
||||
);
|
||||
const accountDetails = {
|
||||
username,
|
||||
fullName,
|
||||
email,
|
||||
advancedOptions,
|
||||
validate: async () => {
|
||||
if (!(validUsername.value && validEmail.value)) {
|
||||
await Promise.all([validateUsername(), validateEmail()]);
|
||||
}
|
||||
|
||||
return (safeValidate(domAccountForm as Ref<VForm>) && validUsername.value && validEmail.value);
|
||||
},
|
||||
reset: () => {
|
||||
accountDetails.username.value = "";
|
||||
accountDetails.fullName.value = "";
|
||||
accountDetails.email.value = "";
|
||||
accountDetails.advancedOptions.value = false;
|
||||
},
|
||||
};
|
||||
// ================================================================
|
||||
// Provide Credentials
|
||||
const passwordMatch = () => password1.value === password2.value || i18n.tc("user.password-must-match");
|
||||
const credentials = {
|
||||
password1,
|
||||
password2,
|
||||
passwordMatch,
|
||||
reset: () => {
|
||||
credentials.password1.value = "";
|
||||
credentials.password2.value = "";
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
accountDetails,
|
||||
credentials,
|
||||
emailErrorMessages,
|
||||
usernameErrorMessages,
|
||||
// Fields
|
||||
advancedOptions,
|
||||
// Validators
|
||||
validateUsername,
|
||||
validateEmail,
|
||||
// Dom Refs
|
||||
domAccountForm,
|
||||
};
|
||||
};
|
||||
@@ -80,10 +80,12 @@
|
||||
"recipe-events": "Recipe Events"
|
||||
},
|
||||
"general": {
|
||||
"add": "Add",
|
||||
"cancel": "Kanselleer",
|
||||
"clear": "Maak skoon",
|
||||
"close": "Maak toe",
|
||||
"confirm": "Bevestig",
|
||||
"confirm-how-does-everything-look": "How does everything look?",
|
||||
"confirm-delete-generic": "Is jy seker jy wil dit uitvee?",
|
||||
"copied_message": "Gekopieër!",
|
||||
"create": "Skep",
|
||||
@@ -142,14 +144,18 @@
|
||||
"save": "Stoor",
|
||||
"settings": "Verstellings",
|
||||
"share": "Deel",
|
||||
"show-all": "Show All",
|
||||
"shuffle": "Skommel",
|
||||
"sort": "Sorteer",
|
||||
"sort-ascending": "Sort Ascending",
|
||||
"sort-descending": "Sort Descending",
|
||||
"sort-alphabetically": "Alfabeties",
|
||||
"status": "Status",
|
||||
"subject": "Onderwerp",
|
||||
"submit": "Dien in",
|
||||
"success-count": "Sukses: {count}",
|
||||
"sunday": "Sondag",
|
||||
"system": "System",
|
||||
"templates": "Sjablone:",
|
||||
"test": "Toets",
|
||||
"themes": "Temas",
|
||||
@@ -168,6 +174,7 @@
|
||||
"units": "Eenhede",
|
||||
"back": "Terug",
|
||||
"next": "Volgende",
|
||||
"start": "Start",
|
||||
"toggle-view": "Wissel aansig",
|
||||
"date": "Datum",
|
||||
"id": "Id",
|
||||
@@ -200,7 +207,8 @@
|
||||
"created-on-date": "Geskep op: {0}",
|
||||
"unsaved-changes": "You have unsaved changes. Do you want to save before leaving? Okay to save, Cancel to discard changes.",
|
||||
"clipboard-copy-failure": "Failed to copy to the clipboard.",
|
||||
"confirm-delete-generic-items": "Are you sure you want to delete the following items?"
|
||||
"confirm-delete-generic-items": "Are you sure you want to delete the following items?",
|
||||
"organizers": "Organizers"
|
||||
},
|
||||
"group": {
|
||||
"are-you-sure-you-want-to-delete-the-group": "Is jy seker jy wil <b>{groupName}<b/> uitvee?",
|
||||
@@ -236,6 +244,8 @@
|
||||
"group-preferences": "Groepvoorkeure",
|
||||
"private-group": "Privaat group",
|
||||
"private-group-description": "Deur jou groep op privaat te stel, stel alle publieke kykopsies op verstek. Dit oorskryf die verstellings per resep.",
|
||||
"enable-public-access": "Enable Public Access",
|
||||
"enable-public-access-description": "Make group recipes public by default, and allow visitors to view recipes without logging-in",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes": "Laat gebruikers buite jou groep toe om jou resepte te sien",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes-description": "Indien hierdie opsie aangeskakel is, kan jy 'n resep met enigiemand deel. Sonder dat hulle 'n rekening het. As hierdie opsie afgeskakel is, kan jy net 'n resep met mense in jou groep deel. Of met 'n voorafgemaakte private skakel",
|
||||
"show-nutrition-information": "Wys voedingsinligting",
|
||||
@@ -349,10 +359,11 @@
|
||||
},
|
||||
"recipe-data-migrations": "Resep migrasie",
|
||||
"recipe-data-migrations-explanation": "Jy kan resepte vanaf 'n ander program in Mealie invoer. Op hierdie manier kan jy vinnig aan die gang kom.",
|
||||
"coming-from-another-application-or-an-even-older-version-of-mealie": "Coming from another application or an even older version of Mealie? Check out migrations and see if your data can be imported.",
|
||||
"choose-migration-type": "Kies die tipe migrasie",
|
||||
"tag-all-recipes": "Merk alle resepte met {tag-name}-merker",
|
||||
"nextcloud-text": "Nextcloud-resepte kan ingevoer word vanaf 'n zip-dokument wat die data bevat wat in Nextcloud gestoor is. Sien die voorbeeldstruktuur hieronder om te verseker dat jou resepte ingevoer kan word.",
|
||||
"chowdown-text": "Mealie kan invoer vanaf Chowdown. Laai die .zip-dokument daar af. En laai dit hier op",
|
||||
"chowdown-text": "Mealie natively supports the chowdown repository format. Download the code repository as a .zip file and upload it below.",
|
||||
"recipe-1": "Resep 1",
|
||||
"recipe-2": "Resep 2",
|
||||
"paprika-text": "Mealie kan resepte vanaf die Paprika-program invoer. Voer jou resepte uit Paprika uit, hernoem die uitvoeruitbreiding na .zip en laai dit hieronder op.",
|
||||
@@ -360,6 +371,10 @@
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie kan resepte invoer vanaf Plan to Eat."
|
||||
},
|
||||
"myrecipebox": {
|
||||
"title": "My Recipe Box",
|
||||
"description-long": "Mealie can import recipes from My Recipe Box. Export your recipes in CSV format, then upload the .csv file below."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
@@ -494,6 +509,8 @@
|
||||
"cook-mode": "Kook modus",
|
||||
"link-ingredients": "Koppel bestanddele",
|
||||
"merge-above": "Voeg bogenoemde saam",
|
||||
"move-to-bottom": "Move To Bottom",
|
||||
"move-to-top": "Move To Top",
|
||||
"reset-scale": "Stel skaal terug",
|
||||
"decrease-scale-label": "Verminder die skaal met 1",
|
||||
"increase-scale-label": "Verhoog skaal met 1",
|
||||
@@ -509,6 +526,7 @@
|
||||
"edit-timeline-event": "Wysig tydlyn gebeurtenis",
|
||||
"timeline": "Tydlyn",
|
||||
"timeline-is-empty": "Nog niks op die tydlyn nie. Probeer hierdie resep maak!",
|
||||
"timeline-no-events-found-try-adjusting-filters": "No events found. Try adjusting your search filters.",
|
||||
"group-global-timeline": "{groupName} Algemene tydlyn",
|
||||
"open-timeline": "Maak tydlyn oop",
|
||||
"made-this": "Ek het dit gemaak",
|
||||
@@ -529,6 +547,8 @@
|
||||
"looking-for-migrations": "Op soek na migrasies?",
|
||||
"import-with-url": "Voer in via URL",
|
||||
"create-recipe": "Skep resep",
|
||||
"create-recipe-description": "Create a new recipe from scratch.",
|
||||
"create-recipes": "Create Recipes",
|
||||
"import-with-zip": "Voer in met .zip",
|
||||
"create-recipe-from-an-image": "Skep 'n resep vanaf 'n foto",
|
||||
"bulk-url-import": "Grootmaat-URL-invoer",
|
||||
@@ -599,7 +619,7 @@
|
||||
"import-summary": "Invoeropsomming",
|
||||
"partial-backup": "Gedeeltelike back-up",
|
||||
"unable-to-delete-backup": "Kon nie back-up verwyder nie.",
|
||||
"experimental-description": "Back-up skep 'n momentopname van die werf se databasis en data directory. Dit sluit alle data in en kan nie gestel word om substelle data uit te sluit nie. Jy kan dit as 'n momentopname van Mealie neem. Dit dien as 'n agnostiese manier om data uit te voer en in te voer, of om die webwerf na 'n eksterne ligging te back-up.",
|
||||
"experimental-description": "Backups are total snapshots of the database and data directory of the site. This includes all data and cannot be set to exclude subsets of data. You can think of this as a snapshot of Mealie at a specific time. These serve as a database agnostic way to export and import data, or back up the site to an external location.",
|
||||
"backup-restore": "Herlaai vanaf back-up",
|
||||
"back-restore-description": "Die herstel van hierdie back-up sal alle huidige data in jou databasis en in die data-lêergids oorskryf. {cannot-be-undone} As die herstel suksesvol was, sal jy afgemeld word.",
|
||||
"cannot-be-undone": "Hierdie aksie kan nie ongedaan gemaak word nie - gebruik met omsigtigheid.",
|
||||
@@ -724,7 +744,10 @@
|
||||
"ldap-ready-error-text": "Nie alle LDAP-waardes is opgestel nie. Dit kan geïgnoreer word as jy nie LDAP-verifikasie gebruik nie.",
|
||||
"ldap-ready-success-text": "Vereiste LDAP-veranderlikes is volledig ingestel.",
|
||||
"build": "Build",
|
||||
"recipe-scraper-version": "Resep skraper weergawe"
|
||||
"recipe-scraper-version": "Resep skraper weergawe",
|
||||
"oidc-ready": "OIDC Klar",
|
||||
"oidc-ready-error-text": "Ikke alle OIDC værdier er konfigureret. Dette kan ignoreres hvis du ikke bruger OIDC godkendelse.",
|
||||
"oidc-ready-success-text": "Krævede OIDC variabler er udfyldt."
|
||||
},
|
||||
"shopping-list": {
|
||||
"all-lists": "Alle lyste",
|
||||
@@ -832,8 +855,11 @@
|
||||
"link-id": "Skakel ID",
|
||||
"link-name": "Skakel naam",
|
||||
"login": "Meld aan",
|
||||
"login-oidc": "Log ind med",
|
||||
"or": "eller",
|
||||
"logout": "Teken uit",
|
||||
"manage-users": "Bestuur gebruikers",
|
||||
"manage-users-description": "Create and manage users.",
|
||||
"new-password": "Nuwe wagwoord",
|
||||
"new-user": "Nuwe gebruiker",
|
||||
"password-has-been-reset-to-the-default-password": "Wagwoord is teruggestel na die verstekwagwoord",
|
||||
@@ -1129,24 +1155,34 @@
|
||||
"background-tasks": "Agtergrond take",
|
||||
"background-tasks-description": "Hier kan jy al die lopende agtergrond take en hul status sien",
|
||||
"no-logs-found": "Geen logs gevind",
|
||||
"tasks": "Take"
|
||||
"tasks": "Take",
|
||||
"setup": {
|
||||
"first-time-setup": "First Time Setup",
|
||||
"welcome-to-mealie-get-started": "Welcome to Mealie! Let's get started",
|
||||
"already-set-up-bring-to-homepage": "I'm already set up, just bring me to the homepage",
|
||||
"common-settings-for-new-sites": "Here are some common settings for new sites",
|
||||
"setup-complete": "Setup Complete!",
|
||||
"here-are-a-few-things-to-help-you-get-started": "Here are a few things to help you get started with Mealie",
|
||||
"restore-from-v1-backup": "Have a backup from a previous instance of Mealie v1? You can restore it here.",
|
||||
"manage-profile-or-get-invite-link": "Manage your own profile, or grab an invite link to share with others."
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"welcome-user": "Welkom, {0}",
|
||||
"welcome-user": "👋 Welcome, {0}!",
|
||||
"description": "Bestuur jou profiel, resepte en groepverstellings.",
|
||||
"get-invite-link": "Kry uitnodigingskakel",
|
||||
"get-public-link": "Kry openbare skakel",
|
||||
"account-summary": "Rekeningopsomming",
|
||||
"account-summary-description": "Hier is 'n opsomming van jou groep se inligting",
|
||||
"account-summary-description": "Here's a summary of your group's information.",
|
||||
"group-statistics": "Groepstatistieke",
|
||||
"group-statistics-description": "Jou groepstatistieke gee 'n bietjie insig hoe jy Mealie gebruik.",
|
||||
"storage-capacity": "Stoorkapasiteit",
|
||||
"storage-capacity-description": "Jou stoorkapasiteit is 'n berekening van die prente en dokumente wat jy opgelaai het.",
|
||||
"personal": "Persoonlik",
|
||||
"personal-description": "Dit is jou persoonlike verstellings. Veranderinge hier sal nie ander gebruikers beïnvloed nie",
|
||||
"personal-description": "These are settings that are personal to you. Changes here won't affect other users.",
|
||||
"user-settings": "Gebruikers verstellings",
|
||||
"user-settings-description": "Bestuur jou voorkeure, verander jou wagwoord en werk jou e-posadres op",
|
||||
"api-tokens-description": "Bestuur jou API-tokens vir toegang vanaf eksterne toepassings",
|
||||
"user-settings-description": "Manage your preferences, change your password, and update your email.",
|
||||
"api-tokens-description": "Manage your API Tokens for access from external applications.",
|
||||
"group-description": "Hierdie items word binne jou groep gedeel. Deur een van hulle te wysig, sal dit vir die hele groep verander!",
|
||||
"group-settings": "Groep verstellings",
|
||||
"group-settings-description": "Bestuur jou algemene groep verstellings soos eetplan en privaatheidinstellings.",
|
||||
@@ -1157,9 +1193,9 @@
|
||||
"notifiers": "Kennisgewers",
|
||||
"notifiers-description": "Stel e-pos- en stootkennisgewings op wat deur spesifieke gebeurtenisse geaktiveer word.",
|
||||
"manage-data": "Databestuur",
|
||||
"manage-data-description": "Bestuur jou kos en eenhede (meer opsies kom binnekort)",
|
||||
"manage-data-description": "Manage your Mealie data; Foods, Units, Categories, Tags and more.",
|
||||
"data-migrations": "Data-migrasies",
|
||||
"data-migrations-description": "Migreer jou bestaande data vanaf ander toepassings, soos Nextcloud-resepte en Chowdown",
|
||||
"data-migrations-description": "Migrate your existing data from other applications like Nextcloud Recipes and Chowdown.",
|
||||
"email-sent": "E-pos gestuur",
|
||||
"error-sending-email": "Kon nie die e-pos stuur nie",
|
||||
"personal-information": "Persoonlike inligting",
|
||||
|
||||
@@ -80,10 +80,12 @@
|
||||
"recipe-events": "Recipe Events"
|
||||
},
|
||||
"general": {
|
||||
"add": "Add",
|
||||
"cancel": "إلغاء",
|
||||
"clear": "مسح",
|
||||
"close": "إغلاق",
|
||||
"confirm": "تأكيد",
|
||||
"confirm-how-does-everything-look": "How does everything look?",
|
||||
"confirm-delete-generic": "هل انت متأكد من حذف هذا؟",
|
||||
"copied_message": "تم النسخ!",
|
||||
"create": "إنشاء",
|
||||
@@ -142,14 +144,18 @@
|
||||
"save": "حفظ",
|
||||
"settings": "الإعدادات",
|
||||
"share": "مشاركة",
|
||||
"show-all": "Show All",
|
||||
"shuffle": "ترتيب عشوائي",
|
||||
"sort": "ترتيب",
|
||||
"sort-ascending": "Sort Ascending",
|
||||
"sort-descending": "Sort Descending",
|
||||
"sort-alphabetically": "ترتيب حَسَبَ الحروف الأبجدية",
|
||||
"status": "الحالة",
|
||||
"subject": "الموضوع",
|
||||
"submit": "إرسال",
|
||||
"success-count": "نجحت: {count}",
|
||||
"sunday": "الأحد",
|
||||
"system": "System",
|
||||
"templates": "القوالب:",
|
||||
"test": "تجربة",
|
||||
"themes": "السمات",
|
||||
@@ -168,6 +174,7 @@
|
||||
"units": "الوحدات",
|
||||
"back": "عودة",
|
||||
"next": "التالي",
|
||||
"start": "Start",
|
||||
"toggle-view": "تبديل طريقة العرض",
|
||||
"date": "التاريخ",
|
||||
"id": "المعرف",
|
||||
@@ -200,7 +207,8 @@
|
||||
"created-on-date": "تم الإنشاء في {0}",
|
||||
"unsaved-changes": "You have unsaved changes. Do you want to save before leaving? Okay to save, Cancel to discard changes.",
|
||||
"clipboard-copy-failure": "Failed to copy to the clipboard.",
|
||||
"confirm-delete-generic-items": "Are you sure you want to delete the following items?"
|
||||
"confirm-delete-generic-items": "Are you sure you want to delete the following items?",
|
||||
"organizers": "Organizers"
|
||||
},
|
||||
"group": {
|
||||
"are-you-sure-you-want-to-delete-the-group": "هل انت متأكد من رغبتك في حذف <b>{groupName}<b/>؟",
|
||||
@@ -236,6 +244,8 @@
|
||||
"group-preferences": "إعدادات المجموعة",
|
||||
"private-group": "مجموعة خاصة",
|
||||
"private-group-description": "Setting your group to private will default all public view options to default. This overrides an individual recipes public view settings.",
|
||||
"enable-public-access": "Enable Public Access",
|
||||
"enable-public-access-description": "Make group recipes public by default, and allow visitors to view recipes without logging-in",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes": "السماح للمستخدمين خارج مجموعتك لمشاهدة وصفاتك",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes-description": "When enabled you can use a public share link to share specific recipes without authorizing the user. When disabled, you can only share recipes with users who are in your group or with a pre-generated private link",
|
||||
"show-nutrition-information": "عرض معلومات التغذية",
|
||||
@@ -349,10 +359,11 @@
|
||||
},
|
||||
"recipe-data-migrations": "Recipe Data Migrations",
|
||||
"recipe-data-migrations-explanation": "Recipes can be migrated from another supported application to Mealie. This is a great way to get started with Mealie.",
|
||||
"coming-from-another-application-or-an-even-older-version-of-mealie": "Coming from another application or an even older version of Mealie? Check out migrations and see if your data can be imported.",
|
||||
"choose-migration-type": "Choose Migration Type",
|
||||
"tag-all-recipes": "Tag all recipes with {tag-name} tag",
|
||||
"nextcloud-text": "Nextcloud recipes can be imported from a zip file that contains the data stored in Nextcloud. See the example folder structure below to ensure your recipes are able to be imported.",
|
||||
"chowdown-text": "Mealie natively supports the chowdown repository format. Download the code repository as a .zip file and upload it below",
|
||||
"chowdown-text": "Mealie natively supports the chowdown repository format. Download the code repository as a .zip file and upload it below.",
|
||||
"recipe-1": "Recipe 1",
|
||||
"recipe-2": "Recipe 2",
|
||||
"paprika-text": "Mealie can import recipes from the Paprika application. Export your recipes from paprika, rename the export extension to .zip and upload it below.",
|
||||
@@ -360,6 +371,10 @@
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie can import recipies from Plan to Eat."
|
||||
},
|
||||
"myrecipebox": {
|
||||
"title": "My Recipe Box",
|
||||
"description-long": "Mealie can import recipes from My Recipe Box. Export your recipes in CSV format, then upload the .csv file below."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
@@ -494,6 +509,8 @@
|
||||
"cook-mode": "Cook Mode",
|
||||
"link-ingredients": "Link Ingredients",
|
||||
"merge-above": "Merge Above",
|
||||
"move-to-bottom": "Move To Bottom",
|
||||
"move-to-top": "Move To Top",
|
||||
"reset-scale": "Reset Scale",
|
||||
"decrease-scale-label": "Decrease Scale by 1",
|
||||
"increase-scale-label": "Increase Scale by 1",
|
||||
@@ -509,6 +526,7 @@
|
||||
"edit-timeline-event": "Edit Timeline Event",
|
||||
"timeline": "Timeline",
|
||||
"timeline-is-empty": "Nothing on the timeline yet. Try making this recipe!",
|
||||
"timeline-no-events-found-try-adjusting-filters": "No events found. Try adjusting your search filters.",
|
||||
"group-global-timeline": "{groupName} Global Timeline",
|
||||
"open-timeline": "Open Timeline",
|
||||
"made-this": "I Made This",
|
||||
@@ -529,6 +547,8 @@
|
||||
"looking-for-migrations": "Looking For Migrations?",
|
||||
"import-with-url": "Import with URL",
|
||||
"create-recipe": "Create Recipe",
|
||||
"create-recipe-description": "Create a new recipe from scratch.",
|
||||
"create-recipes": "Create Recipes",
|
||||
"import-with-zip": "Import with .zip",
|
||||
"create-recipe-from-an-image": "Create recipe from an image",
|
||||
"bulk-url-import": "Bulk URL Import",
|
||||
@@ -599,7 +619,7 @@
|
||||
"import-summary": "Import Summary",
|
||||
"partial-backup": "Partial Backup",
|
||||
"unable-to-delete-backup": "Unable to Delete Backup.",
|
||||
"experimental-description": "Backups a total snapshots of the database and data directory of the site. This includes all data and cannot be set to exclude subsets of data. You can think off this as a snapshot of Mealie at a specific time. Currently, {not-crossed-version} (data migrations are not done automatically). These serve as a database agnostic way to export and import data or backup the site to an external location.",
|
||||
"experimental-description": "Backups are total snapshots of the database and data directory of the site. This includes all data and cannot be set to exclude subsets of data. You can think of this as a snapshot of Mealie at a specific time. These serve as a database agnostic way to export and import data, or back up the site to an external location.",
|
||||
"backup-restore": "Backup Restore",
|
||||
"back-restore-description": "Restoring this backup will overwrite all the current data in your database and in the data directory and replace them with the contents of this backup. {cannot-be-undone} If the restoration is successful, you will be logged out.",
|
||||
"cannot-be-undone": "This action cannot be undone - use with caution.",
|
||||
@@ -724,7 +744,10 @@
|
||||
"ldap-ready-error-text": "Not all LDAP Values are configured. This can be ignored if you are not using LDAP Authentication.",
|
||||
"ldap-ready-success-text": "Required LDAP variables are all set.",
|
||||
"build": "Build",
|
||||
"recipe-scraper-version": "Recipe Scraper Version"
|
||||
"recipe-scraper-version": "Recipe Scraper Version",
|
||||
"oidc-ready": "OIDC Ready",
|
||||
"oidc-ready-error-text": "Not all OIDC Values are configured. This can be ignored if you are not using OIDC Authentication.",
|
||||
"oidc-ready-success-text": "Required OIDC variables are all set."
|
||||
},
|
||||
"shopping-list": {
|
||||
"all-lists": "All Lists",
|
||||
@@ -832,8 +855,11 @@
|
||||
"link-id": "Link ID",
|
||||
"link-name": "Link Name",
|
||||
"login": "Login",
|
||||
"login-oidc": "Login with",
|
||||
"or": "or",
|
||||
"logout": "Logout",
|
||||
"manage-users": "Manage Users",
|
||||
"manage-users-description": "Create and manage users.",
|
||||
"new-password": "New Password",
|
||||
"new-user": "New User",
|
||||
"password-has-been-reset-to-the-default-password": "Password has been reset to the default password",
|
||||
@@ -1129,24 +1155,34 @@
|
||||
"background-tasks": "Background Tasks",
|
||||
"background-tasks-description": "Here you can view all the running background tasks and their status",
|
||||
"no-logs-found": "No Logs Found",
|
||||
"tasks": "Tasks"
|
||||
"tasks": "Tasks",
|
||||
"setup": {
|
||||
"first-time-setup": "First Time Setup",
|
||||
"welcome-to-mealie-get-started": "Welcome to Mealie! Let's get started",
|
||||
"already-set-up-bring-to-homepage": "I'm already set up, just bring me to the homepage",
|
||||
"common-settings-for-new-sites": "Here are some common settings for new sites",
|
||||
"setup-complete": "Setup Complete!",
|
||||
"here-are-a-few-things-to-help-you-get-started": "Here are a few things to help you get started with Mealie",
|
||||
"restore-from-v1-backup": "Have a backup from a previous instance of Mealie v1? You can restore it here.",
|
||||
"manage-profile-or-get-invite-link": "Manage your own profile, or grab an invite link to share with others."
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"welcome-user": "👋 Welcome, {0}",
|
||||
"welcome-user": "👋 Welcome, {0}!",
|
||||
"description": "Manage your profile, recipes, and group settings.",
|
||||
"get-invite-link": "Get Invite Link",
|
||||
"get-public-link": "Get Public Link",
|
||||
"account-summary": "Account Summary",
|
||||
"account-summary-description": "Here's a summary of your group's information",
|
||||
"account-summary-description": "Here's a summary of your group's information.",
|
||||
"group-statistics": "Group Statistics",
|
||||
"group-statistics-description": "Your Group Statistics provide some insight how you're using Mealie.",
|
||||
"storage-capacity": "Storage Capacity",
|
||||
"storage-capacity-description": "Your storage capacity is a calculation of the images and assets you have uploaded.",
|
||||
"personal": "Personal",
|
||||
"personal-description": "These are settings that are personal to you. Changes here won't affect other users",
|
||||
"personal-description": "These are settings that are personal to you. Changes here won't affect other users.",
|
||||
"user-settings": "User Settings",
|
||||
"user-settings-description": "Manage your preferences, change your password, and update your email",
|
||||
"api-tokens-description": "Manage your API Tokens for access from external applications",
|
||||
"user-settings-description": "Manage your preferences, change your password, and update your email.",
|
||||
"api-tokens-description": "Manage your API Tokens for access from external applications.",
|
||||
"group-description": "These items are shared within your group. Editing one of them will change it for the whole group!",
|
||||
"group-settings": "Group Settings",
|
||||
"group-settings-description": "Manage your common group settings like mealplan and privacy settings.",
|
||||
@@ -1157,9 +1193,9 @@
|
||||
"notifiers": "Notifiers",
|
||||
"notifiers-description": "Setup email and push notifications that trigger on specific events.",
|
||||
"manage-data": "Manage Data",
|
||||
"manage-data-description": "Manage your Food and Units (more options coming soon)",
|
||||
"manage-data-description": "Manage your Mealie data; Foods, Units, Categories, Tags and more.",
|
||||
"data-migrations": "Data Migrations",
|
||||
"data-migrations-description": "Migrate your existing data from other applications like Nextcloud Recipes and Chowdown",
|
||||
"data-migrations-description": "Migrate your existing data from other applications like Nextcloud Recipes and Chowdown.",
|
||||
"email-sent": "Email Sent",
|
||||
"error-sending-email": "Error Sending Email",
|
||||
"personal-information": "Personal Information",
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
},
|
||||
"category": {
|
||||
"categories": "Категории",
|
||||
"category-created": "Категория създадена",
|
||||
"category-created": "Категорията бе създадена",
|
||||
"category-creation-failed": "Неуспешно създаване на категория",
|
||||
"category-deleted": "Категория изтрита",
|
||||
"category-deleted": "Категорията бе изтрита",
|
||||
"category-deletion-failed": "Неуспешно изтриване на категория",
|
||||
"category-filter": "Филтър за категории",
|
||||
"category-update-failed": "Неуспешно актуализиране на категория",
|
||||
@@ -73,20 +73,22 @@
|
||||
"mealplan-events": "Известия за хранителен план",
|
||||
"when-a-user-in-your-group-creates-a-new-mealplan": "Когато потребител от твоята потребителска група създаде нов хранителен план",
|
||||
"shopping-list-events": "Събития за списък за пазаруване",
|
||||
"cookbook-events": "Събития за книга с рецепти",
|
||||
"tag-events": "Събития за таг",
|
||||
"cookbook-events": "История на книгата с рецепти",
|
||||
"tag-events": "История на етикетите",
|
||||
"category-events": "Събития за категория",
|
||||
"when-a-new-user-joins-your-group": "Когато потребител се присъедини към твоята потребителска група",
|
||||
"recipe-events": "Събития на рецептата"
|
||||
},
|
||||
"general": {
|
||||
"add": "Добави",
|
||||
"cancel": "Откажи",
|
||||
"clear": "Изчисти",
|
||||
"close": "Затвори",
|
||||
"confirm": "Потвърди",
|
||||
"confirm-how-does-everything-look": "Как изглежда всичко?",
|
||||
"confirm-delete-generic": "Сигурни ли сте, че желаете да изтриете това?",
|
||||
"copied_message": "Копирано!",
|
||||
"create": "Създай",
|
||||
"create": "Добави",
|
||||
"created": "Създадено",
|
||||
"custom": "Персонализиран",
|
||||
"dashboard": "Табло",
|
||||
@@ -123,7 +125,7 @@
|
||||
"monday": "Понеделник",
|
||||
"name": "Име",
|
||||
"new": "Нов",
|
||||
"never": "Никога",
|
||||
"never": "никога",
|
||||
"no": "Не",
|
||||
"no-recipe-found": "Няма намерени рецепти",
|
||||
"ok": "Добре",
|
||||
@@ -142,18 +144,22 @@
|
||||
"save": "Запази",
|
||||
"settings": "Настройки",
|
||||
"share": "Сподели",
|
||||
"show-all": "Покажи всички",
|
||||
"shuffle": "Разбъркано",
|
||||
"sort": "Сортирай",
|
||||
"sort-ascending": "Сортирай възходящо",
|
||||
"sort-descending": "Сортирай низходящо",
|
||||
"sort-alphabetically": "По азбучен ред",
|
||||
"status": "Статус",
|
||||
"status": "състояние",
|
||||
"subject": "Относно",
|
||||
"submit": "Изпрати",
|
||||
"success-count": "Успешни: {count}",
|
||||
"sunday": "Неделя",
|
||||
"system": "Система",
|
||||
"templates": "Шаблони:",
|
||||
"test": "Тест",
|
||||
"themes": "Теми",
|
||||
"thursday": "Четвъртък",
|
||||
"thursday": "четвъртък",
|
||||
"token": "Токън",
|
||||
"tuesday": "Вторник",
|
||||
"type": "Тип",
|
||||
@@ -164,10 +170,11 @@
|
||||
"view": "Преглед",
|
||||
"wednesday": "Сряда",
|
||||
"yes": "Да",
|
||||
"foods": "Храна",
|
||||
"foods": "Продукти",
|
||||
"units": "Мерни единици",
|
||||
"back": "Назад",
|
||||
"next": "Напред",
|
||||
"start": "Начало",
|
||||
"toggle-view": "Превключване на режим",
|
||||
"date": "Дата",
|
||||
"id": "Id",
|
||||
@@ -180,12 +187,12 @@
|
||||
"delete-with-name": "Изтриване {name}",
|
||||
"confirm-delete-generic-with-name": "Сигурни ли сте, че искате да изтриете това {name}?",
|
||||
"confirm-delete-own-admin-account": "Моля имайте предвид, че се опитвате да изтриете собствения си администраторски акаунт! Това действие не може да бъде отменени и ще изтриете окончателно Вашия акаунт?",
|
||||
"organizer": "Организиращ",
|
||||
"organizer": "Органайзер",
|
||||
"transfer": "Преместване",
|
||||
"copy": "Копиране",
|
||||
"color": "Цвят",
|
||||
"timestamp": "Времева отметка",
|
||||
"last-made": "Последно приготвено",
|
||||
"last-made": "Последно приготвена на",
|
||||
"learn-more": "Научи повече",
|
||||
"this-feature-is-currently-inactive": "Тази функционалност в момента е неактивна",
|
||||
"clipboard-not-supported": "Не се поддържа клипборд",
|
||||
@@ -195,12 +202,13 @@
|
||||
"actions": "Действия",
|
||||
"selected-count": "Избрано: {count}",
|
||||
"export-all": "Експортиране на всички",
|
||||
"refresh": "Опресни",
|
||||
"refresh": "Опресняване",
|
||||
"upload-file": "Качване на файл",
|
||||
"created-on-date": "Създадено на {0}",
|
||||
"unsaved-changes": "Имате незапазени промени. Желаете ли да ги запазите преди да излезете? Натиснете Ок за запазване и Отказ за отхвърляне на промените.",
|
||||
"clipboard-copy-failure": "Линкът към рецептата е копиран в клипборда.",
|
||||
"confirm-delete-generic-items": "Сигурни ли сте, че желаете да изтриете следните елементи?"
|
||||
"confirm-delete-generic-items": "Сигурни ли сте, че желаете да изтриете следните елементи?",
|
||||
"organizers": "Organizers"
|
||||
},
|
||||
"group": {
|
||||
"are-you-sure-you-want-to-delete-the-group": "Сигурни ли сте, че искате да изтриете <b>{groupName}<b/>?",
|
||||
@@ -227,7 +235,7 @@
|
||||
"keep-my-recipes-private-description": "Задай групата и всичките рецепти като лични. Винаги може да промените това по-късно."
|
||||
},
|
||||
"manage-members": "Управление на потребителите",
|
||||
"manage-members-description": "Управлявай правата на потребителите в твоите групи. {manage} позволява на потребителя да достъпи страницата за управление на данни {invite} позволява на потребителя да генерира линк за присъединяване за други потребители. Собствениците на група не могат да променят своите права.",
|
||||
"manage-members-description": "Настройки на правата на потребителите в твоите групи. {manage} позволява на потребителя да достъпи страницата за управление на данни {invite} позволява на потребителя да генерира линк за присъединяване за други потребители. Собствениците на група не могат да променят своите права.",
|
||||
"manage": "Управление",
|
||||
"invite": "Покани",
|
||||
"looking-to-update-your-profile": "Търсите да обновите собствения си профил?",
|
||||
@@ -236,9 +244,11 @@
|
||||
"group-preferences": "Настройки на групите",
|
||||
"private-group": "Частна група",
|
||||
"private-group-description": "Задаването на групата като лична ще зададе всички настройки за публично виждане към стандартните. Това е с по-висок приоритет от индивидуалните настройки за публично виждане на всяка една рецепта.",
|
||||
"enable-public-access": "Включи публичния достъп",
|
||||
"enable-public-access-description": "Направи груповите рецепти публични по подразбиране и позволи на посетителите да преглеждат рецептите без да се вписват",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes": "Разрешете на потребители извън вашата група да виждат рецептите Ви",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes-description": "Когато е пуснато ще може да генерирате публичен линк за споделяне на рецепти без да е нужно потребителя да се нуждае от вписване. Когато е изключено, ще можете да споделяте рецепти само с потребители, които са във Вашата група или чрез предварително генериран личен линк за споделяне.",
|
||||
"show-nutrition-information": "Показвай информация за храната",
|
||||
"show-nutrition-information": "Показвай информация за хранителните стойности",
|
||||
"show-nutrition-information-description": "Когато е пуснато, информацията за хранителната стойност на рецептата ще бъде показана, ако е налична. Ако няма информация за хранителната стойност, тогава тя няма да бъде показана.",
|
||||
"show-recipe-assets": "Покажи медия файловете на рецептата",
|
||||
"show-recipe-assets-description": "Когато е пуснато, медия файловете ще бъдат показани към рецептата, ако са налични.",
|
||||
@@ -246,8 +256,8 @@
|
||||
"default-to-landscape-view-description": "Когато е пуснато, раздела за главната информация на рецептата ще бъде показан в пейзажен режим",
|
||||
"disable-users-from-commenting-on-recipes": "Забрани коментирането на рецепти от потребителите",
|
||||
"disable-users-from-commenting-on-recipes-description": "Скрива раздела за коментари към рецептата и забранява коментирането",
|
||||
"disable-organizing-recipe-ingredients-by-units-and-food": "Изключи организирането на съставките на рецепта по мерни единици и храна",
|
||||
"disable-organizing-recipe-ingredients-by-units-and-food-description": "Скрива полетата за храната, мерната единица и количеството за съставките и третира съставките като полета със свободен текст.",
|
||||
"disable-organizing-recipe-ingredients-by-units-and-food": "Изключи организирането на съставките по мерни единици и продукти",
|
||||
"disable-organizing-recipe-ingredients-by-units-and-food-description": "Скрива полетата за продукт, мерна единица и количество и третира съставките като полета със свободен текст.",
|
||||
"general-preferences": "Общи предпочитания",
|
||||
"group-recipe-preferences": "Предпочитания за рецепта по група",
|
||||
"report": "Сигнал",
|
||||
@@ -263,37 +273,37 @@
|
||||
"dinner-this-week": "Вечеря тази седмица",
|
||||
"dinner-today": "Вечеря Днес",
|
||||
"dinner-tonight": "Вечеря ТАЗИ ВЕЧЕР",
|
||||
"edit-meal-plan": "Редактиране на хранителен план",
|
||||
"edit-meal-plan": "Редактиране на планираното меню",
|
||||
"end-date": "Крайна дата",
|
||||
"group": "Група (Бета версия)",
|
||||
"main": "Основен",
|
||||
"meal-planner": "Планиране на хранене",
|
||||
"meal-plans": "Хранителни планове",
|
||||
"mealplan-categories": "Категории на хранителния план",
|
||||
"mealplan-created": "Планът за хранене е създаден",
|
||||
"mealplan-creation-failed": "Неуспешно създаване на план за хранене",
|
||||
"mealplan-deleted": "Планът за хранене е изтрит",
|
||||
"mealplan-deletion-failed": "Неуспешно изтриване на план за хранене",
|
||||
"mealplan-settings": "Настройки на плана за хранене",
|
||||
"mealplan-update-failed": "Неуспешно обновяване на план за хранене",
|
||||
"mealplan-updated": "Планът за хранене е обновен",
|
||||
"no-meal-plan-defined-yet": "Все още няма дефинирани планове за хранене",
|
||||
"no-meal-planned-for-today": "Няма хранителен план за днес",
|
||||
"meal-planner": "Планиране на менюта",
|
||||
"meal-plans": "Планирани менюта",
|
||||
"mealplan-categories": "Категории на менюто",
|
||||
"mealplan-created": "Менюто бе създадено",
|
||||
"mealplan-creation-failed": "Неуспешно създаване на меню",
|
||||
"mealplan-deleted": "Менюто бе изтрито",
|
||||
"mealplan-deletion-failed": "Неуспешно изтриване на меню",
|
||||
"mealplan-settings": "Настройки на менюто",
|
||||
"mealplan-update-failed": "Неуспешно обновяване на седмичното меню",
|
||||
"mealplan-updated": "Седмичното меню бе обновено",
|
||||
"no-meal-plan-defined-yet": "Все още няма създадено седмично меню",
|
||||
"no-meal-planned-for-today": "За днес няма планирано меню",
|
||||
"only-recipes-with-these-categories-will-be-used-in-meal-plans": "Само рецептите от тези категории ще бъдат използвани в хранителните планове",
|
||||
"planner": "Планьор",
|
||||
"quick-week": "Бърза седмица",
|
||||
"side": "Страна",
|
||||
"side": "Предястие",
|
||||
"sides": "Страни",
|
||||
"start-date": "Начална дата",
|
||||
"rule-day": "Правило за деня",
|
||||
"meal-type": "Тип на ястието",
|
||||
"rule-day": "Ден от седмицата",
|
||||
"meal-type": "Вид ястие",
|
||||
"breakfast": "Закуска",
|
||||
"lunch": "Обяд",
|
||||
"lunch": "обяд",
|
||||
"dinner": "Вечеря",
|
||||
"type-any": "Който и да е",
|
||||
"day-any": "Който и да е",
|
||||
"type-any": "Всички",
|
||||
"day-any": "Всички",
|
||||
"editor": "Редактор",
|
||||
"meal-recipe": "Рецепта за хранене",
|
||||
"meal-recipe": "Рецепта за ястие",
|
||||
"meal-title": "Заглавие на рецептата",
|
||||
"meal-note": "Бележка към рецептата",
|
||||
"note-only": "Само бележка",
|
||||
@@ -303,15 +313,15 @@
|
||||
"this-rule-will-apply": "Това правило ще се приложи на {dayCriteria} {mealTypeCriteria}.",
|
||||
"to-all-days": "за всички дни",
|
||||
"on-days": "на {0}",
|
||||
"for-all-meal-types": "за всички типове ястия",
|
||||
"for-type-meal-types": "за {0} типове ястия",
|
||||
"meal-plan-rules": "Правила на плана за хранене",
|
||||
"for-all-meal-types": "за всички видове ястия",
|
||||
"for-type-meal-types": "за {0}",
|
||||
"meal-plan-rules": "Правила за съставяне на седмично меню",
|
||||
"new-rule": "Ново правило",
|
||||
"meal-plan-rules-description": "Може да създадете правила за автоматично избиране на рецепти от хранителните планове. Тези правила ще бъдат използвани за попълване на списъка от произволното избрани рецепти, от които да избирате, когато създавате нов хранителен план. Бележка: ако тези правила имат еднакви ограничения по ден/тип, тогава техните категории ще бъдат обединени. На практика, е ненужно да създавате дублирани правила, но все пак това е възможно.",
|
||||
"new-rule-description": "Когато създавате ново правило за хранителен план, Вие ще може да зададете ограничение за правилото да бъде приложено за определен ден от седмицата и/или специфичен тип ястие. За да добавите правило за всички дни или всички типове ястия, Вие може да зададете правилото като \"Всички\", което ще го приложи за всички дни и/или типове ястия.",
|
||||
"meal-plan-rules-description": "Може да създадете правила за автоматично избиране на рецепти в седмичното меню. Тези правила ще бъдат използвани за създаване на седмично маню от произволното избрани рецепти. Бележка: ако тези правила имат еднакви ограничения по ден/тип, тогава техните категории ще бъдат обединени. На практика, не е нужно да създавате дублиращи се правила, но все пак това е възможно.",
|
||||
"new-rule-description": "Когато създавате ново правило за създаване на седмично меню, може да зададете ограничение правилото да бъде приложено за определен ден от седмицата и/или специфичен вид ястие. За да добавите правило за всички дни или всички типове ястия, Вие може да изберете \"Всички\", което ще го приложи за всички дни и/или видове ястия.",
|
||||
"recipe-rules": "Правила на рецептата",
|
||||
"applies-to-all-days": "Прилага се за всички дни",
|
||||
"applies-on-days": "Прилага се на {0}",
|
||||
"applies-on-days": "Всеки/всяка {0}",
|
||||
"meal-plan-settings": "Настройки на плана за хранене"
|
||||
},
|
||||
"migration": {
|
||||
@@ -349,17 +359,22 @@
|
||||
},
|
||||
"recipe-data-migrations": "Миграция на данни на рецепти",
|
||||
"recipe-data-migrations-explanation": "Рецептите могат да бъдат мигрирани от други приложения поддържани от Mealie. Това е добър начин да започнете използването си на Mealie.",
|
||||
"coming-from-another-application-or-an-even-older-version-of-mealie": "Идваш от друго приложение или дори по-стара версия на Mealie? Провери миграциите и виж дали данните ти могат да бъдат импорторани.",
|
||||
"choose-migration-type": "Избери тип на миграцията",
|
||||
"tag-all-recipes": "Отбележи всички рецепти с {tag-name} таг",
|
||||
"tag-all-recipes": "Добави {tag-name} като етикет във всички рецепти",
|
||||
"nextcloud-text": "Nextcloud рецептите могат да бъдат импортирани от .zip файл, който съдържа данни съхранени в Nextcloud. Вижте примерната структура на папките по-долу за да се подсигурите, че рецептите Ви могат да бъдат импортирани.",
|
||||
"chowdown-text": "Mealie поддържа формата на хранилището на Chowdown. Свалете кода на хранилището като .zip файл и го качете по-долу",
|
||||
"chowdown-text": "Mealie поддържа формата на хранилището на Chowdown. Свалете кода на хранилището като .zip файл и го качете по-долу.",
|
||||
"recipe-1": "Рецепта 1",
|
||||
"recipe-2": "Рецепта 2",
|
||||
"paprika-text": "Mealie може да импортирай рецепти от приложението Paprika. Експортирайте рецептите си от Paprika, преименувате файловото разширение на .zip и го качете по-долу.",
|
||||
"mealie-text": "Mealie може да импортира рецепти от Mealie преди версия 1.0. Експортирайте рецептите от старата си инстанция и ги качете като .zip файл по-долу. Бележка: могат да бъдат импортирани само рецептите.",
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"title": "Планиране на меню",
|
||||
"description-long": "Mealie може да импортира рецепти от Plan to Eat."
|
||||
},
|
||||
"myrecipebox": {
|
||||
"title": "Моята кутия с рецепти",
|
||||
"description-long": "Mealie може да импортира рецепти от Моята кутия за рецепти. Експортирайте рецептите си в CSV формат, после качете .csv файлът по-долу."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
@@ -453,7 +468,7 @@
|
||||
"remove-section": "Премахни раздел",
|
||||
"save-recipe-before-use": "Запази рецептата преди да я използваш",
|
||||
"section-title": "Заглавие на раздела",
|
||||
"servings": "Порции",
|
||||
"servings": "Порция|порции",
|
||||
"share-recipe-message": "Искам да споделя моята рецепта {0} с теб.",
|
||||
"show-nutrition-values": "Покажи хранителните стойности",
|
||||
"sodium-content": "Натрий",
|
||||
@@ -471,7 +486,7 @@
|
||||
"date-format-hint-yyyy-mm-dd": "YYYY-MM-DD формат",
|
||||
"add-to-list": "Добави към списък",
|
||||
"add-to-plan": "Добави към план",
|
||||
"add-to-timeline": "Добави към времевата линия",
|
||||
"add-to-timeline": "Добави към историята на събитията",
|
||||
"recipe-added-to-list": "Рецептата е добавена към списъка",
|
||||
"recipes-added-to-list": "Рецептите са добавени към списъка",
|
||||
"successfully-added-to-list": "Успешно добавено в списъка",
|
||||
@@ -483,7 +498,7 @@
|
||||
"quantity": "Количество",
|
||||
"choose-unit": "Избери единица",
|
||||
"press-enter-to-create": "Натисните Enter за да създадете",
|
||||
"choose-food": "Избери храна",
|
||||
"choose-food": "Избери продукт",
|
||||
"notes": "Бележки",
|
||||
"toggle-section": "Превключване на раздела",
|
||||
"see-original-text": "Виж оригиналния текст",
|
||||
@@ -494,6 +509,8 @@
|
||||
"cook-mode": "Режим на готвене",
|
||||
"link-ingredients": "Свържи съставките",
|
||||
"merge-above": "Обедини с по-горната",
|
||||
"move-to-bottom": "Премести най-долу",
|
||||
"move-to-top": "Премести най-горе",
|
||||
"reset-scale": "Оригинален мащаб",
|
||||
"decrease-scale-label": "Намали мащаба с 1",
|
||||
"increase-scale-label": "Увеличи мащаба с 1",
|
||||
@@ -506,12 +523,13 @@
|
||||
"resume-timer": "Възобновяване на таймера",
|
||||
"stop-timer": "Спри таймера"
|
||||
},
|
||||
"edit-timeline-event": "Редактирай събитие от времевата линия",
|
||||
"timeline": "Времева линия",
|
||||
"timeline-is-empty": "Няма нищо във времевата линия. Опитайте да приготвите рецептата!",
|
||||
"group-global-timeline": "{groupName} глобална времева линия",
|
||||
"open-timeline": "Отвори времевата линия",
|
||||
"made-this": "Аз направих това",
|
||||
"edit-timeline-event": "Редактирай събитие",
|
||||
"timeline": "Хронология на събитията",
|
||||
"timeline-is-empty": "Няма история на събитията. Опитайте да приготвите рецептата!",
|
||||
"timeline-no-events-found-try-adjusting-filters": "Няма намерени събития. Опитайте да промените филтрите си за търсене.",
|
||||
"group-global-timeline": "{groupName} История на събитията",
|
||||
"open-timeline": "Отвори историята на събитията",
|
||||
"made-this": "Сготвих рецептата",
|
||||
"how-did-it-turn-out": "Как се получи?",
|
||||
"user-made-this": "{user} направи това",
|
||||
"last-made-date": "Последно приготвена на {date}",
|
||||
@@ -526,29 +544,31 @@
|
||||
"edit-markdown": "Редактирай с markdown",
|
||||
"recipe-creation": "Създаване на рецепта",
|
||||
"select-one-of-the-various-ways-to-create-a-recipe": "Изберете един от разнообразните начини за създаване на рецепта",
|
||||
"looking-for-migrations": "Търсите миграциите?",
|
||||
"looking-for-migrations": "Миграция на данни",
|
||||
"import-with-url": "Импортирай от линк",
|
||||
"create-recipe": "Създай рецепта",
|
||||
"create-recipe": "Добави рецепта",
|
||||
"create-recipe-description": "Създайте нова рецепта от чернова.",
|
||||
"create-recipes": "Създайте рецепти",
|
||||
"import-with-zip": "Импортирай от .zip",
|
||||
"create-recipe-from-an-image": "Създай рецепта от снимка",
|
||||
"create-recipe-from-an-image": "Добави рецепта от снимка",
|
||||
"bulk-url-import": "Импортиране на рецепти от линк",
|
||||
"debug-scraper": "Отстраняване на грешки на скрейпъра",
|
||||
"create-a-recipe-by-providing-the-name-all-recipes-must-have-unique-names": "Създай рецепта като предоставиш име. Всички рецепти трябва да имат уникални имена.",
|
||||
"create-a-recipe-by-providing-the-name-all-recipes-must-have-unique-names": "Добави рецепта като предоставиш име. Всички рецепти трябва да имат уникални имена.",
|
||||
"new-recipe-names-must-be-unique": "Името на рецептата трябва да бъде уникално",
|
||||
"scrape-recipe": "Обхождане на рецепта",
|
||||
"scrape-recipe-description": "Обходи рецепта по линк. Предоставете линк за сайт, който искате да бъде обходен. Mealie ще опита да обходи рецептата от този сайт и да я добави във Вашата колекция.",
|
||||
"scrape-recipe-have-a-lot-of-recipes": "Имате много рецепти, които искате да обходите наведнъж?",
|
||||
"scrape-recipe-suggest-bulk-importer": "Пробвайте масовото импорторане",
|
||||
"import-original-keywords-as-tags": "Импортирай оригиналните ключови думи като тагове",
|
||||
"import-original-keywords-as-tags": "Добави оригиналните ключови думи като етикети",
|
||||
"stay-in-edit-mode": "Остани в режим на редакция",
|
||||
"import-from-zip": "Импортирай от Zip",
|
||||
"import-from-zip-description": "Импортирай рецепта, която е била експортирана от друга инстанция на Mealie.",
|
||||
"zip-files-must-have-been-exported-from-mealie": ".zip файловете трябва да бъдат експортирани от Mealie",
|
||||
"create-a-recipe-by-uploading-a-scan": "Създай рецепта като качиш сканирано копие.",
|
||||
"create-a-recipe-by-uploading-a-scan": "Добави рецепта като качиш сканирано копие.",
|
||||
"upload-a-png-image-from-a-recipe-book": "Качи png изображение от книга с рецепти",
|
||||
"recipe-bulk-importer": "Масово импортиране на рецепти",
|
||||
"recipe-bulk-importer-description": "Масовото импортиране Ви позволява да импортиране множество рецепти наведнъж като постави сайтовете на опашка в бекенда и изпълненява задачата във фонов режим. Това може да бъде полезно когато първоначално мигрирате Mealie, или когато искате да импортиране голям брой рецепти наведнъж.",
|
||||
"set-categories-and-tags": "Задай Категории и Тагове",
|
||||
"set-categories-and-tags": "Задай категории и етикети",
|
||||
"bulk-imports": "Масови импортирания",
|
||||
"bulk-import-process-has-started": "Процеса на масово импортиране започна",
|
||||
"bulk-import-process-has-failed": "Процеса на масово импортиране се прекрати с грешка",
|
||||
@@ -577,7 +597,7 @@
|
||||
"search": "Търсене",
|
||||
"search-mealie": "Търсене в Mealie (Натисни /)",
|
||||
"search-placeholder": "Търсене...",
|
||||
"tag-filter": "Филтриране на тагове",
|
||||
"tag-filter": "Филтриране по етикет",
|
||||
"search-hint": "Натисни '/'",
|
||||
"advanced": "Разширени",
|
||||
"auto-search": "Автоматично търсене",
|
||||
@@ -591,7 +611,7 @@
|
||||
"backup-created-at-response-export_path": "Резервно копие е създадено на {path}",
|
||||
"backup-deleted": "Резервното копие е изтрито",
|
||||
"restore-success": "Успешно възстановяване",
|
||||
"backup-tag": "Таг на резервното копие",
|
||||
"backup-tag": "Етикет на резервното копие",
|
||||
"create-heading": "Създай резервно копие",
|
||||
"delete-backup": "Изтрий резервно копие",
|
||||
"error-creating-backup-see-log-file": "Грешка при създаването на резервно копие. Виж лог файла",
|
||||
@@ -719,12 +739,15 @@
|
||||
"secure-site-success-text": "Сайтът е достъпен чрез localhost или https",
|
||||
"server-side-base-url": "Сървърен базов URL",
|
||||
"server-side-base-url-error-text": "„BASE_URL“ все още е стойността по подразбиране на API сървъра. Това ще причини проблеми с връзките за известия, генерирани на сървъра за имейли и др.",
|
||||
"server-side-base-url-success-text": "URL адресът от страна на сървъра не съответства на стандартния",
|
||||
"server-side-base-url-success-text": "URL адресът от страна на сървъра не съответства на зададения",
|
||||
"ldap-ready": "Използва LDAP",
|
||||
"ldap-ready-error-text": "Не всички LDAP стойности са конфигурирани. Това може да бъде игнорирано, ако не използвате LDAP удостоверяване.",
|
||||
"ldap-ready-success-text": "Задължителните LDAP променливи са зададени.",
|
||||
"build": "Компилинирана версия",
|
||||
"recipe-scraper-version": "Версия на скрепер на рецепти"
|
||||
"recipe-scraper-version": "Версия на скрепер на рецепти",
|
||||
"oidc-ready": "Готов за OIDC",
|
||||
"oidc-ready-error-text": "Не всички OIDC стойности са конфигурирани. Това може да бъде игнорирано, ако не използвате OIDC удостоверяване.",
|
||||
"oidc-ready-success-text": "Задължителните OIDC променливи са зададени."
|
||||
},
|
||||
"shopping-list": {
|
||||
"all-lists": "Всички списъци",
|
||||
@@ -735,7 +758,7 @@
|
||||
"quantity": "Количество: {0}",
|
||||
"shopping-list": "Списък за пазаруване",
|
||||
"shopping-lists": "Списъци за пазаруване",
|
||||
"food": "Храна",
|
||||
"food": "Продукт",
|
||||
"note": "Бележка",
|
||||
"label": "Етикет",
|
||||
"linked-item-warning": "Елементът е добавен към една или повече рецепти. Редактиране на единиците или храните ще се отрази с непредвидими резултати когато добавяте или премахвате рецепта от списъка.",
|
||||
@@ -766,7 +789,7 @@
|
||||
"profile": "Профил",
|
||||
"search": "Търсене",
|
||||
"site-settings": "Настройки на сайта",
|
||||
"tags": "Тагове",
|
||||
"tags": "Етикети",
|
||||
"toolbox": "Инструменти",
|
||||
"language": "Език",
|
||||
"maintenance": "Профилактика",
|
||||
@@ -787,17 +810,17 @@
|
||||
"welcome-to-mealie": "Добре дошли в Mealie! За да станете потребител на тази инстанция сте длъжни да имате валиден линк за покана. Ако не сте получили покана, тогава е невъзможно да се регистрирате. За да получите линк, свържете се с администратора на сайта."
|
||||
},
|
||||
"tag": {
|
||||
"tag-created": "Тагът е създаден",
|
||||
"tag-creation-failed": "Неуспешно създаване на таг",
|
||||
"tag-deleted": "Тагът е изтрит",
|
||||
"tag-deletion-failed": "Неуспешно изтриване на таг",
|
||||
"tag-update-failed": "Неуспешно обновяване на таг",
|
||||
"tag-updated": "Тагът е обновен",
|
||||
"tags": "Тагове",
|
||||
"untagged-count": "Без таг {count}",
|
||||
"create-a-tag": "Създаване на таг",
|
||||
"tag-name": "Име на тага",
|
||||
"tag": "Тагове"
|
||||
"tag-created": "Етикетът беше добавен",
|
||||
"tag-creation-failed": "Неуспешно създаване на етикет",
|
||||
"tag-deleted": "Етикетът беше изтрит",
|
||||
"tag-deletion-failed": "Неуспешно изтриване на етикет",
|
||||
"tag-update-failed": "Неуспешно обновяване на етикет",
|
||||
"tag-updated": "Етикетът беше обновен",
|
||||
"tags": "Етикети",
|
||||
"untagged-count": "Без етикет {count}",
|
||||
"create-a-tag": "Създаване на етикет",
|
||||
"tag-name": "Име на етикета",
|
||||
"tag": "Етикет"
|
||||
},
|
||||
"tool": {
|
||||
"tools": "Инструменти",
|
||||
@@ -832,8 +855,11 @@
|
||||
"link-id": "ID на линка",
|
||||
"link-name": "Има на линка",
|
||||
"login": "Вход",
|
||||
"login-oidc": "Впиши се с",
|
||||
"or": "или",
|
||||
"logout": "Изход",
|
||||
"manage-users": "Управление на потребителите",
|
||||
"manage-users-description": "Създавайте и управлявайте потребители.",
|
||||
"new-password": "Нова парола",
|
||||
"new-user": "Нов потребител",
|
||||
"password-has-been-reset-to-the-default-password": "Паролата беше възстановена до паролата по подразбиране",
|
||||
@@ -906,7 +932,7 @@
|
||||
"language-dialog": {
|
||||
"translated": "преведено",
|
||||
"choose-language": "Избери Език",
|
||||
"select-description": "Изберете език за Mealie. Тази настройка се прилага само за Вас, не и за други потребители.",
|
||||
"select-description": "Изберете език за Mealie. Тази настройка засяга само текущия профил.",
|
||||
"how-to-contribute-description": "Има ли нещо все още непреведено, с грешка в превода, или езикът Ви липсва в списъка? {read-the-docs-link} за да видите как да допринесете!",
|
||||
"read-the-docs": "Прочетете документацията"
|
||||
},
|
||||
@@ -914,12 +940,12 @@
|
||||
"foods": {
|
||||
"merge-dialog-text": "Комбинирането на избраните храни ще обедини изходната храна и целевата храна в една единствена храна. Изходната храна ще бъде изтрита и всички препратки към изходната храна ще бъдат актуализирани, за да сочат към целевата храна.",
|
||||
"merge-food-example": "Обединяване на {food1} с {food2}",
|
||||
"seed-dialog-text": "Заредете базата данни с храни на базата на вашия местен език. Това ще създаде 200+ общи храни, които могат да се използват за организиране на вашата база данни. Храните се превеждат чрез усилия на общността.",
|
||||
"seed-dialog-text": "Изтеглете базата данни с продукти на вашия местен език. Ще бъдат заредени 200+ продукта, които да използвате за организиране на вашата база данни. Имената на продуктите се превеждат от общността.",
|
||||
"seed-dialog-warning": "Вече имате някои елементи във Вашата база данни. Това действие няма да съгласува дубликати, ще трябва да ги управлявате ръчно.",
|
||||
"combine-food": "Комбинирай Храни",
|
||||
"source-food": "Изходна храна",
|
||||
"target-food": "Целева храна",
|
||||
"create-food": "Създай храна",
|
||||
"create-food": "Създай продукт",
|
||||
"food-label": "Заглавие на храната",
|
||||
"edit-food": "Редактирай храна",
|
||||
"food-data": "Данни за храните",
|
||||
@@ -927,7 +953,7 @@
|
||||
"example-food-plural": "пример: Домати"
|
||||
},
|
||||
"units": {
|
||||
"seed-dialog-text": "Заредете базата данни с общи единици въз основа на Вашия местен език.",
|
||||
"seed-dialog-text": "Заредете базата данни с мерни единици на Вашия местен език.",
|
||||
"combine-unit-description": "Комбинирането на избраните единици ще обедини единицата източник и целевата единица в една единица. {source-unit-will-be-deleted} и всички препратки към изходната единица ще бъдат актуализирани, за да сочат към целевата единица.",
|
||||
"combine-unit": "Комбинирай мерни единици",
|
||||
"source-unit": "Изходна мярна единица",
|
||||
@@ -949,7 +975,7 @@
|
||||
"example-unit-abbreviation-plural": "пример: ч.л.-ки"
|
||||
},
|
||||
"labels": {
|
||||
"seed-dialog-text": "Заредете базата данни с общи етикети въз основа на Вашия местен език.",
|
||||
"seed-dialog-text": "Заредете базата данни с етикети на Вашия местен език.",
|
||||
"edit-label": "Редактиране на етикет",
|
||||
"new-label": "Нов етикет",
|
||||
"labels": "Етикети"
|
||||
@@ -966,10 +992,10 @@
|
||||
"recipe-columns": "Колони на рецептата",
|
||||
"data-exports-description": "Този раздел предоставя връзки към налични експортирания, които са готови за изтегляне. Тези експорти изтичат, така че не забравяйте да ги изтеглите, докато все още са налични.",
|
||||
"data-exports": "Експорти на данни",
|
||||
"tag": "Таг",
|
||||
"tag": "Етикет",
|
||||
"categorize": "Категоризиране",
|
||||
"update-settings": "Обнови настройките",
|
||||
"tag-recipes": "Тагове на рецепти",
|
||||
"tag-recipes": "Етикети на рецепти",
|
||||
"categorize-recipes": "Категоризирай рецепти",
|
||||
"export-recipes": "Експортирай рецепти",
|
||||
"delete-recipes": "Изтрий рецепти",
|
||||
@@ -977,8 +1003,8 @@
|
||||
},
|
||||
"create-alias": "Създаване на псевдоним",
|
||||
"manage-aliases": "Управление на псевдоними",
|
||||
"seed-data": "Сийд на данни",
|
||||
"seed": "Сийд",
|
||||
"seed-data": "Зареждане на данни",
|
||||
"seed": "Зареждане",
|
||||
"data-management": "Управление на данни",
|
||||
"data-management-description": "Изберете кой набор от данни искате да промените.",
|
||||
"select-data": "Изберете данни",
|
||||
@@ -991,9 +1017,9 @@
|
||||
"category-data": "Категория за данните"
|
||||
},
|
||||
"tags": {
|
||||
"new-tag": "Нов таг",
|
||||
"edit-tag": "Редакция на таг",
|
||||
"tag-data": "Данни на тага"
|
||||
"new-tag": "Нов етикет",
|
||||
"edit-tag": "Редакция на етикет",
|
||||
"tag-data": "Данни на етикета"
|
||||
},
|
||||
"tools": {
|
||||
"new-tool": "Нов инструмент",
|
||||
@@ -1010,7 +1036,7 @@
|
||||
"group-details": "Подробности за групата",
|
||||
"group-details-description": "Преди да създадете акаунт, ще трябва да създадете група. Вашата група ще съдържа само Вас, но ще можете да поканите други по-късно. Членовете във вашата група могат да споделят планове за хранене, списъци за пазаруване, рецепти и други!",
|
||||
"use-seed-data": "Използвай предварителни данни",
|
||||
"use-seed-data-description": "Mealie се доставя с колекция от храни, мерни единици и етикети, които могат да се използват за попълване на Вашата група с полезни данни за организиране на вашите рецепти.",
|
||||
"use-seed-data-description": "Mealie се доставя с колекция от продукти, мерни единици и етикети за попълване на Вашата група с полезни данни за организиране на рецептите.",
|
||||
"account-details": "Подробни данни за акаунта"
|
||||
},
|
||||
"validation": {
|
||||
@@ -1129,37 +1155,47 @@
|
||||
"background-tasks": "Задачи на заден фон",
|
||||
"background-tasks-description": "Тук можете да видите всички изпълнявани задачи на заден фон и техния статус",
|
||||
"no-logs-found": "Няма намерени логове",
|
||||
"tasks": "Задачи"
|
||||
"tasks": "Задачи",
|
||||
"setup": {
|
||||
"first-time-setup": "Настройка за първи път",
|
||||
"welcome-to-mealie-get-started": "Добре дошли в Mealie! Да започваме",
|
||||
"already-set-up-bring-to-homepage": "Вече съм настроен, просто ме отведете до началната страница",
|
||||
"common-settings-for-new-sites": "Ето някои общи настройки за нови сайтове",
|
||||
"setup-complete": "Настройката е завършена!",
|
||||
"here-are-a-few-things-to-help-you-get-started": "Ето няколко неща, които ще Ви помогнат да започнете с Mealie",
|
||||
"restore-from-v1-backup": "Имате резервно копие от предишна инстанция на Mealie v1? Можете да го възстановите тук.",
|
||||
"manage-profile-or-get-invite-link": "Управлявайте собствения си профил или вземете връзка за покана, която да споделите с други."
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"welcome-user": "👋 Добре дошъл(а), {0}",
|
||||
"description": "Управлявай твоят профил, рецепти и настройки на групата.",
|
||||
"welcome-user": "👋 Welcome, {0}!",
|
||||
"description": "Настройки на профил, рецепти и настройки на групата.",
|
||||
"get-invite-link": "Вземи линк за покана",
|
||||
"get-public-link": "Вземи публичен линк",
|
||||
"account-summary": "Обобщение на акаунта",
|
||||
"account-summary-description": "Обобщение на информацията за Вашата група",
|
||||
"account-summary-description": "Here's a summary of your group's information.",
|
||||
"group-statistics": "Статистики на групата",
|
||||
"group-statistics-description": "Вашата статистика на групата дава известна представа как използвате Mealie.",
|
||||
"storage-capacity": "Капацитет за съхранение",
|
||||
"storage-capacity-description": "Вашият капацитет за съхранение е изчисление на изображенията и активите, които сте качили.",
|
||||
"personal": "Лични",
|
||||
"personal-description": "Това са настройки, които са лични за Вас. Промените тук няма да засегнат други потребители",
|
||||
"personal-description": "These are settings that are personal to you. Changes here won't affect other users.",
|
||||
"user-settings": "Потребителски настройки",
|
||||
"user-settings-description": "Управлявайте предпочитанията си, променяйте паролата си и актуализирайте имейла си",
|
||||
"api-tokens-description": "Управлявайте вашите API токени за достъп от външни приложения",
|
||||
"user-settings-description": "Manage your preferences, change your password, and update your email.",
|
||||
"api-tokens-description": "Manage your API Tokens for access from external applications.",
|
||||
"group-description": "Тези елементи се споделят във вашата група. Редактирането на един от тях ще го промени за цялата група!",
|
||||
"group-settings": "Настройки на групата",
|
||||
"group-settings-description": "Управлявайте общите си групови настройки като план за хранене и настройки за поверителност.",
|
||||
"cookbooks-description": "Управлявайте колекция от категории на рецепти и генерирайте страници за тях.",
|
||||
"group-settings-description": "Общи групови настройки като седмично меню и настройки за поверителност.",
|
||||
"cookbooks-description": "Управление на категории на рецепти и генериране на съответните страници.",
|
||||
"members": "Участници",
|
||||
"members-description": "Вижте кой е във Вашата група и управлявайте техните права.",
|
||||
"members-description": "Списък на потребителите в групата и управление на техните права.",
|
||||
"webhooks-description": "Настройте webhooks, които се задействат в дните, в които имате планиран план за хранене.",
|
||||
"notifiers": "Уведомители",
|
||||
"notifiers-description": "Настройте имейл и push известия, които се задействат при конкретни събития.",
|
||||
"manage-data": "Управление на данни",
|
||||
"manage-data-description": "Управлявайте вашата храна и единици (очаквайте още опции скоро)",
|
||||
"manage-data-description": "Manage your Mealie data; Foods, Units, Categories, Tags and more.",
|
||||
"data-migrations": "Миграция на данни",
|
||||
"data-migrations-description": "Мигрирайте вашите съществуващи данни от други приложения като Nextcloud Recipes и Chowdown",
|
||||
"data-migrations-description": "Migrate your existing data from other applications like Nextcloud Recipes and Chowdown.",
|
||||
"email-sent": "Имейлът е изпратен",
|
||||
"error-sending-email": "Грешка при изпращане на имейл",
|
||||
"personal-information": "Лична информация",
|
||||
@@ -1177,13 +1213,13 @@
|
||||
},
|
||||
"cookbook": {
|
||||
"cookbooks": "Готварски книги",
|
||||
"description": "Готварските книги са друг начин за организиране на рецепти чрез създаване на напречни сечения на рецепти и тагове. Създаването на готварска книга ще добави запис към страничната лента и всички рецепти с избраните тагове и категории ще бъдат показани в готварската книга.",
|
||||
"description": "Готварските книги са друг начин за организиране на рецепти чрез създаване на напречни сечения на рецепти и етикети. Създаването на готварска книга ще добави запис към страничната лента и всички рецепти с избраните категории и етикети ще бъдат показани в готварската книга.",
|
||||
"public-cookbook": "Публична книга с рецепти",
|
||||
"public-cookbook-description": "Публичните готварски книги могат да се споделят с потребители, които не са в Mealie, и ще се показват на страницата на вашите групи.",
|
||||
"filter-options": "Опции на филтъра",
|
||||
"filter-options-description": "Когато е избрано изискване на всички, готварската книга ще включва само рецепти, които имат всички избрани елементи. Това се отнася за всяко подмножество от селектори, а не за напречно сечение на избраните елементи.",
|
||||
"require-all-categories": "Изискване на всички категории",
|
||||
"require-all-tags": "Изискване на всички тагове",
|
||||
"require-all-tags": "Включване на всички етикети",
|
||||
"require-all-tools": "Изискване на всички инструменти",
|
||||
"cookbook-name": "Име на книгата с рецепти",
|
||||
"cookbook-with-name": "Книга с рецепти {0}",
|
||||
|
||||
@@ -80,10 +80,12 @@
|
||||
"recipe-events": "Esdeveniments de receptes"
|
||||
},
|
||||
"general": {
|
||||
"add": "Add",
|
||||
"cancel": "Anuŀla",
|
||||
"clear": "Neteja",
|
||||
"close": "Tanca",
|
||||
"confirm": "Confirma",
|
||||
"confirm-how-does-everything-look": "How does everything look?",
|
||||
"confirm-delete-generic": "Esteu segur de voler suprimir-lo?",
|
||||
"copied_message": "S'ha copiat!",
|
||||
"create": "Crea",
|
||||
@@ -142,14 +144,18 @@
|
||||
"save": "Desa",
|
||||
"settings": "Configuració",
|
||||
"share": "Compartiu",
|
||||
"show-all": "Show All",
|
||||
"shuffle": "Barreja",
|
||||
"sort": "Ordena",
|
||||
"sort-ascending": "Sort Ascending",
|
||||
"sort-descending": "Sort Descending",
|
||||
"sort-alphabetically": "Alfabèticament",
|
||||
"status": "Estat",
|
||||
"subject": "Assumpte",
|
||||
"submit": "Envia",
|
||||
"success-count": "Amb èxit: {count}",
|
||||
"sunday": "Diumenge",
|
||||
"system": "System",
|
||||
"templates": "Plantilles:",
|
||||
"test": "Prova",
|
||||
"themes": "Temes",
|
||||
@@ -168,6 +174,7 @@
|
||||
"units": "Unitats",
|
||||
"back": "Torna",
|
||||
"next": "Següent",
|
||||
"start": "Start",
|
||||
"toggle-view": "Commuta la visualització",
|
||||
"date": "Data",
|
||||
"id": "Id",
|
||||
@@ -200,7 +207,8 @@
|
||||
"created-on-date": "Creat el: {0}",
|
||||
"unsaved-changes": "Tens canvis que no estan guardats. Vols guardar-los abans de sortir? Clica d'acord per guardar-los o cancel·lar per descartar els canvis.",
|
||||
"clipboard-copy-failure": "No s'ha pogut copiar al porta-retalls.",
|
||||
"confirm-delete-generic-items": "Are you sure you want to delete the following items?"
|
||||
"confirm-delete-generic-items": "Are you sure you want to delete the following items?",
|
||||
"organizers": "Organizers"
|
||||
},
|
||||
"group": {
|
||||
"are-you-sure-you-want-to-delete-the-group": "Esteu segur de voler suprimir el grup <b>{groupName}<b/>?",
|
||||
@@ -236,6 +244,8 @@
|
||||
"group-preferences": "Preferències per grup",
|
||||
"private-group": "Grup privat",
|
||||
"private-group-description": "Marcar el grup com a privat afectarà a totes les opcions de visualització pública per defecte. Podeu canviar-les individualment en les opcions de visualització de cada recepta.",
|
||||
"enable-public-access": "Enable Public Access",
|
||||
"enable-public-access-description": "Make group recipes public by default, and allow visitors to view recipes without logging-in",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes": "Permeteu als usuaris d'altres grups, visualitzar les vostres receptes",
|
||||
"allow-users-outside-of-your-group-to-see-your-recipes-description": "Si ho habiliteu, podreu compartir enllaços públics de receptes específiques sense autoritzar l'usuari. Si està deshabilitat, només podreu compartir amb usuaris del vostre grup o generant enllaços privats",
|
||||
"show-nutrition-information": "Mostra la informació nutricional",
|
||||
@@ -259,7 +269,7 @@
|
||||
},
|
||||
"meal-plan": {
|
||||
"create-a-new-meal-plan": "Crea un nou menú",
|
||||
"update-this-meal-plan": "Update this Meal Plan",
|
||||
"update-this-meal-plan": "Actualitza aquest pla de menjar",
|
||||
"dinner-this-week": "Sopar d'esta setmana",
|
||||
"dinner-today": "Sopar per avui",
|
||||
"dinner-tonight": "Sopar d'aquesta nit",
|
||||
@@ -307,7 +317,7 @@
|
||||
"for-type-meal-types": "per {0} tipus de menús",
|
||||
"meal-plan-rules": "Normes del planificador de menús",
|
||||
"new-rule": "Nova norma",
|
||||
"meal-plan-rules-description": "You can create rules for auto selecting recipes for your meal plans. These rules are used by the server to determine the random pool of recipes to select from when creating meal plans. Note that if rules have the same day/type constraints then the categories of the rules will be merged. In practice, it's unnecessary to create duplicate rules, but it's possible to do so.",
|
||||
"meal-plan-rules-description": "Podeu crear regles per a la selecció automàtica de receptes per als vostres plans d'àpats. El servidor utilitza aquestes regles per determinar el conjunt aleatori de receptes per seleccionar quan es creen plans d'àpats. Tingueu en compte que si les regles tenen les mateixes restriccions de dia/tipus, les categories de les regles es fusionaran. A la pràctica, no és necessari crear regles duplicades, però és possible fer-ho.",
|
||||
"new-rule-description": "When creating a new rule for a meal plan you can restrict the rule to be applicable for a specific day of the week and/or a specific type of meal. To apply a rule to all days or all meal types you can set the rule to \"Any\" which will apply it to all the possible values for the day and/or meal type.",
|
||||
"recipe-rules": "Normes per la recepta",
|
||||
"applies-to-all-days": "Aplica a tots els dies",
|
||||
@@ -349,10 +359,11 @@
|
||||
},
|
||||
"recipe-data-migrations": "Migració de receptes",
|
||||
"recipe-data-migrations-explanation": "Les receptes es poden migrar des d'una altra aplicació suportada cap a Mealie. És una manera genial de començar a utilitzar el Mealie.",
|
||||
"coming-from-another-application-or-an-even-older-version-of-mealie": "Coming from another application or an even older version of Mealie? Check out migrations and see if your data can be imported.",
|
||||
"choose-migration-type": "Elegeix un tipus de migració",
|
||||
"tag-all-recipes": "Etiqueta totes les receptes amb {tag-name}",
|
||||
"nextcloud-text": "Les receptes de Nextcloud poden ser importades d'un fitxer ZIP que contingui les dades emmagatzemades en Nextcloud. Segueix l'exemple d'estructura de directori de sota per assegurar que les receptes podran ser importades.",
|
||||
"chowdown-text": "Mealie suporta de forma nativa el format de Chowdown. Descarrega el codi del repositori com a .zip i carrega'l a sota",
|
||||
"chowdown-text": "Mealie natively supports the chowdown repository format. Download the code repository as a .zip file and upload it below.",
|
||||
"recipe-1": "Recepta 1",
|
||||
"recipe-2": "Recepta 2",
|
||||
"paprika-text": "Mealie pot importar receptes des de l'aplicació Paprika. Exporta les teves receptes de Paprika, reanomena l'extensió de l'arxiu a .zip i penja'l aquí sota.",
|
||||
@@ -360,6 +371,10 @@
|
||||
"plantoeat": {
|
||||
"title": "Plan to Eat",
|
||||
"description-long": "Mealie pot importar receptes de Plan to Eat."
|
||||
},
|
||||
"myrecipebox": {
|
||||
"title": "My Recipe Box",
|
||||
"description-long": "Mealie can import recipes from My Recipe Box. Export your recipes in CSV format, then upload the .csv file below."
|
||||
}
|
||||
},
|
||||
"new-recipe": {
|
||||
@@ -494,6 +509,8 @@
|
||||
"cook-mode": "Mode \"cuinant\"",
|
||||
"link-ingredients": "Enllaça amb els ingredients",
|
||||
"merge-above": "Fusiona amb el de dalt",
|
||||
"move-to-bottom": "Move To Bottom",
|
||||
"move-to-top": "Move To Top",
|
||||
"reset-scale": "Reinicialitza",
|
||||
"decrease-scale-label": "Divideix",
|
||||
"increase-scale-label": "Multiplica",
|
||||
@@ -509,6 +526,7 @@
|
||||
"edit-timeline-event": "Edita l'esdeveniment de la cronologia",
|
||||
"timeline": "Cronologia",
|
||||
"timeline-is-empty": "Encara no hi ha res a la cronologia. Prova de fer aquesta recepta!",
|
||||
"timeline-no-events-found-try-adjusting-filters": "No events found. Try adjusting your search filters.",
|
||||
"group-global-timeline": "{groupName} Global Timeline",
|
||||
"open-timeline": "Obrir la cronologia",
|
||||
"made-this": "Ho he fet",
|
||||
@@ -529,6 +547,8 @@
|
||||
"looking-for-migrations": "Estàs buscant migracions?",
|
||||
"import-with-url": "Importar amb l'URL",
|
||||
"create-recipe": "Crea la recepta",
|
||||
"create-recipe-description": "Create a new recipe from scratch.",
|
||||
"create-recipes": "Create Recipes",
|
||||
"import-with-zip": "Importar amb un .zip",
|
||||
"create-recipe-from-an-image": "Crea la recepta a partir d'una imatge",
|
||||
"bulk-url-import": "Importació d'URL en massa",
|
||||
@@ -599,7 +619,7 @@
|
||||
"import-summary": "Resum de la importació",
|
||||
"partial-backup": "Còpia de seguretat parcial",
|
||||
"unable-to-delete-backup": "No s'ha pogut suprimir la còpia.",
|
||||
"experimental-description": "Backups a total snapshots of the database and data directory of the site. This includes all data and cannot be set to exclude subsets of data. You can think off this as a snapshot of Mealie at a specific time. Currently, {not-crossed-version} (data migrations are not done automatically). These serve as a database agnostic way to export and import data or backup the site to an external location.",
|
||||
"experimental-description": "Backups are total snapshots of the database and data directory of the site. This includes all data and cannot be set to exclude subsets of data. You can think of this as a snapshot of Mealie at a specific time. These serve as a database agnostic way to export and import data, or back up the site to an external location.",
|
||||
"backup-restore": "Restaura la còpia de seguretat",
|
||||
"back-restore-description": "Restaurar aquesta còpia de seguretat sobreescriurà totes les dades actuals de la teva base de dades i qualsevol directori i els substituirà amb el contingut d'aquesta còpia de seguretat. {cannot-be-undone} Si la restauració es duu a terme correctament, se us tancarà la sessió.",
|
||||
"cannot-be-undone": "Aquesta acció no es pot desfer. Utilitza-la amb precaució.",
|
||||
@@ -724,7 +744,10 @@
|
||||
"ldap-ready-error-text": "Not all LDAP Values are configured. This can be ignored if you are not using LDAP Authentication.",
|
||||
"ldap-ready-success-text": "Required LDAP variables are all set.",
|
||||
"build": "Build",
|
||||
"recipe-scraper-version": "Recipe Scraper Version"
|
||||
"recipe-scraper-version": "Recipe Scraper Version",
|
||||
"oidc-ready": "OIDC Ready",
|
||||
"oidc-ready-error-text": "Not all OIDC Values are configured. This can be ignored if you are not using OIDC Authentication.",
|
||||
"oidc-ready-success-text": "Required OIDC variables are all set."
|
||||
},
|
||||
"shopping-list": {
|
||||
"all-lists": "Totes les llistes",
|
||||
@@ -832,8 +855,11 @@
|
||||
"link-id": "Id de l'enllaç",
|
||||
"link-name": "Nom de l'enllaç",
|
||||
"login": "Inicieu sessió",
|
||||
"login-oidc": "Login with",
|
||||
"or": "or",
|
||||
"logout": "Tanca la sessió",
|
||||
"manage-users": "Gestionar usuaris",
|
||||
"manage-users-description": "Create and manage users.",
|
||||
"new-password": "Nova contrasenya",
|
||||
"new-user": "Nou Usuari",
|
||||
"password-has-been-reset-to-the-default-password": "S'ha restablert la contrasenya al seu valor per defecte",
|
||||
@@ -1129,24 +1155,34 @@
|
||||
"background-tasks": "Background Tasks",
|
||||
"background-tasks-description": "Here you can view all the running background tasks and their status",
|
||||
"no-logs-found": "No Logs Found",
|
||||
"tasks": "Tasks"
|
||||
"tasks": "Tasks",
|
||||
"setup": {
|
||||
"first-time-setup": "First Time Setup",
|
||||
"welcome-to-mealie-get-started": "Welcome to Mealie! Let's get started",
|
||||
"already-set-up-bring-to-homepage": "I'm already set up, just bring me to the homepage",
|
||||
"common-settings-for-new-sites": "Here are some common settings for new sites",
|
||||
"setup-complete": "Setup Complete!",
|
||||
"here-are-a-few-things-to-help-you-get-started": "Here are a few things to help you get started with Mealie",
|
||||
"restore-from-v1-backup": "Have a backup from a previous instance of Mealie v1? You can restore it here.",
|
||||
"manage-profile-or-get-invite-link": "Manage your own profile, or grab an invite link to share with others."
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"welcome-user": "👋 Benvingut, {0}",
|
||||
"welcome-user": "👋 Welcome, {0}!",
|
||||
"description": "Manage your profile, recipes, and group settings.",
|
||||
"get-invite-link": "Get Invite Link",
|
||||
"get-public-link": "Enllaç públic",
|
||||
"account-summary": "Account Summary",
|
||||
"account-summary-description": "Here's a summary of your group's information",
|
||||
"account-summary-description": "Here's a summary of your group's information.",
|
||||
"group-statistics": "Group Statistics",
|
||||
"group-statistics-description": "Your Group Statistics provide some insight how you're using Mealie.",
|
||||
"storage-capacity": "Storage Capacity",
|
||||
"storage-capacity-description": "Your storage capacity is a calculation of the images and assets you have uploaded.",
|
||||
"personal": "Personal",
|
||||
"personal-description": "These are settings that are personal to you. Changes here won't affect other users",
|
||||
"personal-description": "These are settings that are personal to you. Changes here won't affect other users.",
|
||||
"user-settings": "User Settings",
|
||||
"user-settings-description": "Manage your preferences, change your password, and update your email",
|
||||
"api-tokens-description": "Manage your API Tokens for access from external applications",
|
||||
"user-settings-description": "Manage your preferences, change your password, and update your email.",
|
||||
"api-tokens-description": "Manage your API Tokens for access from external applications.",
|
||||
"group-description": "These items are shared within your group. Editing one of them will change it for the whole group!",
|
||||
"group-settings": "Group Settings",
|
||||
"group-settings-description": "Manage your common group settings like mealplan and privacy settings.",
|
||||
@@ -1157,9 +1193,9 @@
|
||||
"notifiers": "Notifiers",
|
||||
"notifiers-description": "Setup email and push notifications that trigger on specific events.",
|
||||
"manage-data": "Manage Data",
|
||||
"manage-data-description": "Manage your Food and Units (more options coming soon)",
|
||||
"manage-data-description": "Manage your Mealie data; Foods, Units, Categories, Tags and more.",
|
||||
"data-migrations": "Data Migrations",
|
||||
"data-migrations-description": "Migrate your existing data from other applications like Nextcloud Recipes and Chowdown",
|
||||
"data-migrations-description": "Migrate your existing data from other applications like Nextcloud Recipes and Chowdown.",
|
||||
"email-sent": "Email Sent",
|
||||
"error-sending-email": "Error Sending Email",
|
||||
"personal-information": "Personal Information",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user