1
0
Fork 0

fix: Various website and repo fixes (#243)

- Fixes things in Oath flow, yet needs testing before we close #235
- Updates security notice, closes #240
- Fixes broken links to user profiles, closes #238

Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/243
Co-authored-by: joostdecock <joost@joost.at>
Co-committed-by: joostdecock <joost@joost.at>
This commit is contained in:
joostdecock 2025-04-12 10:42:35 +00:00 committed by Joost De Cock
parent 7f5258d42d
commit c5b0daf390
12 changed files with 175 additions and 363 deletions

1
.gitignore vendored
View file

@ -45,6 +45,7 @@ packages/new-design/shared/.gitignore
packages/new-design/lib/banner.mjs packages/new-design/lib/banner.mjs
sites/*/public/img/og/* sites/*/public/img/og/*
sites/org/src/lib/i18n.mjs sites/org/src/lib/i18n.mjs
sites/org/authors.json
# Org prebuild artifacts # Org prebuild artifacts
sites/org/src/lib/designs.mjs sites/org/src/lib/designs.mjs

View file

@ -2,18 +2,16 @@
## Supported Versions ## Supported Versions
Until v3 is GA I will support both v2 and v3.
Once v3 is out of beta, I will drop support for v2 shortly after.
| Version | Supported | | Version | Supported |
| ------- | ------------------ | | ------- | ------------------ |
| 3.x | :white_check_mark: | | 4.x | :white_check_mark: |
| 2.x | :white_check_mark: | | 3.x | :x: |
| 2.x | :x: |
| < 2.0 | :x: | | < 2.0 | :x: |
## Reporting a Vulnerability ## Reporting a Vulnerability
- You can report an issue here: https://next.freesewing.org/support - You can report an issue here: https://freesewing.eu/support
- Or you can email joost, the FreeSewing maintainer, at joost@joost.at. - Or you can email joost, the FreeSewing maintainer, at joost@joost.at.
I do not have money to spend on a bug bounty program, but if you provide your snail mail (physical) address, I will send you some stickers. I do not have money to spend on a bug bounty program, but if you provide your snail mail (physical) address, I will send you some stickers.

View file

@ -201,7 +201,7 @@ export const User = ({ user, Link }) => {
></button> ></button>
<div className="tw-w-full tw-flex tw-flex-col tw-gap-1"> <div className="tw-w-full tw-flex tw-flex-col tw-gap-1">
<div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1"> <div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1">
<Link href={`/users/user?id=${user.id}`}>{user.username}</Link> <Link href={`/users/?id=${user.id}`}>{user.username}</Link>
<KeyVal k="id" val={user.id} /> <KeyVal k="id" val={user.id} />
</div> </div>
<div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1"> <div className="tw-w-full tw-flex tw-flex-row tw-flex-wrap tw-gap-1">

View file

@ -1,5 +1,11 @@
// Utils // Utils
import { horFlexClasses, horFlexClassesNoSm, capitalize, getSearchParam } from '@freesewing/utils' import {
linkClasses,
horFlexClasses,
horFlexClassesNoSm,
capitalize,
getSearchParam,
} from '@freesewing/utils'
// Context // Context
import { LoadingStatusContext } from '@freesewing/react/context/LoadingStatus' import { LoadingStatusContext } from '@freesewing/react/context/LoadingStatus'
// Hooks // Hooks
@ -138,10 +144,10 @@ export const SignIn = ({ onSuccess = false, silent = false }) => {
const initOauth = async (provider) => { const initOauth = async (provider) => {
setLoadingStatus([true, 'Contacting the FreeSewing backend']) setLoadingStatus([true, 'Contacting the FreeSewing backend'])
const result = await backend.oauthInit({ provider, language: 'en' }) const [status, body] = await backend.oauthInit(provider.toLowerCase())
if (result.success) { if (status === 200 && body.result === 'success') {
setLoadingStatus([true, `Contacting ${capitalize(provider)}`]) setLoadingStatus([true, `Contacting ${capitalize(provider)}`])
window.location.href = result.data.authUrl window.location.href = body.authUrl
} }
} }
@ -421,10 +427,54 @@ export const SignInConfirmation = ({ onSuccess = false }) => {
if (!id || !check) if (!id || !check)
return ( return (
<> <>
<h1>One moment pleae</h1> <h1>One moment please</h1>
<Spinner className="tw-w-8 tw-h-8 tw-m-auto tw-animate-spin" /> <Spinner className="tw-w-8 tw-h-8 tw-m-auto tw-animate-spin" />
</> </>
) )
return <p>fixme</p> return <p>fixme</p>
} }
/*
* This is the generic component that will handle the Oauth callback
*/
function OauthCallback({ provider = false }) {
const [error, setError] = useState(false)
const backend = useBackend()
const { setAccount, setToken, setSeenUser } = useAccount()
// Handle callback
useEffect(() => {
const oauthFlow = async () => {
const state = getSearchParam('state')
const code = getSearchParam('state')
const [status, body] = await backend.oauthSignIn({ state, code, provider })
if (status === 200 && body.account && body.token) {
setAccount(body.account)
setToken(body.token)
setSeenUser(body.data.account.username)
navigate('/welcome', true)
} else setError(true)
}
oauthFlow()
}, [])
if (!provider) return <p>You must provide a provider prop to this component</p>
return error ? (
<>
<h2>Oh no, something went wrong</h2>
<p>
Please{' '}
<Link className={linkClasses} href="/support">
escalate this to support
</Link>
</p>
</>
) : (
<>
<h2>One moment please</h2>
<Spinner className="tw-w-8 tw-h-8 tw-m-auto tw-animate-spin" />
</>
)
}

View file

@ -86,10 +86,10 @@ export const SignUp = ({ embed = false }) => {
const initOauth = async (provider) => { const initOauth = async (provider) => {
setLoadingStatus([true, 'Contacting the backend']) setLoadingStatus([true, 'Contacting the backend'])
const result = await backend.oauthInit({ provider, language: 'en' }) const [status, body] = await backend.oauthInit(provider.toLowerCase())
if (result.success) { if (status === 200 && body.result === 'success') {
setLoadingStatus([true, `Contacting ${provider}`]) setLoadingStatus([true, `Contacting ${provider}`])
window.location.href = result.data.authUrl window.location.href = body.authUrl
} }
} }
const Heading = embed const Heading = embed

View file

@ -118,7 +118,7 @@ export const Stats = ({ Link = false }) => {
<ol className="tw-list tw-list-inside tw-list-decimal tw-ml-4"> <ol className="tw-list tw-list-inside tw-list-decimal tw-ml-4">
{stats.topUsers.map((u) => ( {stats.topUsers.map((u) => (
<li key={u.id}> <li key={u.id}>
<Link href={`/users/user?id=${u.id}`} className={linkClasses}> <Link href={`/users/?id=${u.id}`} className={linkClasses}>
{u.username} {u.username}
</Link> </Link>
: {formatNumber(u.calls)} : {formatNumber(u.calls)}

View file

@ -1,345 +0,0 @@
{
"1": {
"name": "joost",
"title": "FreeSewing Maintainer",
"url": "https://freesewing.org/users/user?id=1",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-7bf3d6a154885eb2c4f56e2bf54b3666d8fb634b72c07c971511816ed0298c79/public",
"bio": "Hi, my name is Joost 👋\n\n - 🫡 I am the [benevolent dictator](https://en.wikipedia.org/wiki/Benevolent_dictator_for_life) here at FreeSewing\n - 🧵 I make clothes and shoes\n - 👕 I design sewing patterns\n - 🧑‍💻 I write code\n - 🐘 I am [@joost@freesewing.social](https://freesewing.social/@joost) on Mastodon\n - 🦋 I am [@joost.at](https://bsky.app/profile/joost.at) on Bluesky\n - 📫 My email is joost AT joost DOT at\n - 🙊 I'm an introvert\n - 🦈 My pronouns are he/him or they/them\n - 👻 Joost sounds like Ghost, in case you're wondering\n"
},
"8": {
"name": "anonymous",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=8",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-73cfecc58ba4f60673d4b60fd7662a4ce96ef548ad643455dd94d604a44443f1/public",
"bio": "The person who created this prefers to remain anonymous."
},
"132": {
"name": "wouter.vdub",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=132",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-50845fff1c1ba6653367d0c5e529816a7ef1287c5da6ee6eeb753c44c7c1d749/public",
"bio": "--"
},
"292": {
"name": "cakeymcdoodle",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=292",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-8d046f536844db182e8ac58ded1ddfd7386fe1fa6f14e6d38b060a1e93014444/public",
"bio": "--"
},
"433": {
"name": "tiger751023",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=433",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-b12c0af1fab3f4fe68d4a9985ced5ea92ecde5bdf0e73a32f61b96a0bde6e1b7/public",
"bio": "Sewing is better relaxation then yoga!"
},
"840": {
"name": "eleonore",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=840",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-8964e72c07aae15eb3d121ef74c1874838623541afedf1e67898f3726bcb3d0a/public",
"bio": "--"
},
"1972": {
"name": "ferdi",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=1972",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-52557d4e7d47627ce6cc3fd8fdc5e114708826fbc4afb71d10774bf744363a18/public",
"bio": "--"
},
"2590": {
"name": "buster",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=2590",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-a291ebd6924e46cdb013b130530f05f6371b31c55c9374c1b5f436bc4b36a254/public",
"bio": "--"
},
"13050": {
"name": "karen",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=13050",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-3f1d036911816e5521edcf10f48cabab7ea83725459435b7a27cb8f2bd44ff67/public",
"bio": "--"
},
"19867": {
"name": "natalia",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=19867",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-ca7db3bd8ee9d60b4aedca63bc9cf51b4b3805c403eca6e9689d1dd4eb907299/public",
"bio": "--"
},
"20165": {
"name": "Saber",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=20165",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-53150229752de5f6bca4af9755980ffa8bec95bd38e2e9074ffff9ec95fed416/public",
"bio": "--"
},
"20400": {
"name": "lexander",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=20400",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-82a58346e7f30fb41fdb852958a79af8274f953e2872474bc1138a556500da09/public",
"bio": "Beginner sewist and computer science student"
},
"20650": {
"name": "bobgeorgethe3rd",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=20650",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-823012b06b3f8e34c13e3b8f8737f7fa9e6d87695a2bef92cd4c42ece755d664/public",
"bio": "I sometimes stream sewing projects on [Twitch](www.twtich.tv/bobgeorgethe3rd)"
},
"22007": {
"name": "modern_dragon",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=22007",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-e473e7e3fc50652a02cf1f31a5132458958d0d1bd9e98f4cc0e83d22b32f5182/public",
"bio": "Plus-size genderqueer goth femme. Pronouns: they/them."
},
"22141": {
"name": "comixminx",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=22141",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-677bd3e26da7e8e50aa9f1be97ed4c36eb5eee18822b962db97684c7aec297bd/public",
"bio": "she/her, has made trousers for others, want to make some for myself too"
},
"22693": {
"name": "tuesday",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=22693",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-04252dbd03a90c6ce91f0dc77869dd74ba605b684f3ffe3b4fb5f0341d5eed06/public",
"bio": "writing, juggling, code, music, trying to learn how to sew ~"
},
"22708": {
"name": "starfetch",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=22708",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-97e84954b53e19dcf6ed7cfcad9a4729f41d030c0c1d61a7d2e397a6140a8d39/public",
"bio": "--"
},
"23123": {
"name": "braveness23",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=23123",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-46900cf0f22b2e4ad552b273c547a525fb3e0c5f7cf318a2b1acdc6ebce08ebe/public",
"bio": "I am a 56-year-old male that is interested in fashion and bespoke clothing. Due to a sorted medical history, my abdomen is disfigured from surgeries and hernias making it very difficult to find well-fitting clothing."
},
"23364": {
"name": "Renee-mariposa",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=23364",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-d14ee63ac5a6ba10e045fdd667bee7ff44dc4a03a07200f491bacd29e14d00bf/public",
"bio": "Learning how to sew, one stitch at a time. "
},
"23386": {
"name": "Ramoth",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=23386",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-3a67293126ae812f44948e462d1394482bd878fceff616f73f911b85325d911e/public",
"bio": "--"
},
"24546": {
"name": "MagicantAce",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=24546",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-43f5f598970dba556faa776301014145ee8af55bb1cd8b6e5885112c090a935e/public",
"bio": "20 year old creature making doll clothes"
},
"27042": {
"name": "Guin",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=27042",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-8deb93968b8d59a01370c29877ddddcb64b15e2b2991112842da256fa4b924c1/public",
"bio": "I'm Guin! I'm transmasculine and interested in odd fashions. \nI love soft fabrics, deep pockets, sleeveless turtlenecks\n and the colors teal, ochre, and sap-green."
},
"27667": {
"name": "talatrix",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=27667",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-ba6ff755df220f46b713556fd385b04049fa5a282355ba3b432ba1191688b78f/public",
"bio": "--"
},
"27669": {
"name": "Gaëlle",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=27669",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-c96d90aec7a45ad9102859ee9964d961a5d70b9ec0b3b4efa4355f08631128c8/public",
"bio": "--"
},
"28322": {
"name": "Zag",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=28322",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-032533feeb57b882afaac9dc3fbabb24d8db5e05346cd3e2bf55b2b3f565f37d/public",
"bio": "my gender is the silly dance chris fleming does in front of h&r block"
},
"28514": {
"name": "halbmoki",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=28514",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-437500546d6cf8106f3359a1d37a7ca8ffa50f8f73f12083651feb305f0cc407/public",
"bio": "Sam [they/she], queer novice sewist from northern germany. Fond of sharks all things cuddly."
},
"28838": {
"name": "Benjamin F.",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=28838",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-fceb665964cc940609ef9c8c6a4b93c9473474d938f5a22bbbe01389e9de7c6b/public",
"bio": "A beginning sewist in the United States."
},
"28890": {
"name": "Jacques",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=28890",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-cb4c99ce55d8ca88b5439d58e0a1a5e3e360a113e0425c39d2551d7ef15f7530/public",
"bio": "--"
},
"29576": {
"name": "ojensen",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=29576",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-d777b17e88df4a7fde1e4f6cb7902ad03f06bcdcc7cc8838a172e14f1443bee8/public",
"bio": "--"
},
"29683": {
"name": "JenBarb_",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=29683",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-64c1c9fac1c27a73e164ec0f4690ee1657aecca15a419403c2fe85583bb6dbe4/public",
"bio": "--"
},
"31287": {
"name": "laser",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=31287",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-b70c1c54b6961e5fd8bc6f9d616fc0cb875c00c9004cb7906c48e0098cf8f434/public",
"bio": "--"
},
"31336": {
"name": "VSinerva",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=31336",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-890ad013392e1456b9e131ea79d7bd6d45c532b935ebfddad983808d34e6ec56/public",
"bio": "CS Student and hand-sewing weirdo"
},
"31916": {
"name": "dylanwhat",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=31916",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-edd9bd34796843b8aa5e5e487b8698baf5a4991ecdedc3e5a9e4423049494140/public",
"bio": "--"
},
"32339": {
"name": "Imunar",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=32339",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-ae7c2fb6a38f6c6c3a3d3a53dee5d567ece58e64ea8b08e1673ecb2c90a0cfd3/public",
"bio": "--"
},
"32412": {
"name": "petit_lutin",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=32412",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-003104b18f94bb084ed0c4119ad519b7270668c42f637e5358e71545e323896f/public",
"bio": "j'ai besoin de patrons pour hommes, let me be gay as fuck\n\nVous pouvez trouver ce que je fais ici : https://ko-fi.com/la_compagnie_des_petits_lutins et ici : https://artisans.coop/pages/seller-profile/la-compagnie-des-petits-lutins"
},
"33070": {
"name": "Thrunic",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=33070",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-1072407dcd1e96222165f7e01c73800393eb3f25540eadb21ecfde80aed304e7/public",
"bio": "--"
},
"46488": {
"name": "Nisaea",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=46488",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-d56b0715cd00d84cfa0712b9cf89a1fbcd2d1cc6da223d922c0a3fa02966d725/public",
"bio": "Basically an airhead with an old Elna lotus SP that somehow still works."
},
"47151": {
"name": "iderias",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=47151",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-2a05441e1d70066ea62bed8dd9294d39cc6e8e8325bc18a021351a93fd5a916e/public",
"bio": "Engineer-in-training and fiber arts enthusiast, on a journey to learn sewing. "
},
"49445": {
"name": "Galit",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=49445",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-a56c467e8dec25e4ab6c5e42b424963cba328eba867da5b167a64dd2d13d786d/public",
"bio": "Sew + developer"
},
"50461": {
"name": "Vlad",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=50461",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-840f1825172749befb77bde02380487229dffda17ceb69b7064955e89cd1c7c0/public",
"bio": "--"
},
"50818": {
"name": "RockerKitten",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=50818",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-e68dfc28b94570f7b6db7519b652fb42544fcb0a5f610e61fa055897494f5720/public",
"bio": "Stay at home mom and maker of many things. From 3d models and printing, to fiber arts including but not limited to sewing, crochet, and knitting, as well as painting, resin art, wood working, and so much more."
},
"61987": {
"name": "posh tunic",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=61987",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-3059a3f52ff842177af223b71160c8a57e6fbedfc2ed98d2add153c9ac3e1d39/public",
"bio": ""
},
"62144": {
"name": "Tinker-Tim-The-Toolman-Taylor-Soldier-Spy",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=62144",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-c8281a6aa121eadb88477fa8638ed3830c1f16251c0a332b3a03b7015e11ea98/public",
"bio": ""
},
"64919": {
"name": "paula_",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=64919",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-68d3ac893ac579edf932eacfbc4b542da891f1dd1721887bfc21411dd4e0632e/public",
"bio": ""
},
"65187": {
"name": "user-65187",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=65187",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-d9b45addc1a44893041ea1e0ab4d534954deca9428d409ceadbcaf6f5bb91159/public",
"bio": ""
},
"71794": {
"name": "Karlo",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=71794",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-dd16e880914e4786f1aed16ccc6829c461a5cc80557606c679c8428ecfcbb13d/public",
"bio": "Hi, ich habe das Nähen entdeckt und diese Seite! Ich freue mich auf die Zusammenarbeit\n"
},
"72337": {
"name": "amaan hammadi",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=72337",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-104340ac33a9e4227fc6160cb4c48736b04aa02dd8c82396906c5d6a8e841e87/public",
"bio": "--"
},
"73391": {
"name": "user-73391",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=73391",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-654454d4f1013ef46127813370dccb932eaa3135c5cd86d178d79d88e2568f01/public",
"bio": ""
},
"83912": {
"name": "GursMan123",
"title": "FreeSewing User",
"url": "https://freesewing.org/users/user?id=83912",
"image_url": "https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-e2a6dc1b0915b6249afe694875e6c15b9da81f21f9a4c2a894e31de904f8c193/public",
"bio": ""
}
}

View file

@ -59,7 +59,7 @@ const titles = {
const userAsAuthor = (user) => ({ const userAsAuthor = (user) => ({
name: user.profile.username, name: user.profile.username,
title: titles[user.profile.role], title: titles[user.profile.role],
url: `https://freesewing.org/users/user?id=${user.profile.id}`, url: `https://freesewing.eu/users/?id=${user.profile.id}`,
image_url: `https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-${user.profile.ihash}/public`, image_url: `https://imagedelivery.net/ouSuR9yY1bHt-fuAokSA5Q/uid-${user.profile.ihash}/public`,
bio: user.profile.bio, bio: user.profile.bio,
}) })
@ -67,7 +67,7 @@ const userAsAuthor = (user) => ({
const loadUser = async (id) => { const loadUser = async (id) => {
let result let result
try { try {
result = await fetch(`https://backend3.freesewing.org/users/${id}`) result = await fetch(`https://backend.freesewing.eu/users/${id}`)
} catch (err) { } catch (err) {
console.warn(`Failed to load user with id ${id}`, err) console.warn(`Failed to load user with id ${id}`, err)
} }

View file

@ -0,0 +1,27 @@
// Components
import DocusaurusLayout from '@theme/Layout'
import { DocusaurusPage } from '@freesewing/react/components/Docusaurus'
import { NoTitleLayout } from '@freesewing/react/components/Layout'
import { OauthCallback } from '@freesewing/react/components/SignIn'
/*
* This is the Github Oauth callback page.
* Each page MUST be wrapped in the DocusaurusPage component.
* You also MUST pass in the DocusaurusLayout compoment.
*/
export default function GithubOauthCallbackPage() {
return (
<DocusaurusPage
DocusaurusLayout={DocusaurusLayout}
Layout={NoTitleLayout}
title="Sign In"
description="Sign In to your FreeSewing account to unlock all features"
>
<div className="tw-flex tw-flex-col tw-items-center tw-text-base-content tw-px-4">
<div className="tw-max-w-lg tw-w-full">
<OauthCallback provider="github" />
</div>
</div>
</DocusaurusPage>
)
}

View file

@ -0,0 +1,27 @@
// Components
import DocusaurusLayout from '@theme/Layout'
import { DocusaurusPage } from '@freesewing/react/components/Docusaurus'
import { NoTitleLayout } from '@freesewing/react/components/Layout'
import { OauthCallback } from '@freesewing/react/components/SignIn'
/*
* This is the Google Oauth callback page.
* Each page MUST be wrapped in the DocusaurusPage component.
* You also MUST pass in the DocusaurusLayout compoment.
*/
export default function GoogleOauthCallbackPage() {
return (
<DocusaurusPage
DocusaurusLayout={DocusaurusLayout}
Layout={NoTitleLayout}
title="Sign In"
description="Sign In to your FreeSewing account to unlock all features"
>
<div className="tw-flex tw-flex-col tw-items-center tw-text-base-content tw-px-4">
<div className="tw-max-w-lg tw-w-full">
<OauthCallback provider="google" />
</div>
</div>
</DocusaurusPage>
)
}

View file

@ -0,0 +1,27 @@
// Components
import DocusaurusLayout from '@theme/Layout'
import { DocusaurusPage } from '@freesewing/react/components/Docusaurus'
import { NoTitleLayout } from '@freesewing/react/components/Layout'
import { OauthCallback } from '@freesewing/react/components/SignIn'
/*
* This is the Github Oauth callback page.
* Each page MUST be wrapped in the DocusaurusPage component.
* You also MUST pass in the DocusaurusLayout compoment.
*/
export default function GithubOauthCallbackPage() {
return (
<DocusaurusPage
DocusaurusLayout={DocusaurusLayout}
Layout={NoTitleLayout}
title="Sign In"
description="Sign In to your FreeSewing account to unlock all features"
>
<div className="tw-flex tw-flex-col tw-items-center tw-text-base-content tw-px-4">
<div className="tw-max-w-lg tw-w-full">
<OauthCallback provider="github" />
</div>
</div>
</DocusaurusPage>
)
}

View file

@ -0,0 +1,27 @@
// Components
import DocusaurusLayout from '@theme/Layout'
import { DocusaurusPage } from '@freesewing/react/components/Docusaurus'
import { NoTitleLayout } from '@freesewing/react/components/Layout'
import { OauthCallback } from '@freesewing/react/components/SignIn'
/*
* This is the Google Oauth callback page.
* Each page MUST be wrapped in the DocusaurusPage component.
* You also MUST pass in the DocusaurusLayout compoment.
*/
export default function GoogleOauthCallbackPage() {
return (
<DocusaurusPage
DocusaurusLayout={DocusaurusLayout}
Layout={NoTitleLayout}
title="Sign In"
description="Sign In to your FreeSewing account to unlock all features"
>
<div className="tw-flex tw-flex-col tw-items-center tw-text-base-content tw-px-4">
<div className="tw-max-w-lg tw-w-full">
<OauthCallback provider="google" />
</div>
</div>
</DocusaurusPage>
)
}