{options?.welcomeMessageBody || ( - - ZeroTier VPN is your key to boundless connectivity and ultimate privacy. - Experience a secure and borderless digital world, free from limitations. - Empower yourself with unmatched performance, while safeguarding your - data. - + {t("authPages.welcomeMessage.slogan")} )}
diff --git a/src/locales/en/common.json b/src/locales/en/common.json index cf9c9b4f..6f112b28 100644 --- a/src/locales/en/common.json +++ b/src/locales/en/common.json @@ -135,6 +135,57 @@ "user-settings": "User Settings", "logout": "Logout" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN lets you connect your devices securely and privately across the internet, no matter where you are. Enjoy fast and reliable connections without the usual barriers, keeping your data safe and accessible." + }, + "form": { + "name": "Name", + "namePlaceholder": "Enter your name", + "email": "Email", + "emailPlaceholder": "mail@example.com", + "password": "Password", + "passwordPlaceholder": "Enter your password", + "forgotPassword": "Forgot your password?", + "verify2FA": "Verify 2FA", + "enter2FAcode": "Enter 2FA Code", + "signIn": "Sign in", + "signInWith": "Sign in with {provider}", + "signUp": "Sign up", + "invitationCode": "Invitation code", + "invitationCodePlaceholder": "Enter your invitation code", + "sendMail": "Send Mail", + "mfaRecoveryCode": "Recovery Code", + "mfaRecoveryCodePlaceholder": "Enter your recovery code" + }, + "signin": { + "signInToAccount": "Sign in to your account", + "or": "OR", + "dontHaveAccount": "Don't have an account?", + "getStarted": "Get Started!", + "havingIssues": "Having issues?" + }, + "signup": { + "signUpWithCredentials": "Create an account", + "haveAnAccount": "Have an account?", + "login": "Login!" + }, + "forgot": { + "forgotPasswordTitle": "Forgot Password", + "forgotPasswordMessage": "We will send you a reset link if the account exists", + "backToLogin": "Back to Login" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "2FA Recovery", + "mfaRecoveryMessage": "We will send you instructions on how to recover your account", + "backToLogin": "Back to Login" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "2FA Recovery", + "mfaRecoveryResetMessage": "Please enter your credentials and Recovery Code", + "backToLogin": "Back to Login" + } + }, "networks": { "loading": "Loading", "title": "Networks", diff --git a/src/locales/es/common.json b/src/locales/es/common.json index 48e592b3..7cfc840c 100644 --- a/src/locales/es/common.json +++ b/src/locales/es/common.json @@ -135,6 +135,57 @@ "user-settings": "Ajustes de usuario", "logout": "Cerrar sesión" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN te permite conectar tus dispositivos de manera segura y privada a través de internet, sin importar dónde estés. Disfruta de conexiones rápidas y fiables sin las barreras habituales, manteniendo tus datos seguros y accesibles." + }, + "form": { + "name": "Nombre", + "namePlaceholder": "Introduce tu nombre", + "email": "Correo electrónico", + "emailPlaceholder": "correo@ejemplo.com", + "password": "Contraseña", + "passwordPlaceholder": "Introduce tu contraseña", + "forgotPassword": "¿Olvidaste tu contraseña?", + "verify2FA": "Verificar 2FA", + "enter2FAcode": "Introduce el código 2FA", + "signIn": "Iniciar sesión", + "signInWith": "Inicia sesión con {provider}", + "signUp": "Regístrate", + "invitationCode": "Código de invitación", + "invitationCodePlaceholder": "Introduce tu código de invitación", + "sendMail": "Enviar correo", + "mfaRecoveryCode": "Código de recuperación", + "mfaRecoveryCodePlaceholder": "Introduce tu código de recuperación" + }, + "signin": { + "signInToAccount": "Inicia sesión en tu cuenta", + "or": "O", + "dontHaveAccount": "¿No tienes una cuenta?", + "getStarted": "¡Comienza ahora!", + "havingIssues": "¿Tienes problemas?" + }, + "signup": { + "signUpWithCredentials": "Crea una cuenta", + "haveAnAccount": "¿Tienes una cuenta?", + "login": "¡Inicia sesión!" + }, + "forgot": { + "forgotPasswordTitle": "¿Olvidaste tu contraseña?", + "forgotPasswordMessage": "Te enviaremos un enlace de restablecimiento si la cuenta existe", + "backToLogin": "Volver al inicio de sesión" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "Recuperación de 2FA", + "mfaRecoveryMessage": "Te enviaremos instrucciones sobre cómo recuperar tu cuenta", + "backToLogin": "Volver al inicio de sesión" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "Recuperación de 2FA", + "mfaRecoveryResetMessage": "Por favor, introduce tus credenciales y el código de recuperación", + "backToLogin": "Volver al inicio de sesión" + } + }, "networks": { "loading": "Cargando", "title": "Redes", diff --git a/src/locales/fr/common.json b/src/locales/fr/common.json index b74afafe..fe2b3629 100644 --- a/src/locales/fr/common.json +++ b/src/locales/fr/common.json @@ -135,6 +135,57 @@ "user-settings": "Mes réglages", "logout": "Se déconnecter" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN vous permet de connecter vos appareils de manière sécurisée et privée sur Internet, où que vous soyez. Profitez de connexions rapides et fiables sans les barrières habituelles, tout en gardant vos données en sécurité et accessibles." + }, + "form": { + "name": "Nom", + "namePlaceholder": "Entrez votre nom", + "email": "E-mail", + "emailPlaceholder": "mail@exemple.com", + "password": "Mot de passe", + "passwordPlaceholder": "Entrez votre mot de passe", + "forgotPassword": "Mot de passe oublié ?", + "verify2FA": "Vérifier 2FA", + "enter2FAcode": "Entrez le code 2FA", + "signIn": "Se connecter", + "signInWith": "Se connecter avec {provider}", + "signUp": "S'inscrire", + "invitationCode": "Code d'invitation", + "invitationCodePlaceholder": "Entrez votre code d'invitation", + "sendMail": "Envoyer le mail", + "mfaRecoveryCode": "Code de récupération", + "mfaRecoveryCodePlaceholder": "Entrez votre code de récupération" + }, + "signin": { + "signInToAccount": "Connectez-vous à votre compte", + "or": "OU", + "dontHaveAccount": "Vous n'avez pas de compte?", + "getStarted": "Commencez!", + "havingIssues": "Vous avez des problèmes?" + }, + "signup": { + "signUpWithCredentials": "Créer un compte", + "haveAnAccount": "Vous avez un compte?", + "login": "Connectez-vous!" + }, + "forgot": { + "forgotPasswordTitle": "Mot de passe oublié", + "forgotPasswordMessage": "Nous vous enverrons un lien de réinitialisation si le compte existe", + "backToLogin": "Retour à la connexion" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "Récupération 2FA", + "mfaRecoveryMessage": "Nous vous enverrons des instructions pour récupérer votre compte", + "backToLogin": "Retour à la connexion" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "Récupération 2FA", + "mfaRecoveryResetMessage": "Veuillez entrer vos identifiants et le code de récupération", + "backToLogin": "Retour à la connexion" + } + }, "networks": { "loading": "Chargement", "title": "Réseaux", diff --git a/src/locales/no/common.json b/src/locales/no/common.json index c5e2e2b0..2208dcbc 100644 --- a/src/locales/no/common.json +++ b/src/locales/no/common.json @@ -135,6 +135,57 @@ "user-settings": "Brukerinnstillinger", "logout": "Logg ut" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN lar deg koble til enhetene dine sikkert og privat over internett, uansett hvor du er. Nyt raske og pålitelige tilkoblinger uten de vanlige barrierene, samtidig som dine data forblir trygge og tilgjengelige." + }, + "form": { + "name": "Navn", + "namePlaceholder": "Skriv inn navnet ditt", + "email": "E-post", + "emailPlaceholder": "mail@eksempel.com", + "password": "Passord", + "passwordPlaceholder": "Skriv inn passordet ditt", + "forgotPassword": "Glemt passordet ditt?", + "verify2FA": "Bekreft 2FA", + "enter2FAcode": "Skriv inn 2FA-koden", + "signIn": "Logg inn", + "signInWith": "Logg inn med {provider}", + "signUp": "Opprett konto", + "invitationCode": "Invitasjonskode", + "invitationCodePlaceholder": "Skriv inn invitasjonskoden din", + "sendMail": "Send e-post", + "mfaRecoveryCode": "Gjenopprettingskode", + "mfaRecoveryCodePlaceholder": "Skriv inn gjenopprettingskoden din" + }, + "signin": { + "signInToAccount": "Logg inn på kontoen din", + "or": "ELLER", + "dontHaveAccount": "Har du ikke en konto?", + "getStarted": "Kom i gang!", + "havingIssues": "Har du problemer?" + }, + "signup": { + "signUpWithCredentials": "Opprett en brukerkonto", + "haveAnAccount": "Har du en konto?", + "login": "Logg inn!" + }, + "forgot": { + "forgotPasswordTitle": "Glemt passord", + "forgotPasswordMessage": "Vi sender deg en tilbakestillingslenke hvis kontoen eksisterer", + "backToLogin": "Tilbake til innlogging" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "Gjenoppretting av 2FA", + "mfaRecoveryMessage": "Vi vil sende deg instruksjoner om hvordan du gjenoppretter kontoen din", + "backToLogin": "Tilbake til innlogging" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "Gjenoppretting av 2FA", + "mfaRecoveryResetMessage": "Vennligst skriv inn dine legitimasjonsbeskrivelser og gjenopprettingskode", + "backToLogin": "Tilbake til innlogging" + } + }, "networks": { "loading": "Laster", "title": "Nettverk", diff --git a/src/locales/pl/common.json b/src/locales/pl/common.json index 772e64c1..cd71e665 100644 --- a/src/locales/pl/common.json +++ b/src/locales/pl/common.json @@ -135,6 +135,57 @@ "user-settings": "Ustawienia konta", "logout": "Wyloguj" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN umożliwia bezpieczne i prywatne połączenie urządzeń przez internet, bez względu na to, gdzie się znajdujesz. Ciesz się szybkimi i niezawodnymi połączeniami bez zwykłych barier, zachowując bezpieczeństwo i dostępność danych." + }, + "form": { + "name": "Imię", + "namePlaceholder": "Wpisz swoje imię", + "email": "Email", + "emailPlaceholder": "mail@przyklad.com", + "password": "Hasło", + "passwordPlaceholder": "Wpisz swoje hasło", + "forgotPassword": "Zapomniałeś hasła?", + "verify2FA": "Zweryfikuj 2FA", + "enter2FAcode": "Wpisz kod 2FA", + "signIn": "Zaloguj się", + "signInWith": "Zaloguj się za pomocą {provider}", + "signUp": "Zarejestruj się", + "invitationCode": "Kod zaproszenia", + "invitationCodePlaceholder": "Wpisz swój kod zaproszenia", + "sendMail": "Wyślij maila", + "mfaRecoveryCode": "Kod odzyskiwania", + "mfaRecoveryCodePlaceholder": "Wpisz swój kod odzyskiwania" + }, + "signin": { + "signInToAccount": "Zaloguj się do swojego konta", + "or": "LUB", + "dontHaveAccount": "Nie masz konta?", + "getStarted": "Zacznij teraz!", + "havingIssues": "Masz problemy?" + }, + "signup": { + "signUpWithCredentials": "Utwórz konto", + "haveAnAccount": "Masz konto?", + "login": "Zaloguj się!" + }, + "forgot": { + "forgotPasswordTitle": "Zapomniałeś hasła", + "forgotPasswordMessage": "Wyślemy Ci link do resetowania, jeśli konto istnieje", + "backToLogin": "Powrót do logowania" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "Odzyskiwanie 2FA", + "mfaRecoveryMessage": "Wyślemy Ci instrukcje, jak odzyskać swoje konto", + "backToLogin": "Powrót do logowania" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "Odzyskiwanie 2FA", + "mfaRecoveryResetMessage": "Wprowadź swoje dane uwierzytelniające i kod odzyskiwania", + "backToLogin": "Powrót do logowania" + } + }, "networks": { "loading": "Ładowanie", "title": "Sieci", diff --git a/src/locales/zh-tw/common.json b/src/locales/zh-tw/common.json index 21699ff3..09d0164c 100644 --- a/src/locales/zh-tw/common.json +++ b/src/locales/zh-tw/common.json @@ -135,6 +135,57 @@ "user-settings": "使用者設定", "logout": "登出" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN 讓您無論身在何處,都能安全私密地連接設備。享受快速可靠的連接,無需面對常見障礙,同時確保您的數據安全和可訪問。" + }, + "form": { + "name": "姓名", + "namePlaceholder": "輸入您的姓名", + "email": "電子郵件", + "emailPlaceholder": "mail@example.com", + "password": "密碼", + "passwordPlaceholder": "輸入您的密碼", + "forgotPassword": "忘記密碼?", + "verify2FA": "驗證 2FA", + "enter2FAcode": "輸入2FA代碼", + "signIn": "登入", + "signInWith": "使用 {provider} 登入", + "signUp": "註冊", + "invitationCode": "邀請碼", + "invitationCodePlaceholder": "輸入您的邀請碼", + "sendMail": "發送郵件", + "mfaRecoveryCode": "恢復代碼", + "mfaRecoveryCodePlaceholder": "輸入您的恢復代碼" + }, + "signin": { + "signInToAccount": "登入您的帳戶", + "or": "或", + "dontHaveAccount": "沒有帳戶?", + "getStarted": "立即開始!", + "havingIssues": "有問題嗎?" + }, + "signup": { + "signUpWithCredentials": "創建帳戶", + "haveAnAccount": "有帳戶?", + "login": "登入!" + }, + "forgot": { + "forgotPasswordTitle": "忘記密碼", + "forgotPasswordMessage": "如果帳戶存在,我們會向您發送重置鏈接", + "backToLogin": "返回登錄" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "2FA恢復", + "mfaRecoveryMessage": "我們將向您發送有關如何恢復您的帳戶的說明", + "backToLogin": "返回登錄" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "2FA恢復", + "mfaRecoveryResetMessage": "請輸入您的憑證和恢復代碼", + "backToLogin": "返回登錄" + } + }, "networks": { "loading": "載入中", "title": "網路", diff --git a/src/locales/zh/common.json b/src/locales/zh/common.json index f6dfec9e..371a797b 100644 --- a/src/locales/zh/common.json +++ b/src/locales/zh/common.json @@ -135,6 +135,57 @@ "user-settings": "用户设置", "logout": "登出" }, + "authPages": { + "welcomeMessage": { + "slogan": "ZeroTier VPN 让您无论身在何处,都能安全私密地连接设备。享受快速可靠的连接,无需面对常见障碍,同时确保您的数据安全和可访问。" + }, + "form": { + "name": "姓名", + "namePlaceholder": "输入您的姓名", + "email": "电子邮件", + "emailPlaceholder": "mail@example.com", + "password": "密码", + "passwordPlaceholder": "输入您的密码", + "forgotPassword": "忘记密码?", + "verify2FA": "验证 2FA", + "enter2FAcode": "输入2FA代码", + "signIn": "登录", + "signInWith": "使用 {provider} 登录", + "signUp": "注册", + "invitationCode": "邀请码", + "invitationCodePlaceholder": "输入您的邀请码", + "sendMail": "发送邮件", + "mfaRecoveryCode": "恢复代码", + "mfaRecoveryCodePlaceholder": "输入您的恢复代码" + }, + "signin": { + "signInToAccount": "登录您的账户", + "or": "或", + "dontHaveAccount": "没有账户?", + "getStarted": "立即开始!", + "havingIssues": "遇到问题?" + }, + "signup": { + "signUpWithCredentials": "创建账户", + "haveAnAccount": "有账户?", + "login": "登录!" + }, + "forgot": { + "forgotPasswordTitle": "忘记密码", + "forgotPasswordMessage": "如果账户存在,我们将向您发送重置链接", + "backToLogin": "返回登录" + }, + "mfaRecovery": { + "mfaRecoveryTitle": "2FA恢复", + "mfaRecoveryMessage": "我们将向您发送恢复帐户的说明", + "backToLogin": "返回登录" + }, + "mfaRecoveryReset": { + "mfaRecoveryResetTitle": "2FA恢复", + "mfaRecoveryResetMessage": "请输入您的凭据和恢复代码", + "backToLogin": "返回登录" + } + }, "networks": { "loading": "加载中", "title": "网络", diff --git a/src/middleware.ts b/src/middleware.ts index adee9bdd..d97f8c12 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -8,7 +8,8 @@ export const config = { "/organization/:path*", "/network/:path*", "/central/:path*", - "/user-settings/:path*", // user are redirected to dashboard + "/user-settings/:path*", + "/auth/:path*", "/admin/:path*", ], }; diff --git a/src/pages/auth/forgotPassword/index.tsx b/src/pages/auth/forgotPassword/index.tsx index b7da2311..0f73f483 100644 --- a/src/pages/auth/forgotPassword/index.tsx +++ b/src/pages/auth/forgotPassword/index.tsx @@ -1,6 +1,7 @@ import { GetServerSideProps, GetServerSidePropsContext } from "next"; import { Session } from "next-auth"; import { getSession } from "next-auth/react"; +import { useTranslations } from "next-intl"; import Head from "next/head"; import Link from "next/link"; import React, { ReactElement } from "react"; @@ -9,6 +10,7 @@ import { LayoutPublic } from "~/components/layouts/layout"; import { globalSiteTitle } from "~/utils/global"; const ForgotPassword = () => { + const t = useTranslations(); const title = `${globalSiteTitle} - Forgot Password`; return (- We will send you a reset link if the account exist -
+{t("authPages.forgot.forgotPasswordMessage")}
Don't have an account?
+{t("authPages.signin.dontHaveAccount")}
- Get Started! + {t("authPages.signin.getStarted")}- We will send you instructions on how to recover your account + {t("authPages.mfaRecovery.mfaRecoveryMessage")}
- Please enter your credentials and Recovery Code + {t("authPages.mfaRecoveryReset.mfaRecoveryResetMessage")}
Have an account?
+{t("authPages.signup.haveAnAccount")}
- Login! + {t("authPages.signup.login")}