+ {body.length > 3 ? (
+
+ ) : (
+
+ )}
+ Post body:
+ {body.length > 3 ? (
+ {body.slice(0, 30) + '...'}
+ ) : (
+ Please provide a post body
+ )}
+
}
>
The actual post body. Supports Markdown.
diff --git a/sites/org/pages/account/index.mjs b/sites/org/pages/account/index.mjs
index 294f3a1b973..5634f609957 100644
--- a/sites/org/pages/account/index.mjs
+++ b/sites/org/pages/account/index.mjs
@@ -1,6 +1,8 @@
// Dependencies
import dynamic from 'next/dynamic'
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 { ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
@@ -22,13 +24,17 @@ const DynamicAccountOverview = dynamic(
{ ssr: false }
)
-const AccountIndexPage = ({ page }) => (
-
-
-
-
-
-)
+const AccountIndexPage = ({ page }) => {
+ const { t } = useTranslation(ns)
+
+ return (
+
+
+
+
+
+ )
+}
export default AccountIndexPage
diff --git a/sites/shared/components/account/en.yaml b/sites/shared/components/account/en.yaml
index 20d7d886303..c158265df9b 100644
--- a/sites/shared/components/account/en.yaml
+++ b/sites/shared/components/account/en.yaml
@@ -20,7 +20,6 @@ signOut: Sign Out
politeOhCrap: Oh fiddlesticks
bio: Bio
email: E-mail Address
-github: Github Username
img: Profile image
username: Username
compare: Metricset Comparison
@@ -128,7 +127,12 @@ emailChangeConfirmation: We have sent an E-mail to your new address to confirm t
vagueError: Something went wrong, and we're not certain how to handle it. Please try again, or involve a human being for assistance.
# github
-githubTitle: Enter your github username here to receive updates when you report a problem through this website.
+githubTitle: Link your GitHub identity
+githubWhy1: Enter your GitHub username and email here and we will use them when interacting with GitHub on your behalf.
+githubWhy2: Note that both your GitHub username and email is public info. This merely allows us to make a link between your FreeSewing account and GitHub account.
+githubWhy3 : For example, when you report a problem on this website, we can mention you so you will receive notifications when there is an update. For this, your username is sufficient.
+githubWhy4: When you submit a showcase post or make changed to our content, we can credit those commits to you if we have both your username and the email address you use on GitHub.
+tooComplex: If all of this in confusing, you don't have to provide this info. It's an advanced feature.
# languge
languageTitle: Which language do you prefer?
diff --git a/sites/shared/components/account/github.mjs b/sites/shared/components/account/github.mjs
index 6cf0c764d16..c57360a77e9 100644
--- a/sites/shared/components/account/github.mjs
+++ b/sites/shared/components/account/github.mjs
@@ -10,6 +10,7 @@ import { LoadingContext } from 'shared/context/loading-context.mjs'
// Components
import { BackToAccountButton } from './shared.mjs'
import { SaveSettingsButton } from 'shared/components/buttons/save-settings-button.mjs'
+import { Popout } from 'shared/components/popout/index.mjs'
export const ns = ['account', 'toast']
@@ -24,12 +25,13 @@ export const GithubSettings = ({ title = false, welcome = false }) => {
const toast = useToast()
// State
- const [github, setGithub] = useState(account.github || '')
+ const [githubUsername, setGithubUsername] = useState(account.data.githubUsername || '')
+ const [githubEmail, setGithubEmail] = useState(account.data.githubEmail || '')
// Helper method to save changes
const save = async () => {
startLoading()
- const result = await backend.updateAccount({ github })
+ const result = await backend.updateAccount({ data: { githubUsername, githubEmail } })
if (result.success) {
setAccount(result.data.account)
toast.for.settingsSaved()
@@ -40,17 +42,35 @@ export const GithubSettings = ({ title = false, welcome = false }) => {
return (