From 8b215340e5d0b8245928a3b9f9c73dd9f0c504ca Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Tue, 9 Nov 2021 10:03:19 +1000 Subject: [PATCH] Setup page converted to chakra Fixed locale js error Setup and login forms consistent --- frontend/src/components/Footer.tsx | 12 +- frontend/src/components/LocalePicker.tsx | 4 +- frontend/src/locale/src/en.json | 3 - frontend/src/locale/src/fa.json | 3 - frontend/src/pages/Login/index.tsx | 17 +- frontend/src/pages/Setup/index.tsx | 272 ++++++++++++----------- 6 files changed, 154 insertions(+), 157 deletions(-) diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 5ef645c1..e949512a 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -59,17 +59,7 @@ function Footer() { defaultMessage: "Copyright © {year} jc21.com", }, { year: new Date().getFullYear() }, - )}{" "} - - {intl.formatMessage({ - id: "footer.theme", - defaultMessage: "Theme by Tabler", - })} - + )}
  • = ({ }) => { const { locale, setLocale } = useLocaleState(); + // first item of each array should be the language code, + // not the country code const options = [ - ["us", "en-US"], + ["en", "en-US"], ["de", "de-DE"], ["fa", "fa-IR"], ]; diff --git a/frontend/src/locale/src/en.json b/frontend/src/locale/src/en.json index 5f4a478e..15348e72 100644 --- a/frontend/src/locale/src/en.json +++ b/frontend/src/locale/src/en.json @@ -41,9 +41,6 @@ "footer.github": { "defaultMessage": "Github" }, - "footer.theme": { - "defaultMessage": "Theme by Tabler" - }, "footer.userguide": { "defaultMessage": "User Guide" }, diff --git a/frontend/src/locale/src/fa.json b/frontend/src/locale/src/fa.json index f912b8d8..5b156283 100644 --- a/frontend/src/locale/src/fa.json +++ b/frontend/src/locale/src/fa.json @@ -26,9 +26,6 @@ "footer.copyright": { "defaultMessage": "حق چاپ © حق چاپ © {year} jc21.com" }, - "footer.theme": { - "defaultMessage": "قالب توسط Tabler" - }, "footer.userguide": { "defaultMessage": "راهنمای کاربر" }, diff --git a/frontend/src/pages/Login/index.tsx b/frontend/src/pages/Login/index.tsx index ec17b1fa..9e8a442c 100644 --- a/frontend/src/pages/Login/index.tsx +++ b/frontend/src/pages/Login/index.tsx @@ -126,15 +126,24 @@ function Login() { - Forgot password? + + {intl.formatMessage({ + id: "login.forgot", + defaultMessage: "Forgot password?", + })} + - - - - - + + + + + + + + ); }