diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index f81f8cb9ce..10164461aa 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -63,7 +63,6 @@ jobs: Graphql-Inspector: name: Runs Introspection on the github talawa-api repo on the schema.graphql file runs-on: ubuntu-latest - steps: - name: Checkout the Repository uses: actions/checkout@v3 @@ -76,9 +75,8 @@ jobs: - name: resolve dependency run: npm install -g @graphql-inspector/cli - - - name: Validate Documents - run: graphql-inspector validate './src/GraphQl/**/*.ts' github:PalisadoesFoundation/talawa-api#develop:schema.graphql --token '${{secrets.REPO_READ_ONLY}}' + - name: Clone API repository + run: git clone https://github.com/PalisadoesFoundation/talawa-api && ls -a - - + - name: Validate Documents + run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql' \ No newline at end of file diff --git a/public/locales/en.json b/public/locales/en.json index 8e61c0e64b..4c57eb9b41 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -24,7 +24,9 @@ "fillCorrectly": "Fill all the Details Correctly.", "notAuthorised": "Sorry! you are not Authorised!", "notFound": "User not found!", - "successfullyRegistered": "Successfully Registered. Please wait until you will be approved." + "successfullyRegistered": "Successfully Registered. Please wait until you will be approved.", + "login_to_admin_portal": "Admin Portal Login", + "OR": "OR" }, "listNavbar": { "talawa_portal": "Talawa Admin Portal", diff --git a/public/locales/fr.json b/public/locales/fr.json index 48d7172a9e..0e4c7589ca 100644 --- a/public/locales/fr.json +++ b/public/locales/fr.json @@ -24,7 +24,9 @@ "fillCorrectly": "Remplissez tous les détails correctement.", "notAuthorised": "Désolé ! vous n'êtes pas autorisé !", "notFound": "Utilisateur introuvable !", - "successfullyRegistered": "Enregistré avec succès. Veuillez patienter jusqu'à ce que vous soyez approuvé." + "successfullyRegistered": "Enregistré avec succès. Veuillez patienter jusqu'à ce que vous soyez approuvé.", + "login_to_admin_portal": "Connexion à l'administration du portail", + "OR": "OU" }, "listNavbar": { "talawa_portal": "Portail D'Administrateur Talawa", diff --git a/public/locales/hi.json b/public/locales/hi.json index e69cb4ca31..33c3c54522 100644 --- a/public/locales/hi.json +++ b/public/locales/hi.json @@ -24,7 +24,9 @@ "fillCorrectly": "सभी विवरण सही ढंग से भरें।", "notAuthorised": "क्षमा करें! आप अधिकृत नहीं हैं!", "notFound": "उपयोगकर्ता नहीं मिला!", - "successfullyRegistered": "सफलतापूर्वक पंजीकृत। कृपया स्वीकृत होने तक प्रतीक्षा करें।" + "successfullyRegistered": "सफलतापूर्वक पंजीकृत। कृपया स्वीकृत होने तक प्रतीक्षा करें।", + "login_to_admin_portal": "एडमिन पोर्टल लॉगिन", + "OR": "या" }, "listNavbar": { "talawa_portal": "तलावा प्रशासन पोर्टल", diff --git a/public/locales/sp.json b/public/locales/sp.json index 3d68c30f64..eaa5715d5a 100644 --- a/public/locales/sp.json +++ b/public/locales/sp.json @@ -24,7 +24,9 @@ "fillCorrectly": "Complete todos los detalles correctamente.", "notAuthorised": "¡Lo siento! ¡No estás autorizado!", "notFound": "¡Usuario no encontrado!", - "successfullyRegistered": "Registrado con éxito. Espere hasta que sea aprobado" + "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" }, "listNavbar": { "talawa_portal": "Portal De Administración Talawa", diff --git a/public/locales/zh.json b/public/locales/zh.json index 41c0a08156..d863f784e8 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -24,7 +24,9 @@ "fillCorrectly": "正確填寫所有細節。", "notAuthorised": "抱歉!你沒有被授權!", "notFound": "找不到用戶!", - "successfullyRegistered": "註冊成功,請等待審核通過。" + "successfullyRegistered": "註冊成功,請等待審核通過。", + "login_to_admin_portal": " 管理员门户登录 ", + "OR": "或者" }, "listNavbar": { "talawa_portal": "塔拉瓦管理門戶", diff --git a/src/App.module.css b/src/App.module.css deleted file mode 100644 index 8bbcc2f0d8..0000000000 --- a/src/App.module.css +++ /dev/null @@ -1,47 +0,0 @@ -.loader, -.loader:after { - border-radius: 50%; - width: 10em; - height: 10em; -} - -.loader { - margin: 60px auto; - margin-top: 35vh !important; - font-size: 10px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #febc59; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; -} - -@-webkit-keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes load8 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} diff --git a/src/App.test.tsx b/src/App.test.tsx index 1b88c4e2d7..710c970628 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -5,7 +5,6 @@ import { MockedProvider } from '@apollo/react-testing'; import { BrowserRouter } from 'react-router-dom'; import { I18nextProvider } from 'react-i18next'; import 'jest-location-mock'; - import App from './App'; import { store } from 'state/store'; import { CHECK_AUTH } from 'GraphQl/Queries/Queries'; diff --git a/src/App.tsx b/src/App.tsx index 0d125fe546..66df35236a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,8 +2,6 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; import { useQuery } from '@apollo/client'; import * as installedPlugins from 'components/plugins/index'; -// import './App.css'; -import styles from './App.module.css'; import { CHECK_AUTH } from 'GraphQl/Queries/Queries'; import SecuredRoute from 'components/SecuredRoute/SecuredRoute'; import SecuredRouteForUser from 'components/UserPortal/SecuredRouteForUser/SecuredRouteForUser'; @@ -22,6 +20,7 @@ import Roles from 'screens/Roles/Roles'; import Requests from 'screens/Requests/Requests'; import BlockUser from 'screens/BlockUser/BlockUser'; import MemberDetail from 'screens/MemberDetail/MemberDetail'; +import Loader from 'components/Loader/Loader'; // User Portal Components import UserLoginPage from 'screens/UserPortal/UserLoginPage/UserLoginPage'; @@ -69,7 +68,7 @@ function app(): JSX.Element { ); if (loading) { - return
; + return ; } if (data) { diff --git a/src/GraphQl/Mutations/mutations.ts b/src/GraphQl/Mutations/mutations.ts index 0ecf0f432b..51d6d6e8d2 100644 --- a/src/GraphQl/Mutations/mutations.ts +++ b/src/GraphQl/Mutations/mutations.ts @@ -352,7 +352,7 @@ export const REJECT_ADMIN_MUTATION = gql` */ export const UPDATE_INSTALL_STATUS_PLUGIN_MUTATION = gql` mutation update_install_status_plugin_mutation($id: ID!, $status: Boolean!) { - updateTempPluginStatus(id: $id, status: $status) { + updatePluginStatus(id: $id, status: $status) { _id pluginName pluginCreatedBy @@ -368,7 +368,7 @@ export const UPDATE_INSTALL_STATUS_PLUGIN_MUTATION = gql` */ export const UPDATE_ORG_STATUS_PLUGIN_MUTATION = gql` mutation update_install_status_plugin_mutation($id: ID!, $orgId: ID!) { - updateTempPluginInstalledOrgs(id: $id, orgId: $orgId) { + updatePluginInstalledOrgs(id: $id, orgId: $orgId) { _id pluginName pluginCreatedBy diff --git a/src/assets/css/app.css b/src/assets/css/app.css index 2e26c8fbd7..288b220848 100644 --- a/src/assets/css/app.css +++ b/src/assets/css/app.css @@ -99,11 +99,11 @@ --bs-tertiary-bg: #f8f9fa; --bs-tertiary-bg-rgb: 248, 249, 250; --bs-heading-color: inherit; - --bs-link-color: #31bb6b; - --bs-link-color-rgb: 49, 187, 107; - --bs-link-decoration: underline; - --bs-link-hover-color: #279656; - --bs-link-hover-color-rgb: 39, 150, 86; + --bs-link-color: #0d6efd; + --bs-link-color-rgb: 13, 110, 253; + --bs-link-decoration: none; + --bs-link-hover-color: #0a58ca; + --bs-link-hover-color-rgb: 10, 88, 202; --bs-code-color: #d63384; --bs-highlight-bg: #fff3cd; --bs-border-width: 1px; @@ -373,7 +373,7 @@ sup { a { color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1)); - text-decoration: underline; + text-decoration: none; } a:hover { --bs-link-color-rgb: var(--bs-link-hover-color-rgb); @@ -2143,22 +2143,22 @@ progress { } .col-form-label { - padding-top: calc(0.375rem + var(--bs-border-width)); - padding-bottom: calc(0.375rem + var(--bs-border-width)); + padding-top: 0.7rem; + padding-bottom: 0.7rem; margin-bottom: 0; font-size: inherit; line-height: 1.5; } .col-form-label-lg { - padding-top: calc(0.5rem + var(--bs-border-width)); - padding-bottom: calc(0.5rem + var(--bs-border-width)); + padding-top: 0.5rem; + padding-bottom: 0.5rem; font-size: 1.25rem; } .col-form-label-sm { - padding-top: calc(0.25rem + var(--bs-border-width)); - padding-bottom: calc(0.25rem + var(--bs-border-width)); + padding-top: 0.25rem; + padding-bottom: 0.25rem; font-size: 0.875rem; } @@ -2171,14 +2171,14 @@ progress { .form-control { display: block; width: 100%; - padding: 0.375rem 0.75rem; + padding: 0.7rem 1rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: var(--bs-body-color); - background-color: var(--bs-body-bg); + background-color: #f2f2f2; background-clip: padding-box; - border: var(--bs-border-width) solid var(--bs-border-color); + border: 0 solid var(--bs-border-color); appearance: none; border-radius: var(--bs-border-radius); transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -2196,7 +2196,7 @@ progress { } .form-control:focus { color: var(--bs-body-color); - background-color: var(--bs-body-bg); + background-color: #f2f2f2; border-color: #98ddb5; outline: 0; box-shadow: 0 0 0 0.25rem rgba(49, 187, 107, 0.25); @@ -2219,16 +2219,16 @@ progress { opacity: 1; } .form-control::file-selector-button { - padding: 0.375rem 0.75rem; - margin: -0.375rem -0.75rem; - margin-inline-end: 0.75rem; + padding: 0.7rem 1rem; + margin: -0.7rem -1rem; + margin-inline-end: 1rem; color: var(--bs-body-color); background-color: var(--bs-tertiary-bg); pointer-events: none; border-color: inherit; border-style: solid; border-width: 0; - border-inline-end-width: var(--bs-border-width); + border-inline-end-width: 0; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; @@ -2245,13 +2245,13 @@ progress { .form-control-plaintext { display: block; width: 100%; - padding: 0.375rem 0; + padding: 0.7rem 0; margin-bottom: 0; line-height: 1.5; color: var(--bs-body-color); background-color: transparent; border: solid transparent; - border-width: var(--bs-border-width) 0; + border-width: 0 0; } .form-control-plaintext:focus { outline: 0; @@ -2263,7 +2263,7 @@ progress { } .form-control-sm { - min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); + min-height: calc(1.5em + 0.5rem + calc(0 * 2)); padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: var(--bs-border-radius-sm); @@ -2275,7 +2275,7 @@ progress { } .form-control-lg { - min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); + min-height: calc(1.5em + 1rem + calc(0 * 2)); padding: 0.5rem 1rem; font-size: 1.25rem; border-radius: var(--bs-border-radius-lg); @@ -2287,21 +2287,21 @@ progress { } textarea.form-control { - min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); + min-height: calc(1.5em + 1.4rem + calc(0 * 2)); } textarea.form-control-sm { - min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); + min-height: calc(1.5em + 0.5rem + calc(0 * 2)); } textarea.form-control-lg { - min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); + min-height: calc(1.5em + 1rem + calc(0 * 2)); } .form-control-color { width: 3rem; - height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2)); - padding: 0.375rem; + height: calc(1.5em + 1.4rem + calc(0 * 2)); + padding: 0.7rem; } .form-control-color:not(:disabled):not([readonly]) { cursor: pointer; @@ -2315,28 +2315,28 @@ textarea.form-control-lg { border-radius: var(--bs-border-radius); } .form-control-color.form-control-sm { - height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2)); + height: calc(1.5em + 0.5rem + calc(0 * 2)); } .form-control-color.form-control-lg { - height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2)); + height: calc(1.5em + 1rem + calc(0 * 2)); } .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); display: block; width: 100%; - padding: 0.375rem 2.25rem 0.375rem 0.75rem; + padding: 0.7rem 3rem 0.7rem 1rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: var(--bs-body-color); - background-color: var(--bs-body-bg); + background-color: #f2f2f2; background-image: var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none); background-repeat: no-repeat; - background-position: right 0.75rem center; + background-position: right 1rem center; background-size: 16px 12px; - border: var(--bs-border-width) solid var(--bs-border-color); + border: 0 solid var(--bs-border-color); border-radius: var(--bs-border-radius); transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; appearance: none; @@ -2353,7 +2353,7 @@ textarea.form-control-lg { } .form-select[multiple], .form-select[size]:not([size='1']) { - padding-right: 0.75rem; + padding-right: 1rem; background-image: none; } .form-select:disabled { @@ -2407,7 +2407,7 @@ textarea.form-control-lg { } .form-check-input { - --bs-form-check-bg: var(--bs-body-bg); + --bs-form-check-bg: #f2f2f2; width: 1em; height: 1em; margin-top: 0.25em; @@ -2607,8 +2607,8 @@ textarea.form-control-lg { .form-floating > .form-control, .form-floating > .form-control-plaintext, .form-floating > .form-select { - height: calc(3.5rem + calc(var(--bs-border-width) * 2)); - min-height: calc(3.5rem + calc(var(--bs-border-width) * 2)); + height: calc(3.5rem + calc(0 * 2)); + min-height: calc(3.5rem + calc(0 * 2)); line-height: 1.25; } .form-floating > label { @@ -2617,13 +2617,13 @@ textarea.form-control-lg { left: 0; z-index: 2; height: 100%; - padding: 1rem 0.75rem; + padding: 1rem 1rem; overflow: hidden; text-align: start; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; - border: var(--bs-border-width) solid transparent; + border: 0 solid transparent; transform-origin: 0 0; transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out; } @@ -2634,7 +2634,7 @@ textarea.form-control-lg { } .form-floating > .form-control, .form-floating > .form-control-plaintext { - padding: 1rem 0.75rem; + padding: 1rem 1rem; } .form-floating > .form-control::placeholder, .form-floating > .form-control-plaintext::placeholder { @@ -2668,11 +2668,11 @@ textarea.form-control-lg { .form-floating > .form-control-plaintext ~ label::after, .form-floating > .form-select ~ label::after { position: absolute; - inset: 1rem 0.375rem; + inset: 1rem 0.5rem; z-index: -1; height: 1.5em; content: ''; - background-color: var(--bs-body-bg); + background-color: #f2f2f2; border-radius: var(--bs-border-radius); } .form-floating > .form-control:-webkit-autofill ~ label { @@ -2680,7 +2680,7 @@ textarea.form-control-lg { transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } .form-floating > .form-control-plaintext ~ label { - border-width: var(--bs-border-width) 0; + border-width: 0 0; } .form-floating > :disabled ~ label { color: #6c757d; @@ -2720,7 +2720,7 @@ textarea.form-control-lg { .input-group-text { display: flex; align-items: center; - padding: 0.375rem 0.75rem; + padding: 0.7rem 1rem; font-size: 1rem; font-weight: 400; line-height: 1.5; @@ -2728,7 +2728,7 @@ textarea.form-control-lg { text-align: center; white-space: nowrap; background-color: var(--bs-tertiary-bg); - border: var(--bs-border-width) solid var(--bs-border-color); + border: 0 solid var(--bs-border-color); border-radius: var(--bs-border-radius); } @@ -2752,7 +2752,7 @@ textarea.form-control-lg { .input-group-lg > .form-select, .input-group-sm > .form-select { - padding-right: 3rem; + padding-right: 4rem; } .input-group:not(.has-validation) @@ -2789,7 +2789,7 @@ textarea.form-control-lg { > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not( .valid-feedback ):not(.invalid-tooltip):not(.invalid-feedback) { - margin-left: calc(var(--bs-border-width) * -1); + margin-left: calc(0 * -1); border-top-left-radius: 0; border-bottom-left-radius: 0; } @@ -2832,11 +2832,11 @@ textarea.form-control-lg { .was-validated .form-control:valid, .form-control.is-valid { border-color: var(--bs-form-valid-border-color); - padding-right: calc(1.5em + 0.75rem); + padding-right: calc(1.5em + 1.4rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2331bb6b' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); background-repeat: no-repeat; - background-position: right calc(0.375em + 0.1875rem) center; - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + background-position: right calc(0.375em + 0.35rem) center; + background-size: calc(0.75em + 0.7rem) calc(0.75em + 0.7rem); } .was-validated .form-control:valid:focus, .form-control.is-valid:focus { @@ -2846,9 +2846,8 @@ textarea.form-control-lg { .was-validated textarea.form-control:valid, textarea.form-control.is-valid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right - calc(0.375em + 0.1875rem); + padding-right: calc(1.5em + 1.4rem); + background-position: top calc(0.375em + 0.35rem) right calc(0.375em + 0.35rem); } .was-validated .form-select:valid, @@ -2860,9 +2859,9 @@ textarea.form-control.is-valid { .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size='1'] { --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2331bb6b' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); - padding-right: 4.125rem; - background-position: right 0.75rem center, center right 2.25rem; - background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + padding-right: 5.5rem; + background-position: right 1rem center, center right 3rem; + background-size: 16px 12px, calc(0.75em + 0.7rem) calc(0.75em + 0.7rem); } .was-validated .form-select:valid:focus, .form-select.is-valid:focus { @@ -2872,7 +2871,7 @@ textarea.form-control.is-valid { .was-validated .form-control-color:valid, .form-control-color.is-valid { - width: calc(3rem + calc(1.5em + 0.75rem)); + width: calc(3rem + calc(1.5em + 1.4rem)); } .was-validated .form-check-input:valid, @@ -2937,11 +2936,11 @@ textarea.form-control.is-valid { .was-validated .form-control:invalid, .form-control.is-invalid { border-color: var(--bs-form-invalid-border-color); - padding-right: calc(1.5em + 0.75rem); + padding-right: calc(1.5em + 1.4rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); background-repeat: no-repeat; - background-position: right calc(0.375em + 0.1875rem) center; - background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + background-position: right calc(0.375em + 0.35rem) center; + background-size: calc(0.75em + 0.7rem) calc(0.75em + 0.7rem); } .was-validated .form-control:invalid:focus, .form-control.is-invalid:focus { @@ -2951,9 +2950,8 @@ textarea.form-control.is-valid { .was-validated textarea.form-control:invalid, textarea.form-control.is-invalid { - padding-right: calc(1.5em + 0.75rem); - background-position: top calc(0.375em + 0.1875rem) right - calc(0.375em + 0.1875rem); + padding-right: calc(1.5em + 1.4rem); + background-position: top calc(0.375em + 0.35rem) right calc(0.375em + 0.35rem); } .was-validated .form-select:invalid, @@ -2965,9 +2963,9 @@ textarea.form-control.is-invalid { .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size='1'] { --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); - padding-right: 4.125rem; - background-position: right 0.75rem center, center right 2.25rem; - background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); + padding-right: 5.5rem; + background-position: right 1rem center, center right 3rem; + background-size: 16px 12px, calc(0.75em + 0.7rem) calc(0.75em + 0.7rem); } .was-validated .form-select:invalid:focus, .form-select.is-invalid:focus { @@ -2977,7 +2975,7 @@ textarea.form-control.is-invalid { .was-validated .form-control-color:invalid, .form-control-color.is-invalid { - width: calc(3rem + calc(1.5em + 0.75rem)); + width: calc(3rem + calc(1.5em + 1.4rem)); } .was-validated .form-check-input:invalid, @@ -3011,8 +3009,8 @@ textarea.form-control.is-invalid { } .btn { - --bs-btn-padding-x: 0.75rem; - --bs-btn-padding-y: 0.375rem; + --bs-btn-padding-x: 1rem; + --bs-btn-padding-y: 0.7rem; --bs-btn-font-family: ; --bs-btn-font-size: 1rem; --bs-btn-font-weight: 400; @@ -3036,7 +3034,6 @@ textarea.form-control.is-invalid { line-height: var(--bs-btn-line-height); color: var(--bs-btn-color); text-align: center; - text-decoration: none; vertical-align: middle; cursor: pointer; user-select: none; @@ -3383,8 +3380,8 @@ fieldset:disabled .btn { --bs-btn-disabled-color: #6c757d; --bs-btn-disabled-border-color: transparent; --bs-btn-box-shadow: 0 0 0 #000; - --bs-btn-focus-shadow-rgb: 42, 159, 91; - text-decoration: underline; + --bs-btn-focus-shadow-rgb: 49, 132, 253; + text-decoration: none; } .btn-link:focus-visible { color: var(--bs-btn-color); @@ -3725,7 +3722,6 @@ fieldset:disabled .btn { font-weight: 400; color: var(--bs-dropdown-link-color); text-align: inherit; - text-decoration: none; white-space: nowrap; background-color: transparent; border: 0; @@ -3840,8 +3836,8 @@ fieldset:disabled .btn { } .dropdown-toggle-split { - padding-right: 0.5625rem; - padding-left: 0.5625rem; + padding-right: 0.75rem; + padding-left: 0.75rem; } .dropdown-toggle-split::after, .dropup .dropdown-toggle-split::after, @@ -3908,7 +3904,6 @@ fieldset:disabled .btn { font-size: var(--bs-nav-link-font-size); font-weight: var(--bs-nav-link-font-weight); color: var(--bs-nav-link-color); - text-decoration: none; background: none; border: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, @@ -4089,7 +4084,6 @@ fieldset:disabled .btn { margin-right: var(--bs-navbar-brand-margin-end); font-size: var(--bs-navbar-brand-font-size); color: var(--bs-navbar-brand-color); - text-decoration: none; white-space: nowrap; } .navbar-brand:hover, @@ -4883,7 +4877,6 @@ fieldset:disabled .btn { padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x); font-size: var(--bs-pagination-font-size); color: var(--bs-pagination-color); - text-decoration: none; background-color: var(--bs-pagination-bg); border: var(--bs-pagination-border-width) solid var(--bs-pagination-border-color); @@ -5202,7 +5195,6 @@ fieldset:disabled .btn { padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x); color: var(--bs-list-group-color); - text-decoration: none; background-color: var(--bs-list-group-bg); border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color); @@ -12436,6 +12428,8 @@ fieldset:disabled .btn { 2. Content 3. Forms 4. Utilities +5. General +6. Colors */ /* @@ -12519,3 +12513,36 @@ fieldset:disabled .btn { 4. UTILITIES */ +/* + + 5. General + +*/ +:root { + --bs-body-font-family: Arial, Helvetica, sans-serif; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + overflow-x: hidden; +} + +body { + background-color: var(--bs-body-bg); +} + +#root { + min-height: 100vh; + background-color: #f2f7ff; +} + +/* + + 6. COLORS + +*/ diff --git a/src/assets/images/palisadoes_logo.png b/src/assets/images/palisadoes_logo.png index a2e0605c7d..2e91c02233 100644 Binary files a/src/assets/images/palisadoes_logo.png and b/src/assets/images/palisadoes_logo.png differ diff --git a/src/assets/scss/_colors.scss b/src/assets/scss/_colors.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/assets/scss/_general.scss b/src/assets/scss/_general.scss new file mode 100644 index 0000000000..2bca736d92 --- /dev/null +++ b/src/assets/scss/_general.scss @@ -0,0 +1,22 @@ +:root { + --bs-body-font-family: Arial, Helvetica, sans-serif; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + overflow-x: hidden; +} + +body { + background-color: var(--bs-body-bg); +} + +#root { + min-height: 100vh; + background-color: #f2f7ff; +} diff --git a/src/assets/scss/_talawa.scss b/src/assets/scss/_talawa.scss index 7c50f4f6e8..2537c2c682 100644 --- a/src/assets/scss/_talawa.scss +++ b/src/assets/scss/_talawa.scss @@ -9,6 +9,8 @@ 2. Content 3. Forms 4. Utilities +5. General +6. Colors */ @@ -118,3 +120,17 @@ */ @import './utilities'; + +/* + + 5. General + +*/ +@import './general'; + +/* + + 6. COLORS + +*/ +@import './colors'; diff --git a/src/assets/scss/_variables.scss b/src/assets/scss/_variables.scss index 67b26786d3..2871cb9df2 100644 --- a/src/assets/scss/_variables.scss +++ b/src/assets/scss/_variables.scss @@ -1,4 +1,30 @@ +// Colors + $primary: #31bb6b; -$success: #31bb6b; $secondary: #707070; +$success: #31bb6b; $warning: #febc59; + +$blue: #0d6efd; +$indigo: #6610f2; +$purple: #6f42c1; +$pink: #d63384; +$red: #dc3545; +$orange: #fd7e14; +$yellow: #ffc107; +$green: #198754; +$teal: #20c997; +$cyan: #0dcaf0; +$placeholder-bg: #f2f2f2; +// Colors + +// Links +$link-color: $blue !default; +$link-decoration: none !default; + +// Inputs and buttons +$input-bg: $placeholder-bg; +$input-border-width: 0; + +$input-btn-padding-y: 0.7rem; +$input-btn-padding-x: 1rem; diff --git a/src/components/AddOn/core/AddOnStore/AddOnStore.tsx b/src/components/AddOn/core/AddOnStore/AddOnStore.tsx index b3283497da..148eea7cb4 100644 --- a/src/components/AddOn/core/AddOnStore/AddOnStore.tsx +++ b/src/components/AddOn/core/AddOnStore/AddOnStore.tsx @@ -21,6 +21,7 @@ import AddOnRegister from '../AddOnRegister/AddOnRegister'; import PluginHelper from 'components/AddOn/support/services/Plugin.helper'; import { store } from './../../../../state/store'; import { useTranslation } from 'react-i18next'; +import Loader from 'components/Loader/Loader'; function addOnStore(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'addOnStore' }); diff --git a/src/components/AdminNavbar/AdminNavbar.module.css b/src/components/AdminNavbar/AdminNavbar.module.css index 261368bf06..8210a80337 100644 --- a/src/components/AdminNavbar/AdminNavbar.module.css +++ b/src/components/AdminNavbar/AdminNavbar.module.css @@ -1,36 +1,6 @@ -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body::before { - display: block; - content: ''; - height: 85px; -} - -body { - font-family: Arial, Helvetica, sans-serif; -} - -a { - text-decoration: none !important; -} - -.modal { - margin-right: 2rem; -} - -.main { - float: left; - display: block; -} - .navbarbg { - /* height: 60px; */ - height: auto; - background-color: white; + position: relative !important; + margin-bottom: 1.5rem; z-index: 1; box-shadow: 0px 0px 8px 2px #c8c8c8; padding-top: 0px; @@ -198,9 +168,6 @@ a { } @media screen and (max-width: 1199px) { - body::before { - height: 118px; - } /* .navbarbg { height: auto; } */ diff --git a/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx b/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx new file mode 100644 index 0000000000..417273a764 --- /dev/null +++ b/src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.tsx @@ -0,0 +1,68 @@ +import React from 'react'; +import { Dropdown } from 'react-bootstrap'; +import i18next from 'i18next'; +import styles from './ChangeLanguageDropdown.module.css'; +import { languages } from 'utils/languages'; +import cookies from 'js-cookie'; + +interface InterfaceChangeLanguageDropDownProps { + parentContainerStyle?: string; + btnStyle?: string; + btnTextStyle?: string; +} + +export const changeLanguage = async (languageCode: string): Promise => { + await i18next.changeLanguage(languageCode); +}; + +const ChangeLanguageDropDown = ( + props: InterfaceChangeLanguageDropDownProps +): JSX.Element => { + const currentLanguageCode = cookies.get('i18next') || 'en'; + + return ( + + + {languages.map((language, index: number) => ( + + {currentLanguageCode === language.code ? ( + + + {language.name} + + ) : null} + + ))} + + + {languages.map((language, index: number) => ( + => changeLanguage(language.code)} + disabled={currentLanguageCode === language.code} + data-testid={`change-language-btn-${index}`} + > + + {language.name} + + ))} + + + ); +}; + +export default ChangeLanguageDropDown; diff --git a/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css new file mode 100644 index 0000000000..e72c604905 --- /dev/null +++ b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.module.css @@ -0,0 +1,7 @@ +.parentContainer { + margin: 0 1rem; +} + +.dropdownItem { + font-size: 0.9rem; +} diff --git a/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx new file mode 100644 index 0000000000..c4d4d1c85a --- /dev/null +++ b/src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx @@ -0,0 +1,127 @@ +import React from 'react'; +import { act, render } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import 'jest-localstorage-mock'; +import 'jest-location-mock'; +import { I18nextProvider } from 'react-i18next'; +import { BrowserRouter } from 'react-router-dom'; +import i18nForTest from 'utils/i18nForTest'; +import { languages } from 'utils/languages'; +import ChangeLanguageDropDown from './ChangeLanguageDropDown'; + +async function wait(ms = 100): Promise { + await act(() => { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); + }); +} + +describe('Testing Change Language Dropdown', () => { + test('Component Should be rendered properly', async () => { + const { getByTestId } = render( + + + + + + ); + + expect(getByTestId('language-dropdown-container')).toBeInTheDocument(); + expect(getByTestId('language-dropdown-btn')).toBeInTheDocument(); + expect(getByTestId('dropdown-btn-0')).toBeInTheDocument(); + + getByTestId('language-dropdown-container').className.includes(''); + getByTestId('language-dropdown-btn').className.includes(''); + getByTestId('dropdown-btn-0').className.includes(''); + + userEvent.click(getByTestId('dropdown-btn-0')); + await wait(); + + languages.map((language, index) => { + expect(getByTestId(`change-language-btn-${index}`)).toBeInTheDocument(); + }); + }); + + test('Component Should accept props properly', async () => { + const props = { + parentContainerStyle: 'parentContainerStyle', + btnStyle: 'btnStyle', + btnTextStyle: 'btnTextStyle', + }; + const { getByTestId } = render( + + + + + + ); + getByTestId('language-dropdown-container').className.includes( + props.parentContainerStyle + ); + getByTestId('language-dropdown-btn').className.includes(props.btnStyle); + getByTestId('dropdown-btn-0').className.includes(props.btnTextStyle); + }); + + test('Testing when language cookie is not set', async () => { + Object.defineProperty(window.document, 'cookie', { + writable: true, + value: 'i18next=', + }); + + render( + + + + ); + + await wait(); + }); + + test('Testing when language cookie is set', async () => { + Object.defineProperty(window.document, 'cookie', { + writable: true, + value: 'i18next=en', + }); + + render( + + + + ); + + await wait(); + }); + + test('Testing when language cookie is set but not in languages list', async () => { + Object.defineProperty(window.document, 'cookie', { + writable: true, + value: 'i18next=xx', + }); + + render( + + + + ); + + await wait(); + }); + + test('Testing when change language button is clicked', async () => { + Object.defineProperty(window.document, 'cookie', { + writable: true, + value: 'i18next=en', + }); + + const { getByTestId } = render( + + + + ); + + userEvent.click(getByTestId('language-dropdown-btn')); + await wait(); + getByTestId('change-language-btn-1').click(); + }); +}); diff --git a/src/components/EventListCard/EventListCard.module.css b/src/components/EventListCard/EventListCard.module.css index 7a1f74f3b3..c5804d67ec 100644 --- a/src/components/EventListCard/EventListCard.module.css +++ b/src/components/EventListCard/EventListCard.module.css @@ -50,27 +50,6 @@ grid-column: auto / span 1; } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} -form > input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .sidebarsticky > input { text-decoration: none; margin-bottom: 50px; @@ -163,12 +142,6 @@ form > input { justify-content: left; flex-direction: column; } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} .titlemodal { color: #707070; font-weight: 600; diff --git a/src/components/ListNavbar/ListNavbar.module.css b/src/components/ListNavbar/ListNavbar.module.css index 74f97d7832..091f6164a1 100644 --- a/src/components/ListNavbar/ListNavbar.module.css +++ b/src/components/ListNavbar/ListNavbar.module.css @@ -1,5 +1,5 @@ .navbarbgOrglist { - /* height:60px; */ + position: relative !important; padding: 0 1rem; background-color: white; display: flex; @@ -101,9 +101,6 @@ } @media only screen and (max-width: 600px) { - body::before { - height: 118px; - } .navbarbgOrglist { height: auto; } diff --git a/src/components/Loader/Loader.module.css b/src/components/Loader/Loader.module.css new file mode 100644 index 0000000000..df8c1deea6 --- /dev/null +++ b/src/components/Loader/Loader.module.css @@ -0,0 +1,13 @@ +.spinner_wrapper { + height: 100vh; + width: 100%; + display: flex; + justify-content: center; + align-items: center; +} + +.spinner { + width: 6rem; + height: 6rem; + border-width: 0.5rem; +} diff --git a/src/components/Loader/Loader.test.tsx b/src/components/Loader/Loader.test.tsx new file mode 100644 index 0000000000..77c15667a5 --- /dev/null +++ b/src/components/Loader/Loader.test.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import 'jest-localstorage-mock'; +import { BrowserRouter } from 'react-router-dom'; + +import Loader from './Loader'; + +describe('Testing Loader component', () => { + test('Component should be rendered properly', () => { + render( + + + + ); + + expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); + expect(screen.getByTestId('spinner')).toBeInTheDocument(); + }); +}); diff --git a/src/components/Loader/Loader.tsx b/src/components/Loader/Loader.tsx new file mode 100644 index 0000000000..6dc247b4c9 --- /dev/null +++ b/src/components/Loader/Loader.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import styles from './Loader.module.css'; +import { Spinner } from 'react-bootstrap'; + +const Loader = (): JSX.Element => { + return ( + <> +
+ +
+ + ); +}; + +export default Loader; diff --git a/src/components/OrgUpdate/OrgUpdate.module.css b/src/components/OrgUpdate/OrgUpdate.module.css index 069b080135..d181d358b1 100644 --- a/src/components/OrgUpdate/OrgUpdate.module.css +++ b/src/components/OrgUpdate/OrgUpdate.module.css @@ -27,28 +27,6 @@ width: 50%; margin-right: 50px; } -form label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .radio_buttons > input { margin-bottom: 20px; diff --git a/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css b/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css index d914002964..54cf1c020c 100644 --- a/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css +++ b/src/components/UserPasswordUpdate/UserPasswordUpdate.module.css @@ -27,28 +27,6 @@ width: 50%; margin-right: 50px; } -form label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .radio_buttons > input { margin-bottom: 20px; diff --git a/src/components/UserUpdate/UserUpdate.module.css b/src/components/UserUpdate/UserUpdate.module.css index d914002964..54cf1c020c 100644 --- a/src/components/UserUpdate/UserUpdate.module.css +++ b/src/components/UserUpdate/UserUpdate.module.css @@ -27,28 +27,6 @@ width: 50%; margin-right: 50px; } -form label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .radio_buttons > input { margin-bottom: 20px; diff --git a/src/components/UserUpdate/UserUpdate.tsx b/src/components/UserUpdate/UserUpdate.tsx index 6807565c3c..95e43874c9 100644 --- a/src/components/UserUpdate/UserUpdate.tsx +++ b/src/components/UserUpdate/UserUpdate.tsx @@ -11,6 +11,7 @@ import { languages } from 'utils/languages'; import { toast } from 'react-toastify'; import { errorHandler } from 'utils/errorHandler'; import { Form } from 'react-bootstrap'; +import Loader from 'components/Loader/Loader'; interface InterfaceUserUpdateProps { id: string; @@ -54,11 +55,7 @@ const UserUpdate: React.FC = ({ }, [data]); if (loading) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/LoginPage/LoginPage.module.css b/src/screens/LoginPage/LoginPage.module.css index 1f78a04835..0047934b7e 100644 --- a/src/screens/LoginPage/LoginPage.module.css +++ b/src/screens/LoginPage/LoginPage.module.css @@ -1,388 +1,141 @@ -html { - overflow-x: hidden !important; -} - -/* ===== Login Modal CSS Start ===== */ - -.show { - position: absolute; - right: 10%; - font-weight: normal; - top: 40%; - cursor: pointer; -} -.showregister { - position: absolute; - right: 16%; - font-weight: normal; - cursor: pointer; - margin-top: -34px; -} -#grid_wrapper { - align-items: left; -} .login_background { - overflow-x: hidden; - overflow-y: visible; - background-color: #fcfcfc; - height: 100%; - width: 100vw; - margin: 0; - background-repeat: no-repeat !important; - background-position: center !important; - background-size: cover !important; - position: fixed; - top: 0; - right: 0; - left: 0; -} -.flexdir { - display: flex; - flex-direction: row; - justify-content: space-between; - border: none; + min-height: 100vh; } -.form_wrapper { - margin-top: 27px; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - position: absolute; +.row .left_portion { display: flex; + justify-content: center; + align-items: center; flex-direction: column; - padding: 40px 30px; - background: #ffffff; - border-color: #e8e5e5; - border-width: 5px; - border-radius: 10px; + height: 100vh; } -.form_wrapper form { - display: flex; - align-items: left; - justify-content: left; - flex-direction: column; +.row .left_portion .inner .palisadoes_logo { + width: 600px; } -.logintitle { - color: #707070; - font-weight: 600; - font-size: 20px; - margin-bottom: 20px; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - width: 50%; + +.row .right_portion { + height: 100vh; + position: relative; + overflow-y: scroll; + padding: 1rem 2.5rem; + background: var(--bs-white); } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; + +.row .right_portion .langChangeBtn { + margin: 0; + position: absolute; + top: 1rem; + left: 2rem; } -form > input { +.row .right_portion .talawa_logo { + height: 150px; display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; + margin: 1rem auto; } -/* Animation */ -.animated_content { - display: flex; - align-items: center; - justify-content: center; - animation: up-down 2s ease-in-out infinite alternate-reverse both; -} +.row .orText { + display: block; + position: absolute; + top: calc(-0.7rem - 0.5rem); + left: calc(50% - 2.6rem); + margin: 0 auto; + padding: 0.5rem 2rem; + z-index: 100; + background: var(--bs-white); + color: var(--bs-secondary); +} + +@media (max-width: 992px) { + .row .left_portion { + padding: 0 2rem; + } -.animated_content img { - height: 70vh; - width: 70vh; + .row .left_portion .inner .palisadoes_logo { + width: 100%; + } } -.whiteloginbtn { - margin: 1rem 0 0; - margin-top: 10px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - font-size: 16px; - color: #31bb6b; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; - width: 100%; -} -.whiteloginbtn:hover { - background-color: #737373; - color: white; -} -.greenregbtn { - margin: 1rem 0 0; - margin-top: 10px; - border: 1px solid #e8e5e5; - box-shadow: 0 2px 2px #e8e5e5; - padding: 10px 10px; - border-radius: 5px; - background-color: #31bb6b; - width: 100%; - font-size: 16px; - color: white; - outline: none; - font-weight: 600; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; - width: 100%; -} -.greenregbtn:hover { - color: #fff; - background-color: #1e7e34; - border-color: #1c7430; -} +@media (max-width: 769px) { + .row { + flex-direction: column-reverse; + } -.navloginbtn { - background-color: #31bb6b; - padding: 0.5em 1em; - margin-right: 3rem; - font-size: 16px; - color: white; - outline: none; - font-weight: normal; - border: none; - border-radius: 5px; - cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; - width: 130px; -} -.navloginbtn:hover { - color: #fff; - background-color: #1e7e34; - border-color: #1c7430; -} -.languageBtn { - font-size: 20px; - margin-right: 16px; - color: #31bb6b; -} -.languageBtn:hover { - color: #31bb6b; -} -.languageBtn:focus { - color: #31bb6b; -} -.forgotpwd { - text-align: right; - justify-content: right; - color: #707070; - font-size: 11px; - margin-top: 10px; - text-decoration: none !important; -} -form > hr { - margin-top: 20px; - margin-bottom: 0px; - border-bottom: 0rem solid #e8e5e5; -} -form > br { - margin-top: 10px; - margin-bottom: 10px; - border-bottom: 0.2rem solid #e8e5e5; -} + .row .right_portion, + .row .left_portion { + height: unset; + } -.navbarbg { - /* height: 60px; */ - padding: 0 1rem; - background-color: white; - display: flex; - margin-bottom: 30px; - z-index: 1; - position: relative; - flex-direction: row; - justify-content: space-between !important; - box-shadow: 0px 0px 8px 2px #c8c8c8; -} + .row .right_portion { + min-height: 100vh; + overflow-y: unset; + } -.navbarBrand { - padding-top: 0; - padding-bottom: 0; -} + .row .left_portion .inner { + display: flex; + justify-content: center; + } -.logo { - color: #707070; - margin-left: 0; - display: flex; - align-items: center; - text-decoration: none !important; -} + .row .left_portion .inner .palisadoes_logo { + height: 70px; + width: unset; + position: absolute; + top: 0.25rem; + right: 0; + z-index: 100; + } -.logo img { - margin-top: 0px; - margin-left: 10px; - height: 64px; - width: 70px; + .row .left_portion .inner p { + margin-bottom: 0; + padding: 1rem; + } } -.logo > strong { - line-height: 1.5rem; - margin-left: -5px; - font-family: sans-serif; - font-size: 19px; - color: #707070; -} +@media (max-width: 577px) { + .row .right_portion { + padding: 1rem 1rem 0 1rem; + } -.cancel > i { - margin-top: 5px; - transform: scale(1.2); - cursor: pointer; - color: #707070; -} -.modalbody { - width: 50px; -} + .row .right_portion .langChangeBtn { + position: relative; + margin: 0; + left: 0; + top: 0; + } -.loader, -.loader:after { - border-radius: 50%; - width: 10em; - height: 10em; + .row .right_portion .talawa_logo { + height: 120px; + margin: 0.75rem auto; + } } -.loader { - margin: 60px auto; - margin-top: 35vh !important; - font-size: 10px; - position: relative; - text-indent: -9999em; - border-top: 1.1em solid rgba(255, 255, 255, 0.2); - border-right: 1.1em solid rgba(255, 255, 255, 0.2); - border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); - border-left: 1.1em solid #febc59; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load8 1.1s infinite linear; - animation: load8 1.1s infinite linear; +.active_tab { + -webkit-animation: fadeIn 0.3s ease-in-out; + animation: fadeIn 0.3s ease-in-out; } -@-webkit-keyframes load8 { +@-webkit-keyframes fadeIn { 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); + opacity: 0; + -webkit-transform: translateY(2rem); + transform: translateY(2rem); } 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); } } -@keyframes load8 { + +@keyframes fadeIn { 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); + opacity: 0; + -webkit-transform: translateY(2rem); + transform: translateY(2rem); } 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@media only screen and (max-width: 600px) { - .form_wrapper { - width: 90%; - top: 45%; - } -} - -/* ===== Login Modal CSS End ===== */ -/* ================================================= */ -/* ===== Home Page CSS Start ===== */ -/* .homeleft { - width: 55%; -} */ -.rightmainbg { - border-top-left-radius: 10%; - height: 100%; - background-color: white; -} -/* .leftmainbg{ - background-color: #fafafa; - border-bottom-right-radius: 10%; - z-index:-1; -} */ - -.homeright { - width: 80%; - margin-left: 40px; - margin-bottom: 30px; -} - -.homeright > h1 { - font-size: 20px; - padding-top: 35px; - width: 17%; - padding-bottom: 6px; - border-bottom: 3px solid #31bb6b; - margin-bottom: 20px; -} - -/* .homeright>h2{ - width:75%; - font-size: 16px; - color: #707070; - padding-bottom: 5px; - border-bottom: 3px solid #31bb6b; - margin-bottom:20px; -} */ -.dispflex { - display: flex; - flex-direction: row; -} -.dispflex > div { - width: 95%; - margin-right: 10px; -} -.passwordalert > input { - margin-bottom: 2px; -} -.passwordalert > span { - color: rgb(240, 48, 48); - font-size: 9px; - padding-bottom: 20px; -} -.homeright > form input { - background-color: white; - box-shadow: 1px 3px #e8e5e5; -} -.passwordalert { - margin-bottom: 15px; -} -.noaccount { - text-align: center; - color: #707070; - font-size: 11px; - margin-top: 10px; -} - -@media only screen and (max-width: 600px) { - body::before { - height: 118px; - } - .navbarbg { - height: auto; - } - .languageBtn { - margin-bottom: 10px; + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); } } -/* ===== Home Page CSS End ===== */ diff --git a/src/screens/LoginPage/LoginPage.test.tsx b/src/screens/LoginPage/LoginPage.test.tsx index ac70d023ce..c92ba07e43 100644 --- a/src/screens/LoginPage/LoginPage.test.tsx +++ b/src/screens/LoginPage/LoginPage.test.tsx @@ -166,7 +166,7 @@ describe('Testing Login Page Screen', () => { await wait(); - expect(screen.getByText(/Talawa Admin Portal/i)).toBeInTheDocument(); + expect(screen.getByText(/Admin Portal/i)).toBeInTheDocument(); expect(window.location).toBeAt('/orglist'); }); @@ -193,6 +193,10 @@ describe('Testing Login Page Screen', () => { await wait(); + userEvent.click(screen.getByTestId(/goToRegisterPortion/i)); + + await wait(); + userEvent.type( screen.getByPlaceholderText(/First Name/i), formData.firstName @@ -201,7 +205,7 @@ describe('Testing Login Page Screen', () => { screen.getByPlaceholderText(/Last name/i), formData.lastName ); - userEvent.type(screen.getByPlaceholderText(/Email/i), formData.email); + userEvent.type(screen.getByTestId(/signInEmail/i), formData.email); userEvent.type(screen.getByPlaceholderText('Password'), formData.password); userEvent.type( screen.getByPlaceholderText('Confirm Password'), @@ -234,6 +238,8 @@ describe('Testing Login Page Screen', () => { await wait(); + userEvent.click(screen.getByTestId(/goToRegisterPortion/i)); + userEvent.type( screen.getByPlaceholderText(/First Name/i), formData.firstName @@ -242,7 +248,7 @@ describe('Testing Login Page Screen', () => { screen.getByPlaceholderText(/Last Name/i), formData.lastName ); - userEvent.type(screen.getByPlaceholderText(/Email/i), formData.email); + userEvent.type(screen.getByTestId(/signInEmail/i), formData.email); userEvent.type(screen.getByPlaceholderText('Password'), formData.password); userEvent.type( screen.getByPlaceholderText('Confirm Password'), @@ -275,6 +281,8 @@ describe('Testing Login Page Screen', () => { await wait(); + userEvent.click(screen.getByTestId(/goToRegisterPortion/i)); + userEvent.type( screen.getByPlaceholderText(/First Name/i), formData.firstName @@ -283,7 +291,7 @@ describe('Testing Login Page Screen', () => { screen.getByPlaceholderText(/Last Name/i), formData.lastName ); - userEvent.type(screen.getByPlaceholderText(/Email/i), formData.email); + userEvent.type(screen.getByTestId(/signInEmail/i), formData.email); userEvent.type(screen.getByPlaceholderText('Password'), formData.password); userEvent.type( screen.getByPlaceholderText('Confirm Password'), @@ -293,7 +301,7 @@ describe('Testing Login Page Screen', () => { userEvent.click(screen.getByTestId('registrationBtn')); }); - test('Testing login modal', async () => { + test('Testing toggle login register portion', async () => { render( @@ -308,9 +316,9 @@ describe('Testing Login Page Screen', () => { await wait(); - userEvent.click(screen.getByTestId('loginModalBtn')); + userEvent.click(screen.getByTestId('goToRegisterPortion')); - userEvent.click(screen.getByTestId('hideModalBtn')); + userEvent.click(screen.getByTestId('goToLoginPortion')); await wait(); }); @@ -335,9 +343,7 @@ describe('Testing Login Page Screen', () => { await wait(); - userEvent.click(screen.getByTestId('loginModalBtn')); - - userEvent.type(screen.getByPlaceholderText(/Enter Email/i), formData.email); + userEvent.type(screen.getByTestId(/loginEmail/i), formData.email); userEvent.type( screen.getByPlaceholderText(/Enter Password/i), formData.password @@ -348,7 +354,7 @@ describe('Testing Login Page Screen', () => { await wait(); }); - test('Testing change language functionality', async () => { + test('Testing password preview feature for login', async () => { render( @@ -363,35 +369,21 @@ describe('Testing Login Page Screen', () => { await wait(); - userEvent.click(screen.getByTestId('languageDropdownBtn')); - userEvent.click(screen.getByTestId('changeLanguageBtn1')); - userEvent.click(screen.getByTestId('changeLanguageBtn2')); - userEvent.click(screen.getByTestId('changeLanguageBtn3')); - userEvent.click(screen.getByTestId('changeLanguageBtn4')); - }); - - test('Testing when language cookie is not set', async () => { - Object.defineProperty(window.document, 'cookie', { - writable: true, - value: 'i18next=', - }); - - render( - - - - - - - - - - ); + const input = screen.getByTestId('password') as HTMLInputElement; + const toggleText = screen.getByTestId('showLoginPassword'); + // password should be hidden + expect(input.type).toBe('password'); + // click the toggle button to show password + userEvent.click(toggleText); + expect(input.type).toBe('text'); + // click the toggle button to hide password + userEvent.click(toggleText); + expect(input.type).toBe('password'); await wait(); }); - test('Testing password preview feature', async () => { + test('Testing password preview feature for register', async () => { render( @@ -405,9 +397,10 @@ describe('Testing Login Page Screen', () => { ); await wait(); - userEvent.click(screen.getByTestId('loginModalBtn')); - const input = screen.getByTestId('password') as HTMLInputElement; + userEvent.click(screen.getByTestId('goToRegisterPortion')); + + const input = screen.getByTestId('passwordField') as HTMLInputElement; const toggleText = screen.getByTestId('showPassword'); // password should be hidden expect(input.type).toBe('password'); @@ -436,8 +429,10 @@ describe('Testing Login Page Screen', () => { await wait(); + userEvent.click(screen.getByTestId('goToRegisterPortion')); + const input = screen.getByTestId('cpassword') as HTMLInputElement; - const toggleText = screen.getByTestId('showPasswordrCon'); + const toggleText = screen.getByTestId('showPasswordCon'); // password should be hidden expect(input.type).toBe('password'); // click the toggle button to show password @@ -485,6 +480,8 @@ describe('Testing Login Page Screen', () => { ); await wait(); + userEvent.click(screen.getByTestId('goToRegisterPortion')); + userEvent.type(screen.getByPlaceholderText('Password'), password.password); expect(screen.getByTestId('passwordField')).toHaveFocus(); @@ -512,6 +509,8 @@ describe('Testing Login Page Screen', () => { ); await wait(); + userEvent.click(screen.getByTestId('goToRegisterPortion')); + userEvent.type(screen.getByPlaceholderText('Password'), password.password); expect(screen.getByTestId('passwordField')).toHaveFocus(); @@ -539,6 +538,8 @@ describe('Testing Login Page Screen', () => { ); await wait(); + userEvent.click(screen.getByTestId('goToRegisterPortion')); + expect(screen.getByPlaceholderText('Password')).not.toHaveFocus(); userEvent.type(screen.getByPlaceholderText('Password'), password.password); @@ -566,6 +567,10 @@ describe('Testing Login Page Screen', () => { ); await wait(); + userEvent.click(screen.getByTestId('goToRegisterPortion')); + + await wait(); + expect(screen.getByPlaceholderText('Password')).not.toHaveFocus(); userEvent.type(screen.getByPlaceholderText('Password'), password.password); diff --git a/src/screens/LoginPage/LoginPage.tsx b/src/screens/LoginPage/LoginPage.tsx index 79e33028d1..83b9e30b71 100644 --- a/src/screens/LoginPage/LoginPage.tsx +++ b/src/screens/LoginPage/LoginPage.tsx @@ -1,36 +1,35 @@ +import { useMutation } from '@apollo/client'; import type { ChangeEvent } from 'react'; import React, { useEffect, useRef, useState } from 'react'; -import Row from 'react-bootstrap/Row'; -import Col from 'react-bootstrap/Col'; -import Modal from 'react-bootstrap/Modal'; -import { useMutation } from '@apollo/client'; -import { useTranslation } from 'react-i18next'; -import { Link, useHistory } from 'react-router-dom'; +import { Form } from 'react-bootstrap'; import Button from 'react-bootstrap/Button'; -import { Dropdown, Form, Nav, Navbar } from 'react-bootstrap'; +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 } from 'react-router-dom'; import { toast } from 'react-toastify'; -import cookies from 'js-cookie'; -import i18next from 'i18next'; -import styles from './LoginPage.module.css'; -import Logo from 'assets/images/talawa-logo-200x200.png'; -import LandingPage from 'components/LandingPage/LandingPage'; +import { REACT_APP_USE_RECAPTCHA, RECAPTCHA_SITE_KEY } from 'Constant/constant'; import { LOGIN_MUTATION, RECAPTCHA_MUTATION, + SIGNUP_MUTATION, } from 'GraphQl/Mutations/mutations'; -import { SIGNUP_MUTATION } from 'GraphQl/Mutations/mutations'; -import { languages } from 'utils/languages'; -import { RECAPTCHA_SITE_KEY, REACT_APP_USE_RECAPTCHA } from 'Constant/constant'; +import Palisadoes from 'assets/images/palisadoes_logo.png'; +import Talawa from 'assets/images/talawa-logo-200x200.png'; +import ChangeLanguageDropDown from 'components/ChangeLanguageDropdown/ChangeLanguageDropDown'; +import Loader from 'components/Loader/Loader'; import { errorHandler } from 'utils/errorHandler'; +import styles from './LoginPage.module.css'; +import EmailOutlinedIcon from '@mui/icons-material/EmailOutlined'; function loginPage(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'loginPage' }); document.title = t('title'); - const [showModal, setShowModal] = React.useState(false); + const [showTab, setShowTab] = useState<'LOGIN' | 'REGISTER'>('LOGIN'); const [componentLoader, setComponentLoader] = useState(true); const [isInputFocused, setIsInputFocused] = useState(false); const [signformState, setSignFormState] = useState({ @@ -48,9 +47,6 @@ function loginPage(): JSX.Element { const [showConfirmPassword, setShowConfirmPassword] = useState(false); const recaptchaRef = useRef(null); - const history = useHistory(); - - const currentLanguageCode = cookies.get('i18next') || 'en'; useEffect(() => { const isLoggedIn = localStorage.getItem('IsLoggedIn'); @@ -60,7 +56,6 @@ function loginPage(): JSX.Element { setComponentLoader(false); }, []); - const toggleLoginModal = (): void => setShowModal(!showModal); const togglePassword = (): void => setShowPassword(!showPassword); const toggleConfirmPassword = (): void => setShowConfirmPassword(!showConfirmPassword); @@ -75,10 +70,9 @@ function loginPage(): JSX.Element { useEffect(() => { async function loadResource(): Promise { - const resourceUrl = 'http://localhost:4000/graphql/'; try { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const response = await fetch(resourceUrl); + const response = await fetch('http://localhost:4000/graphql/'); } catch (error: any) { /* istanbul ignore next */ errorHandler(t, error); @@ -201,9 +195,7 @@ function loginPage(): JSX.Element { localStorage.setItem('IsLoggedIn', 'TRUE'); localStorage.setItem('UserType', loginData.login.user.userType); if (localStorage.getItem('IsLoggedIn') == 'TRUE') { - // Removing the next 2 lines will cause Authorization header to be copied to clipboard - navigator.clipboard.writeText(''); - history.replace('/orglist'); + window.location.replace('/orglist'); } } else { toast.warn(t('notAuthorised')); @@ -218,211 +210,314 @@ function loginPage(): JSX.Element { }; if (componentLoader || loginLoading || signinLoading || recaptchaLoading) { - return
; + return ; } return ( <>
- - - - - {t('talawa_portal')} - - - - - - - -
- - -
- -
- - -
-

{t('register')}

- {/*

to seamlessly manage your Organization.

*/} - -
-
- - { - setSignFormState({ - ...signformState, - signfirstName: e.target.value, - }); - }} - /> -
-
- - { - setSignFormState({ - ...signformState, - signlastName: e.target.value, - }); - }} - /> -
+ +
- - { - setSignFormState({ - ...signformState, - signEmail: e.target.value.toLowerCase(), - }); - }} - /> -
- + {t('password')} +
setIsInputFocused(true)} - onBlur={(): void => setIsInputFocused(false)} + className="input_box_second" + placeholder={t('enterPassword')} required - value={signformState.signPassword} + value={formState.password} + data-testid="password" onChange={(e): void => { - setSignFormState({ - ...signformState, - signPassword: e.target.value, + setFormState({ + ...formState, + password: e.target.value, }); }} + autoComplete="current-password" /> - - {isInputFocused && - signformState.signPassword.length < 8 && ( - - {t('atleast_8_char_long')} - - )} - {!isInputFocused && - signformState.signPassword.length > 0 && - signformState.signPassword.length < 8 && ( - - {t('atleast_8_char_long')} - - )} + +
+
+ + {t('forgotPassword')} + +
+ {REACT_APP_USE_RECAPTCHA === 'yes' ? ( +
+ +
+ ) : ( + /* istanbul ignore next */ + <> + )} + +
+
+ {t('OR')}
-
- + + +
+ {/* REGISTER FORM */} +
+
+

+ {t('register')} +

+ + +
+ {t('firstName')} + { + setSignFormState({ + ...signformState, + signfirstName: e.target.value, + }); + }} + /> +
+ + +
+ {t('lastName')} + { + setSignFormState({ + ...signformState, + signlastName: e.target.value, + }); + }} + /> +
+ +
+ {t('email')} +
{ setSignFormState({ ...signformState, - cPassword: e.target.value, + signEmail: e.target.value.toLowerCase(), }); }} - data-testid="cpassword" /> -
+ +
+ {t('password')} +
+ setIsInputFocused(true)} + onBlur={(): void => setIsInputFocused(false)} + required + value={signformState.signPassword} + onChange={(e): void => { + setSignFormState({ + ...signformState, + signPassword: e.target.value, + }); + }} + /> + +
+ {isInputFocused && + signformState.signPassword.length < 8 && ( +
+ {t('atleast_8_char_long')} +
+ )} + {!isInputFocused && + signformState.signPassword.length > 0 && + signformState.signPassword.length < 8 && ( +
+ {t('atleast_8_char_long')} +
)} - +
+
+ {t('confirmPassword')} +
+ { + setSignFormState({ + ...signformState, + cPassword: e.target.value, + }); + }} + data-testid="cpassword" + autoComplete="new-password" + /> + +
{signformState.cPassword.length > 0 && signformState.signPassword !== signformState.cPassword && ( - +
{t('Password_and_Confirm_password_mismatches.')} - +
)}
{REACT_APP_USE_RECAPTCHA === 'yes' ? ( -
+
{t('register')} - -
- - -
- - - -

{t('login')}

- - - -
- -
- - { - setFormState({ - ...formState, - email: e.target.value, - }); - }} - /> - - -
- { - setFormState({ - ...formState, - password: e.target.value, - }); - }} - /> - +
+
+ {t('OR')} +
+ +
- {REACT_APP_USE_RECAPTCHA === 'yes' ? ( -
- -
- ) : ( - /* istanbul ignore next */ - <> - )} - - - {t('forgotPassword')} - -
- {t('doNotOwnAnAccount')} - - -
-
+
+ +
); diff --git a/src/screens/MemberDetail/MemberDetail.module.css b/src/screens/MemberDetail/MemberDetail.module.css index f0347e2a04..57df721d70 100644 --- a/src/screens/MemberDetail/MemberDetail.module.css +++ b/src/screens/MemberDetail/MemberDetail.module.css @@ -187,29 +187,6 @@ width: 65%; } -form label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form > input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} - .checkboxdiv > label { margin-right: 50px; } diff --git a/src/screens/MemberDetail/MemberDetail.tsx b/src/screens/MemberDetail/MemberDetail.tsx index d564b4dd68..c898ae9b32 100644 --- a/src/screens/MemberDetail/MemberDetail.tsx +++ b/src/screens/MemberDetail/MemberDetail.tsx @@ -16,6 +16,7 @@ import { languages } from 'utils/languages'; import { ADD_ADMIN_MUTATION } from 'GraphQl/Mutations/mutations'; import { toast } from 'react-toastify'; import { errorHandler } from 'utils/errorHandler'; +import Loader from 'components/Loader/Loader'; type MemberDetailProps = { id: string; // This is the userId @@ -45,11 +46,7 @@ const MemberDetail: React.FC = ({ id }): JSX.Element => { }); if (loading) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/OrgContribution/OrgContribution.module.css b/src/screens/OrgContribution/OrgContribution.module.css index 08c273dbbd..1a3930690c 100644 --- a/src/screens/OrgContribution/OrgContribution.module.css +++ b/src/screens/OrgContribution/OrgContribution.module.css @@ -175,28 +175,6 @@ border-bottom: 3px solid #31bb6b; width: 40%; } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form > input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .cancel > i { margin-top: 5px; transform: scale(1.2); diff --git a/src/screens/OrgList/OrgList.module.css b/src/screens/OrgList/OrgList.module.css index c0ce4541c8..eddb1b6b36 100644 --- a/src/screens/OrgList/OrgList.module.css +++ b/src/screens/OrgList/OrgList.module.css @@ -219,28 +219,6 @@ border-bottom: 3px solid #31bb6b; width: 65%; } -form label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form > input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .checkboxdiv > label { margin-right: 50px; diff --git a/src/screens/OrgList/OrgList.tsx b/src/screens/OrgList/OrgList.tsx index a603adad35..7d9c872f44 100644 --- a/src/screens/OrgList/OrgList.tsx +++ b/src/screens/OrgList/OrgList.tsx @@ -24,6 +24,7 @@ import convertToBase64 from 'utils/convertToBase64'; import AdminDashListCard from 'components/AdminDashListCard/AdminDashListCard'; import { Alert, AlertTitle } from '@mui/material'; import { errorHandler } from 'utils/errorHandler'; +import Loader from 'components/Loader/Loader'; function orgList(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'orgList' }); @@ -136,11 +137,7 @@ function orgList(): JSX.Element { }; if (loading || loading2 || loading3) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/OrgPost/OrgPost.module.css b/src/screens/OrgPost/OrgPost.module.css index 7623e04083..037e5f40c8 100644 --- a/src/screens/OrgPost/OrgPost.module.css +++ b/src/screens/OrgPost/OrgPost.module.css @@ -190,31 +190,10 @@ border-bottom: 3px solid #31bb6b; width: 40%; } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} .postinfo { height: 80px; } -form > input, -textarea { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} + .postinfo { height: 80px; margin-bottom: 20px; diff --git a/src/screens/OrgPost/OrgPost.tsx b/src/screens/OrgPost/OrgPost.tsx index 30564f218c..48b6a17020 100644 --- a/src/screens/OrgPost/OrgPost.tsx +++ b/src/screens/OrgPost/OrgPost.tsx @@ -22,6 +22,7 @@ import convertToBase64 from 'utils/convertToBase64'; import NotFound from 'components/NotFound/NotFound'; import { Form as StyleBox } from 'react-bootstrap'; import { errorHandler } from 'utils/errorHandler'; +import Loader from 'components/Loader/Loader'; function orgPost(): JSX.Element { const { t } = useTranslation('translation', { @@ -108,11 +109,7 @@ function orgPost(): JSX.Element { }; if (createPostLoading || orgPostListLoading) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/OrgSettings/OrgSettings.tsx b/src/screens/OrgSettings/OrgSettings.tsx index d102040a7d..c6f5714052 100644 --- a/src/screens/OrgSettings/OrgSettings.tsx +++ b/src/screens/OrgSettings/OrgSettings.tsx @@ -15,6 +15,7 @@ import type { RootState } from 'state/reducers'; import { useTranslation } from 'react-i18next'; import defaultImg from 'assets/images/blank.png'; import Button from 'react-bootstrap/Button'; +import Loader from 'components/Loader/Loader'; function orgSettings(): JSX.Element { const { t } = useTranslation('translation', { @@ -54,11 +55,7 @@ function orgSettings(): JSX.Element { }); if (loading) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx index 229162a33c..cdfebb31ca 100644 --- a/src/screens/OrganizationDashboard/OrganizationDashboard.tsx +++ b/src/screens/OrganizationDashboard/OrganizationDashboard.tsx @@ -20,6 +20,7 @@ import { } from 'GraphQl/Queries/Queries'; import { DELETE_ORGANIZATION_MUTATION } from 'GraphQl/Mutations/mutations'; import { errorHandler } from 'utils/errorHandler'; +import Loader from 'components/Loader/Loader'; function organizationDashboard(): JSX.Element { const { t } = useTranslation('translation', { keyPrefix: 'dashboard' }); @@ -77,11 +78,7 @@ function organizationDashboard(): JSX.Element { }; if (loading || loadingPost || loadingEvent) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/OrganizationEvents/OrganizationEvents.module.css b/src/screens/OrganizationEvents/OrganizationEvents.module.css index 005cd0afd8..05a70c3fa3 100644 --- a/src/screens/OrganizationEvents/OrganizationEvents.module.css +++ b/src/screens/OrganizationEvents/OrganizationEvents.module.css @@ -177,12 +177,6 @@ border-bottom: 3px solid #31bb6b; width: 40%; } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} .titlemodal { color: #707070; font-weight: 600; @@ -192,21 +186,6 @@ form > label { border-bottom: 3px solid #31bb6b; width: 65%; } -form > input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .cancel > i { margin-top: 5px; transform: scale(1.2); diff --git a/src/screens/OrganizationEvents/OrganizationEvents.tsx b/src/screens/OrganizationEvents/OrganizationEvents.tsx index 1fa5b4f698..d36a3f6ac4 100644 --- a/src/screens/OrganizationEvents/OrganizationEvents.tsx +++ b/src/screens/OrganizationEvents/OrganizationEvents.tsx @@ -24,6 +24,7 @@ import { CREATE_EVENT_MUTATION } from 'GraphQl/Mutations/mutations'; import type { RootState } from 'state/reducers'; import dayjs from 'dayjs'; import { errorHandler } from 'utils/errorHandler'; +import Loader from 'components/Loader/Loader'; function organizationEvents(): JSX.Element { const { t } = useTranslation('translation', { @@ -125,11 +126,7 @@ function organizationEvents(): JSX.Element { }; if (loading || loading2) { - return ( - <> -
- - ); + return ; } /* istanbul ignore next */ diff --git a/src/screens/OrganizationPeople/OrganizationPeople.module.css b/src/screens/OrganizationPeople/OrganizationPeople.module.css index 3934b8e7a1..13972524d7 100644 --- a/src/screens/OrganizationPeople/OrganizationPeople.module.css +++ b/src/screens/OrganizationPeople/OrganizationPeople.module.css @@ -179,28 +179,6 @@ border-bottom: 3px solid #31bb6b; width: 40%; } -form > label { - font-weight: bold; - padding-bottom: 1px; - font-size: 14px; - color: #707070; -} - -form > input { - display: block; - margin-bottom: 20px; - border: 1px solid #e8e5e5; - box-shadow: 2px 1px #e8e5e5; - padding: 10px 20px; - border-radius: 5px; - background: none; - width: 100%; - transition: all 0.3s ease-in-out; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; -} .cancel > i { margin-top: 5px; transform: scale(1.2);