1
0
Fork 0

Merge branch 'freesewing:develop' into onyx

This commit is contained in:
Thrunic 2023-10-20 10:17:19 -04:00 committed by GitHub
commit dc30cab8fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 525 additions and 319 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
dump
production.sqlite
# .env
.env

View file

@ -11,9 +11,9 @@ Use your best judgment, and feel free to propose changes to this document in a p
## Code of Conduct
When you engage with us, or when you engage with others,
please remember [the FreeSewing community standards](https://freesewing.org/docs/about/community-standards/).
please remember [the FreeSewing community standards](https://freesewing.org/docs/various/community-standards/).
As a contributor, you are also expected to uphold [the FreeSewing Code of Conduct](https://freesewing.dev/contributors/code-of-conduct/).
As a contributor, you are also expected to uphold [the FreeSewing Code of Conduct](https://freesewing.dev/guides/code-of-conduct).
<Tip>

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"
@ -240,47 +240,50 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://metafly.info/"><img src="https://avatars.githubusercontent.com/u/961256?v=4?s=100" width="100px;" alt="Stefan Sydow"/><br /><sub><b>Stefan Sydow</b></sub></a><br /><a href="#translation-stsydow" title="Translation">🌍</a> <a href="https://github.com/freesewing/freesewing/commits?author=stsydow" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=stsydow" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TheTanay902"><img src="https://avatars.githubusercontent.com/u/84577440?v=4?s=100" width="100px;" alt="Tanay Toshniwal"/><br /><sub><b>Tanay Toshniwal</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=TheTanay902" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/trentonTrama"><img src="https://avatars.githubusercontent.com/u/41126812?v=4?s=100" width="100px;" alt="Trent Trama"/><br /><sub><b>Trent Trama</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=trentonTrama" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TriploidTree"><img src="https://avatars.githubusercontent.com/u/4170521?v=4?s=100" width="100px;" alt="Tríona"/><br /><sub><b>Tríona</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=TriploidTree" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/theUnmutual"><img src="https://avatars.githubusercontent.com/u/22374635?v=4?s=100" width="100px;" alt="Unmutual"/><br /><sub><b>Unmutual</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=theUnmutual" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woutervdub"><img src="https://avatars.githubusercontent.com/u/24414629?v=4?s=100" width="100px;" alt="Wouter van Wageningen"/><br /><sub><b>Wouter van Wageningen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woutervdub" title="Code">💻</a> <a href="#design-woutervdub" title="Design">🎨</a> <a href="#tool-woutervdub" title="Tools">🔧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amysews"><img src="https://avatars.githubusercontent.com/u/25280778?v=4?s=100" width="100px;" alt="amysews"/><br /><sub><b>amysews</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=amysews" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/anna-puk"><img src="https://avatars.githubusercontent.com/u/100537439?v=4?s=100" width="100px;" alt="anna-puk"/><br /><sub><b>anna-puk</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=anna-puk" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/anna-puk"><img src="https://avatars.githubusercontent.com/u/100537439?v=4?s=100" width="100px;" alt="anna-puk"/><br /><sub><b>anna-puk</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=anna-puk" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/beautifulsummermoon"><img src="https://avatars.githubusercontent.com/u/40396388?v=4?s=100" width="100px;" alt="beautifulsummermoon"/><br /><sub><b>beautifulsummermoon</b></sub></a><br /><a href="#translation-beautifulsummermoon" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/berce"><img src="https://avatars.githubusercontent.com/u/10439709?v=4?s=100" width="100px;" alt="berce"/><br /><sub><b>berce</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=berce" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/biou"><img src="https://avatars.githubusercontent.com/u/1340376?v=4?s=100" width="100px;" alt="biou"/><br /><sub><b>biou</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=biou" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bobgeorgethe3rd"><img src="https://avatars.githubusercontent.com/u/16866285?v=4?s=100" width="100px;" alt="bobgeorgethe3rd"/><br /><sub><b>bobgeorgethe3rd</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=bobgeorgethe3rd" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=bobgeorgethe3rd" title="Documentation">📖</a> <a href="#design-bobgeorgethe3rd" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brmlyklr"><img src="https://avatars.githubusercontent.com/u/22308713?v=4?s=100" width="100px;" alt="brmlyklr"/><br /><sub><b>brmlyklr</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=brmlyklr" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.chrisbarrett.fr"><img src="https://avatars.githubusercontent.com/u/2373249?v=4?s=100" width="100px;" alt="chri5b"/><br /><sub><b>chri5b</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dingcycle"><img src="https://avatars.githubusercontent.com/u/1681985?v=4?s=100" width="100px;" alt="dingcycle"/><br /><sub><b>dingcycle</b></sub></a><br /><a href="#translation-dingcycle" title="Translation">🌍</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dingcycle"><img src="https://avatars.githubusercontent.com/u/1681985?v=4?s=100" width="100px;" alt="dingcycle"/><br /><sub><b>dingcycle</b></sub></a><br /><a href="#translation-dingcycle" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/drowned-in-books"><img src="https://avatars.githubusercontent.com/u/100040772?v=4?s=100" width="100px;" alt="drowned-in-books"/><br /><sub><b>drowned-in-books</b></sub></a><br /><a href="#question-drowned-in-books" title="Answering Questions">💬</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/econo202"><img src="https://avatars.githubusercontent.com/u/34138153?v=4?s=100" width="100px;" alt="econo202"/><br /><sub><b>econo202</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=econo202" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ericamattos"><img src="https://avatars.githubusercontent.com/u/4341417?v=4?s=100" width="100px;" alt="ericamattos"/><br /><sub><b>ericamattos</b></sub></a><br /><a href="#translation-ericamattos" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/evilrobotfromouterspace"><img src="https://avatars.githubusercontent.com/u/143673955?v=4?s=100" width="100px;" alt="evilrobotfromouterspace"/><br /><sub><b>evilrobotfromouterspace</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3Aevilrobotfromouterspace" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fightingrabbit"><img src="https://avatars.githubusercontent.com/u/25751445?v=4?s=100" width="100px;" alt="fightingrabbit"/><br /><sub><b>fightingrabbit</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=fightingrabbit" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DocSpencer77"><img src="https://avatars.githubusercontent.com/u/43393580?v=4?s=100" width="100px;" alt="gaylyndie"/><br /><sub><b>gaylyndie</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=DocSpencer77" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/grimlokason"><img src="https://avatars.githubusercontent.com/u/5112238?v=4?s=100" width="100px;" alt="grimlokason"/><br /><sub><b>grimlokason</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=grimlokason" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/grimlokason"><img src="https://avatars.githubusercontent.com/u/5112238?v=4?s=100" width="100px;" alt="grimlokason"/><br /><sub><b>grimlokason</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=grimlokason" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://weblog.redisdead.net"><img src="https://avatars.githubusercontent.com/u/6494414?v=4?s=100" width="100px;" alt="hellgy"/><br /><sub><b>hellgy</b></sub></a><br /><a href="#design-hellgy" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jackseye"><img src="https://avatars.githubusercontent.com/u/27834526?v=4?s=100" width="100px;" alt="jackseye"/><br /><sub><b>jackseye</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jackseye" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marckiesel"><img src="https://avatars.githubusercontent.com/u/39653780?v=4?s=100" width="100px;" alt="marckiesel"/><br /><sub><b>marckiesel</b></sub></a><br /><a href="#translation-marckiesel" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marpants"><img src="https://avatars.githubusercontent.com/u/61366665?v=4?s=100" width="100px;" alt="marpants"/><br /><sub><b>marpants</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=marpants" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tech.lgbt/@mergerg"><img src="https://avatars.githubusercontent.com/u/64447714?v=4?s=100" width="100px;" alt="mergerg"/><br /><sub><b>mergerg</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=raphaelsiz" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mesil"><img src="https://avatars.githubusercontent.com/u/14284175?v=4?s=100" width="100px;" alt="mesil"/><br /><sub><b>mesil</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3Amesil" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/starfetch"><img src="https://avatars.githubusercontent.com/u/80041179?v=4?s=100" width="100px;" alt="starfetch"/><br /><sub><b>starfetch</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Documentation">📖</a> <a href="#translation-starfetch" title="Translation">🌍</a> <a href="#design-starfetch" title="Design">🎨</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/starfetch"><img src="https://avatars.githubusercontent.com/u/80041179?v=4?s=100" width="100px;" alt="starfetch"/><br /><sub><b>starfetch</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Documentation">📖</a> <a href="#translation-starfetch" title="Translation">🌍</a> <a href="#design-starfetch" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/timorl"><img src="https://avatars.githubusercontent.com/u/4363804?v=4?s=100" width="100px;" alt="timorl"/><br /><sub><b>timorl</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=timorl" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ttimearl"><img src="https://avatars.githubusercontent.com/u/77916590?v=4?s=100" width="100px;" alt="ttimearl"/><br /><sub><b>ttimearl</b></sub></a><br /><a href="#content-ttimearl" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chrisgloom"><img src="https://avatars.githubusercontent.com/u/15905991?v=4?s=100" width="100px;" alt="tuesgloomsday"/><br /><sub><b>tuesgloomsday</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chrisgloom" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/valadaptive"><img src="https://avatars.githubusercontent.com/u/79560998?v=4?s=100" width="100px;" alt="valadaptive"/><br /><sub><b>valadaptive</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=valadaptive" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/viocky"><img src="https://avatars.githubusercontent.com/u/39279173?v=4?s=100" width="100px;" alt="viocky"/><br /><sub><b>viocky</b></sub></a><br /><a href="#translation-viocky" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woolishboy"><img src="https://avatars.githubusercontent.com/u/57816321?v=4?s=100" width="100px;" alt="woolishboy"/><br /><sub><b>woolishboy</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woolishboy" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cloutiy"><img src="https://avatars.githubusercontent.com/u/8433147?v=4?s=100" width="100px;" alt="yc"/><br /><sub><b>yc</b></sub></a><br /><a href="#translation-cloutiy" title="Translation">🌍</a></td>
</tr>
</tbody>

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-111-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -22,7 +22,7 @@
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-112-pink.svg"
><img src="https://img.shields.io/badge/all_contributors-113-pink.svg"
alt="All Contributors"/>
</a></p><p align='center'><a
href="https://twitter.com/freesewing_org"

View file

@ -28,7 +28,7 @@
},
"peerDependencies": {},
"dependencies": {
"@aws-sdk/client-sesv2": "3.430.0",
"@aws-sdk/client-sesv2": "3.431.0",
"@prisma/client": "5.4.2",
"bcryptjs": "2.4.3",
"cors": "2.8.5",
@ -49,7 +49,7 @@
"devDependencies": {
"chai": "4.3.10",
"chai-http": "4.4.0",
"esbuild": "0.19.5",
"esbuild": "0.19.4",
"mocha": "10.2.0",
"mocha-steps": "1.3.0",
"nodemon": "3.0.1",

View file

@ -121,6 +121,7 @@ model Set {
model CuratedSet {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
height Int @default(1)
info String @default("")
nameDe String @default("")
nameEn String @default("")

View file

@ -436,7 +436,7 @@ function randomEncryptionKey() {
let key = false
try {
console.log(chalk.dim('Checking for prior auto-generated encryption key'))
key = readFileSync(filename, 'utf-8')
key = readFileSync(filename, 'utf-8').trim()
} catch (err) {
console.log(chalk.dim('No prior auto-generated encryption key found.'))
}

View file

@ -62,6 +62,11 @@ CuratedSetModel.prototype.guardedCreate = async function ({ body, user }) {
*/
if (body.info) data.info = body.info
/*
* Add the height
*/
if (body.height) data.height = Number(body.height)
/*
* Create the database record
*/
@ -122,7 +127,7 @@ CuratedSetModel.prototype.allCuratedSets = async function () {
*/
let curatedSets
try {
curatedSets = await this.prisma.curatedSet.findMany()
curatedSets = await this.prisma.curatedSet.findMany({ orderBy: { height: 'asc' } })
} catch (err) {
log.warn(`Failed to search curated sets: ${err}`)
}
@ -131,16 +136,18 @@ CuratedSetModel.prototype.allCuratedSets = async function () {
* Iterate over list to do some housekeeping and JSON wrangling
*/
const list = []
for (const curatedSet of curatedSets) {
const asPojo = { ...curatedSet }
/*
* We need to parse this from JSON
* See https://github.com/prisma/prisma/issues/3786
*/
asPojo.measies = JSON.parse(asPojo.measies)
asPojo.tags = JSON.parse(asPojo.tags)
delete asPojo.info
list.push(asPojo)
if (curatedSets) {
for (const curatedSet of curatedSets) {
const asPojo = { ...curatedSet }
/*
* We need to parse this from JSON
* See https://github.com/prisma/prisma/issues/3786
*/
asPojo.measies = JSON.parse(asPojo.measies)
asPojo.tags = JSON.parse(asPojo.tags)
delete asPojo.info
list.push(asPojo)
}
}
return list
@ -227,6 +234,11 @@ CuratedSetModel.prototype.guardedUpdate = async function ({ params, body, user }
*/
if (typeof body.info === 'string') data.info = body.info
/*
* Handle the info field
*/
if (body.height) data.height = Number(body.height)
/*
* Unlike a regular set, curated set have notes and name in each language
*/
@ -256,7 +268,7 @@ CuratedSetModel.prototype.guardedUpdate = async function ({ params, body, user }
await storeImage(
{
id: `cset-${this.record.id}`,
metadata: { user: this.user.uid },
metadata: { user: user.uid },
b64: body.img,
},
this.isTest(body)
@ -432,6 +444,7 @@ CuratedSetModel.prototype.fromSuggestion = async function ({ params, user }) {
* Now create the curated set
*/
await this.createRecord({
height: this.Confirmation.record.clear.data.height || 1,
nameDe: name,
nameEn: name,
nameEs: name,

View file

@ -916,7 +916,10 @@ UserModel.prototype.passwordSignIn = async function (req) {
* have their password and we know it's good, let's rehash it the v3 way
* if this happens to be a v2 user.
*/
if (updatedPasswordField) await this.update({ password: updatedPasswordField })
if (updatedPasswordField) {
// We pass the third parameter here to the password field does not get re-hashed
await this.update({ password: updatedPasswordField }, {}, { password: true })
}
/*
* Final check for account status and other things before returning

View file

@ -114,7 +114,7 @@ export function encryption(stringKey, salt = 'FreeSewing') {
* Salts and hashes a password
*/
export function hashPassword(input, salt = false) {
if (salt === false) salt = Buffer.from(randomBytes(16))
if (salt === false) salt = Buffer.from(randomBytes(16), 'hex')
else salt = Buffer.from(salt, 'hex')
const hash = scryptSync(input, salt, 64)

View file

@ -136,12 +136,12 @@ export function decorateModel(Model, tools, modelConfig) {
/*
* Helper method to encrypt at-rest data
*/
Model.cloak = function (data) {
Model.cloak = function (data, raw) {
/*
* Encrypt data
*/
for (const field of this.encryptedFields) {
if (typeof data[field] !== 'undefined') {
if (typeof data[field] !== 'undefined' && !raw[field]) {
if (this.jsonFields && this.jsonFields.includes(field)) {
data[field] = this.encrypt(JSON.stringify(data[field]))
} else {
@ -153,7 +153,7 @@ export function decorateModel(Model, tools, modelConfig) {
/*
* Password needs to be hashed too
*/
if (data.password && typeof data.password === 'string') {
if (data.password && !raw.password && typeof data.password === 'string') {
data.password = asJson(hashPassword(data.password))
}
@ -195,9 +195,9 @@ export function decorateModel(Model, tools, modelConfig) {
* Updates the model data
* Used when we create the data ourselves so we know it's safe
*/
Model.update = async function (data, include = {}) {
Model.update = async function (data, include = {}, raw = {}) {
try {
const cloaked = await this.cloak(data)
const cloaked = await this.cloak(data, raw)
this.record = await this.prisma[modelConfig.name].update({
where: { id: this.record.id },
include,

View file

@ -35,11 +35,11 @@
"@next/bundle-analyzer": "13.5.4",
"@tailwindcss/typography": "0.5.9",
"algoliasearch": "4.20.0",
"daisyui": "3.9.3",
"daisyui": "3.9.2",
"lodash.get": "4.4.2",
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"next": "13.5.4",
"next": "13.5.6",
"react": "18.2.0",
"react-copy-to-clipboard": "5.1.0",
"react-dom": "18.2.0",

View file

@ -36,11 +36,11 @@
"d3-drag": "3.0.0",
"d3-selection": "3.0.0",
"daisyui": "3.9.3",
"i18next": "23.5.1",
"i18next": "23.6.0",
"lodash.get": "4.4.2",
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"next": "13.5.5",
"next": "13.5.6",
"next-i18next": "14.0.3",
"ora": "7.0.1",
"react": "18.2.0",

View file

@ -36,16 +36,16 @@
"@tailwindcss/typography": "0.5.9",
"algoliasearch": "4.20.0",
"react-copy-to-clipboard": "5.1.0",
"daisyui": "3.9.3",
"echarts": "5.4.3",
"daisyui": "3.9.2",
"echarts": "5.4.2",
"echarts-for-react": "3.0.2",
"jotai": "2.4.3",
"jotai-location": "0.5.1",
"jotai-location": "0.5.2",
"lodash.get": "4.4.2",
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"luxon": "3.4.3",
"next": "13.5.4",
"next": "13.5.6",
"ora": "7.0.1",
"react-dropzone": "14.2.3",
"react-hotkeys-hook": "4.4.1",

View file

@ -0,0 +1,46 @@
import { nsMerge } from 'shared/utils.mjs'
// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
// Hooks
import { useTranslation } from 'next-i18next'
// Components
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
import { AuthWrapper, ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
import { EditCuratedSet, ns as csetNs } from 'shared/components/curated-sets.mjs'
// Translation namespaces used on this page
const ns = nsMerge(pageNs, authNs, csetNs, 'curate')
const EditCuratedSetPage = ({ page, id }) => {
const { t } = useTranslation(ns)
return (
<PageWrapper {...page} title={`${t('curate:set')}: ${id}`}>
<AuthWrapper requiredRole="curator">
<EditCuratedSet id={id} />
</AuthWrapper>
</PageWrapper>
)
}
export default EditCuratedSetPage
export async function getStaticProps({ locale, params }) {
return {
props: {
...(await serverSideTranslations(locale, ns)),
id: params.id,
page: {
locale,
path: ['curate', 'sets', params.id],
},
},
}
}
export async function getStaticPaths() {
return {
paths: [],
fallback: true,
}
}

View file

@ -0,0 +1,32 @@
// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { nsMerge } from 'shared/utils.mjs'
// Components
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
import { AuthWrapper, ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
import { CuratedSetsList } from 'shared/components/curated-sets.mjs'
// Translation namespaces used on this page
const namespaces = nsMerge(pageNs, authNs)
const AdminPage = ({ page }) => (
<PageWrapper {...page} title="Manage Curated Sets">
<AuthWrapper requiredRole="admin">
<CuratedSetsList href={(id) => `/admin/cset/${id}`} />
</AuthWrapper>
</PageWrapper>
)
export default AdminPage
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, namespaces)),
page: {
locale,
path: ['admin', 'cset'],
},
},
}
}

View file

@ -10,6 +10,7 @@ import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
import { AuthWrapper, ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
import { Loading } from 'shared/components/spinner.mjs'
import { Hits } from 'shared/components/admin.mjs'
import { PageLink } from 'shared/components/link.mjs'
// Translation namespaces used on this page
const namespaces = nsMerge(pageNs, authNs)
@ -39,6 +40,10 @@ const AdminPage = ({ page }) => {
return (
<PageWrapper {...page} title="Administration">
<AuthWrapper requiredRole="admin">
<p>
Other admin links:
<PageLink href="/admin/cset" txt="Curated measurement sets" />
</p>
<h5>Search users</h5>
<input
autoFocus

View file

@ -20,7 +20,7 @@ const ShowcasePage = ({ dir, page, mdx, frontmatter }) => {
frontmatter={frontmatter}
mdx={mdx}
dir={dir}
type="blog"
type="showcase"
/>
)}
/>

View file

@ -48,18 +48,18 @@
"d3-dispatch": "3.0.1",
"d3-drag": "3.0.0",
"d3-selection": "3.0.0",
"daisyui": "3.9.3",
"daisyui": "3.9.2",
"file-saver": "2.0.5",
"i18next": "23.5.1",
"i18next": "23.6.0",
"jotai": "2.4.3",
"jotai-location": "0.5.1",
"jotai-location": "0.5.2",
"js-yaml": "4.1.0",
"lodash.debounce": "^4.0.8",
"lodash.get": "4.4.2",
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"mustache": "4.2.0",
"next": "13.5.5",
"next": "13.5.6",
"next-i18next": "14.0.3",
"pdfkit": "0.13.0",
"postcss-for": "2.1.1",
@ -71,14 +71,14 @@
"react-dropzone": "14.2.3",
"react-swipeable": "7.0.1",
"react-timeago": "7.2.0",
"react-zoom-pan-pinch": "3.2.0",
"react-zoom-pan-pinch": "3.1.0",
"remark-gfm": "3.0.1",
"remark-frontmatter": "4.0.1",
"remark-mdx-frontmatter": "3.0.0",
"remark-smartypants": "2.0.0",
"slugify": "^1.6.6",
"svg-to-pdfkit": "https://git@github.com/eriese/SVG-to-PDFKit",
"tlds": "1.242.0",
"tlds": "1.243.0",
"use-persisted-state": "0.3.3",
"web-worker": "1.2.0"
},

View file

@ -14,7 +14,7 @@ import {
} from 'shared/utils.mjs'
import { measurements } from 'config/measurements.mjs'
import { measurements as designMeasurements } from 'shared/prebuild/data/design-measurements.mjs'
//import orderBy from 'lodash.orderby'
import orderBy from 'lodash.orderby'
// Hooks
import { useAccount } from 'shared/hooks/use-account.mjs'
import { useBackend } from 'shared/hooks/use-backend.mjs'
@ -44,6 +44,7 @@ import {
MeasieInput,
DesignDropdown,
ListInput,
NumberInput,
ns as inputNs,
} from 'shared/components/inputs.mjs'
@ -65,7 +66,7 @@ const SetLineup = ({ sets = [], href = false, onClick = false }) => (
const props = {
className: 'aspect-[1/3] w-auto h-96',
style: {
backgroundImage: `url(${cloudflareImageUrl({ id: set.img, type: 'lineup' })})`,
backgroundImage: `url(${cloudflareImageUrl({ id: `cset-${set.id}`, type: 'lineup' })})`,
width: 'auto',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
@ -118,7 +119,7 @@ const ShowCuratedSet = ({ cset }) => {
onClick={() =>
setModal(
<ModalWrapper flex="col" justify="top lg:justify-center" slideFrom="right">
<img src={cloudflareImageUrl({ type: 'lineup', id: cset.img })} />
<img src={cloudflareImageUrl({ type: 'lineup', id: `cset-${cset.id}` })} />
</ModalWrapper>
)
}
@ -130,7 +131,10 @@ const ShowCuratedSet = ({ cset }) => {
</div>
<h2>{t('data')}</h2>
<DisplayRow title={t('name')}>{cset[`name${capitalize(lang)}`]}</DisplayRow>
<DisplayRow title={t('name')}>
<PageLink href={`/curated-sets/${cset.id}`} txt={cset[`name${capitalize(lang)}`]} />
</DisplayRow>
<DisplayRow title={t('height')}>{cset.height}cm</DisplayRow>
{control >= controlLevels.sets.notes && (
<DisplayRow title={t('notes')}>
<Mdx md={cset[`notes${capitalize(lang)}`]} />
@ -198,7 +202,7 @@ export const CuratedSet = ({ id }) => {
export const CuratedSetPicker = (props) => <CuratedSets {...props} />
// Component for the curated-sets page
export const CuratedSets = ({ href = false, clickHandler = false }) => {
export const CuratedSets = ({ href = false, clickHandler = false, published = true }) => {
// Hooks
const backend = useBackend()
const { setLoadingStatus } = useContext(LoadingStatusContext)
@ -214,7 +218,9 @@ export const CuratedSets = ({ href = false, clickHandler = false }) => {
const result = await backend.getCuratedSets()
if (result.success) {
const allSets = {}
for (const set of result.data.curatedSets) allSets[set.id] = set
for (const set of result.data.curatedSets) {
if (!published || set.published) allSets[set.id] = set
}
setSets(allSets)
setLoadingStatus([true, 'status:dataLoaded', true, true])
} else setLoadingStatus([true, 'status:backendError', true, false])
@ -223,7 +229,7 @@ export const CuratedSets = ({ href = false, clickHandler = false }) => {
}, [])
const lineupProps = {
sets: Object.values(sets),
sets: orderBy(sets, 'height', 'asc'),
}
if (typeof href === 'function') lineupProps.href = href
else lineupProps.onClick = clickHandler ? clickHandler : (set) => setSelected(set.id)
@ -236,7 +242,7 @@ export const CuratedSets = ({ href = false, clickHandler = false }) => {
)
}
// Component for the maintaining the list of curated-sets
// Component for the maintaining the list of curated-sets
export const CuratedSetsList = ({ href = false }) => {
// Hooks
const { t } = useTranslation(ns)
@ -328,6 +334,7 @@ export const CuratedSetsList = ({ href = false }) => {
<th className="text-base-300 text-base">{t('curate:img')}</th>
<th className="text-base-300 text-base">{t('curate:name')}</th>
<th className="text-base-300 text-base">{t('curate:published')}</th>
<th className="text-base-300 text-base">{t('curate:height')}</th>
<th className="text-base-300 text-base">{t('curate:createdAt')}</th>
</tr>
</thead>
@ -342,15 +349,23 @@ export const CuratedSetsList = ({ href = false }) => {
onClick={() => toggleSelect(set.id)}
/>
</td>
<td>{set.id}</td>
<td>
<PageLink href={typeof href === 'function' ? href(set.id) : href} txt={set.id} />
</td>
<td>
<img
src={cloudflareImageUrl({ id: set.img, variant: 'sq100' })}
src={cloudflareImageUrl({ id: `cset-${set.id}`, variant: 'sq100' })}
className="mask mask-squircle w-12 h-12"
/>
</td>
<td>{set.nameEn}</td>
<td>
<PageLink
href={typeof href === 'function' ? href(set.id) : href}
txt={set.nameEn}
/>
</td>
<td>{set.published ? <BoolYesIcon /> : <BoolNoIcon />}</td>
<td>{set.height}cm</td>
<td>{set.createdAt}</td>
</tr>
))}
@ -415,6 +430,7 @@ export const EditCuratedSet = ({ id }) => {
k = `notes${capitalize(lang)}`
if (data[k] !== cset[k]) changes[k] = data[k]
}
if (data.height !== cset.height) changes.height = Number(data.height)
if (data.img !== cset.img) changes.img = data.img
if (data.published !== cset.published) changes.published = data.published
for (const m in data.measies) {
@ -431,7 +447,7 @@ export const EditCuratedSet = ({ id }) => {
<div className="max-w-2xl">
<PageLink href={`/curated-sets/${id}`} txt={`/curated-sets/${id}`} />
<ListInput
label={t('curate:publshed')}
label={t('curate:published')}
update={(val) => updateData('published', val)}
list={[
{
@ -458,6 +474,17 @@ export const EditCuratedSet = ({ id }) => {
current={data.published}
/>
<NumberInput
min={42}
max={215}
step={1}
key="height"
label="Height"
update={(val) => updateData('height', val)}
current={Number(data.height)}
valid={notEmpty}
/>
<h2 id="measies">{t('measies')}</h2>
<div className="bg-secondary px-4 pt-1 pb-4 rounded-lg shadow bg-opacity-10">
<DesignDropdown

View file

@ -130,6 +130,39 @@ export const ButtonFrame = ({
</button>
)
/*
* Input for integers
*/
export const NumberInput = ({
label, // Label to use
update, // onChange handler
valid, // Method that should return whether the value is valid or not
current, // The current value
original, // The original value
placeholder, // The placeholder text
docs = false, // Docs to load, if any
id = '', // An id to tie the input to the label
labelBL = false, // Bottom-Left label
labelBR = false, // Bottom-Right label
max = 0,
min = 220,
step = 1,
}) => (
<FormControl {...{ label, labelBL, labelBR, docs }} forId={id}>
<input
id={id}
type="number"
placeholder={placeholder}
value={current}
onChange={(evt) => update(evt.target.value)}
className={`input w-full input-bordered ${
current === original ? 'input-secondary' : valid(current) ? 'input-success' : 'input-error'
}`}
{...{ max, min, step }}
/>
</FormControl>
)
/*
* Input for strings
*/

View file

@ -28,6 +28,7 @@ sets: Your Measurements Sets
patterns: Your Patterns
curate: Curate
curateSets: Curate Sets
curatedSets: Curated Measurements Sets
code: Code
patternsAbout: Lists the patterns that you have stored in your FreeSewing account
setsAbout: Lists the measurements sets that you have stored in your FreeSewing account

View file

@ -6,13 +6,29 @@ import { ghPrefix } from './remark-github-images.mjs'
/*
* Loads markdown/mdx from disk
* Will fallback to en if the specific language is not available.
* If not, the site wil always be broken while translation catches up with new content
*/
export const loadMdxFromDisk = async ({
language, // The language code of the markdown to load (like 'en')
site, // The site folder, one of 'dev' or 'org'
slug, // The slug below that folder, like 'guides/plugins'
}) =>
await fs.promises.readFile(path.resolve(`../../markdown/${site}/${slug}/${language}.md`), 'utf-8')
}) => {
let result
try {
result = await fs.promises.readFile(
path.resolve(`../../markdown/${site}/${slug}/${language}.md`),
'utf-8'
)
} catch (err) {
result = await fs.promises.readFile(
path.resolve(`../../markdown/${site}/${slug}/en.md`),
'utf-8'
)
}
return result
}
/*
* Loads markdown/mdx from Github

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