diff --git a/public/locales/en.json b/public/locales/en.json index 7f07275c54..6c43cc91c0 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -25,8 +25,10 @@ "notAuthorised": "Sorry! you are not Authorised!", "notFound": "User not found!", "successfullyRegistered": "Successfully Registered. Please wait until you will be approved.", - "login_to_admin_portal": "Admin Portal Login", - "OR": "OR" + "login_to_admin_portal": "Login", + "OR": "OR", + "admin": "ADMIN", + "user": "USER" }, "latestEvents": { "eventCardTitle": "Upcoming Events", diff --git a/public/locales/fr.json b/public/locales/fr.json index b626994c5c..910eae794c 100644 --- a/public/locales/fr.json +++ b/public/locales/fr.json @@ -25,8 +25,10 @@ "notAuthorised": "Désolé ! vous n'êtes pas autorisé !", "notFound": "Utilisateur introuvable !", "successfullyRegistered": "Enregistré avec succès. Veuillez patienter jusqu'à ce que vous soyez approuvé.", - "login_to_admin_portal": "Connexion à l'administration du portail", - "OR": "OU" + "login_to_admin_portal": "Connexion", + "OR": "OU", + "admin": "ADMIN", + "user": "UTILISATEUR" }, "latestEvents": { "eventCardTitle": "Événements à venir", diff --git a/public/locales/hi.json b/public/locales/hi.json index 5f272bad8f..1d96cf7b03 100644 --- a/public/locales/hi.json +++ b/public/locales/hi.json @@ -25,8 +25,10 @@ "notAuthorised": "क्षमा करें! आप अधिकृत नहीं हैं!", "notFound": "उपयोगकर्ता नहीं मिला!", "successfullyRegistered": "सफलतापूर्वक पंजीकृत। कृपया स्वीकृत होने तक प्रतीक्षा करें।", - "login_to_admin_portal": "एडमिन पोर्टल लॉगिन", - "OR": "या" + "login_to_admin_portal": "लॉगिन", + "OR": "या", + "admin": "व्यवस्थापक", + "user": "उपयोगकर्ता" }, "latestEvents": { "eventCardTitle": "आगामी घटनाएँ", diff --git a/public/locales/sp.json b/public/locales/sp.json index abf86c60dc..bd395acee7 100644 --- a/public/locales/sp.json +++ b/public/locales/sp.json @@ -25,8 +25,10 @@ "notAuthorised": "¡Lo siento! ¡No estás autorizado!", "notFound": "¡Usuario no encontrado!", "successfullyRegistered": "Registrado con éxito. Espere hasta que sea aprobado", - "login_to_admin_portal": "Inicio de sesión en el portal de administración", - "OR": "O" + "login_to_admin_portal": "Acceso", + "OR": "O", + "admin": "ADMINISTRACIÓN", + "user": "USUARIO" }, "latestEvents": { "eventCardTitle": "Próximos Eventos", diff --git a/public/locales/zh.json b/public/locales/zh.json index 30a048d1be..9cf360a0ec 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -25,8 +25,10 @@ "notAuthorised": "抱歉!你沒有被授權!", "notFound": "找不到用戶!", "successfullyRegistered": "註冊成功,請等待審核通過。", - "login_to_admin_portal": " 管理员门户登录 ", - "OR": "或者" + "login_to_admin_portal": "登錄", + "OR": "或者", + "admin": "行政", + "user": "用戶" }, "latestEvents": { "eventCardTitle": "即将举行的活动", diff --git a/src/components/UserPortal/Login/Login.tsx b/src/components/UserPortal/Login/Login.tsx index 326d416c06..81c98d3e5f 100644 --- a/src/components/UserPortal/Login/Login.tsx +++ b/src/components/UserPortal/Login/Login.tsx @@ -52,10 +52,10 @@ export default function login(props: InterfaceLoginProps): JSX.Element { /* istanbul ignore next */ window.location.assign('/user/organizations'); } else { + /* istanbul ignore next */ toast.warn(t('notAuthorised')); } } catch (error: any) { - /* istanbul ignore next */ errorHandler(t, error); } } @@ -84,7 +84,6 @@ export default function login(props: InterfaceLoginProps): JSX.Element { return ( <>

{t('login')}

-
{t('loginIntoYourAccount')}
{t('emailAddress')}
diff --git a/src/screens/LoginPage/LoginPage.module.css b/src/screens/LoginPage/LoginPage.module.css index 02cd04032a..64644622c0 100644 --- a/src/screens/LoginPage/LoginPage.module.css +++ b/src/screens/LoginPage/LoginPage.module.css @@ -58,6 +58,31 @@ color: var(--bs-secondary); } +.navLinkClass { + display: inline-block; + padding: 0.375rem 0.75rem; + font-size: 1rem; + line-height: 1.5; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #212529; + border-radius: 0.25rem; + width: 100%; + box-sizing: border-box; + font-weight: 500; + transition: font-weight 0.3s ease; +} + +.navLinkClass:hover { + font-weight: 700; +} + +.activeLink { + border-bottom: 3px solid; + width: 100%; +} + @media (max-width: 992px) { .row .left_portion { padding: 0 2rem; diff --git a/src/screens/LoginPage/LoginPage.test.tsx b/src/screens/LoginPage/LoginPage.test.tsx index fadf0b7352..4f07cda565 100644 --- a/src/screens/LoginPage/LoginPage.test.tsx +++ b/src/screens/LoginPage/LoginPage.test.tsx @@ -166,7 +166,6 @@ describe('Testing Login Page Screen', () => { await wait(); - expect(screen.getByText(/Admin Portal/i)).toBeInTheDocument(); expect(window.location).toBeAt('/orglist'); }); diff --git a/src/screens/LoginPage/LoginPage.tsx b/src/screens/LoginPage/LoginPage.tsx index 44afdbacb9..b4f34bcf12 100644 --- a/src/screens/LoginPage/LoginPage.tsx +++ b/src/screens/LoginPage/LoginPage.tsx @@ -7,7 +7,7 @@ import Col from 'react-bootstrap/Col'; import Row from 'react-bootstrap/Row'; import ReCAPTCHA from 'react-google-recaptcha'; import { useTranslation } from 'react-i18next'; -import { Link, useHistory } from 'react-router-dom'; +import { Link, NavLink, useHistory } from 'react-router-dom'; import { toast } from 'react-toastify'; import { @@ -299,6 +299,29 @@ function loginPage(): JSX.Element { showTab === 'REGISTER' && styles.marginTopForReg }`} /> + + + + + {t('admin')} + + + + + {t('user')} + + + {/* LOGIN FORM */}
+ + + + {t('admin')} + + + + + {t('user')} + + + { /* istanbul ignore next */ currentMode === 'login' ? (