From 3509ca29b7bef21f9ea8ce80b2d3972df41f70f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Wed, 20 Jul 2022 16:00:55 +0200 Subject: [PATCH] Merge pull request #8910 from overleaf/ta-add-email-wider Wider Add Email Input GitOrigin-RevId: e0b3a8577754205ac12fbfb17e56eb1f844a5273 --- .../settings/components/emails/add-email.tsx | 88 ++++++++++--------- .../email-affiliated-with-institution.tsx | 1 - .../emails/add-email/university-name.tsx | 2 +- .../stylesheets/app/account-settings.less | 5 ++ 4 files changed, 53 insertions(+), 43 deletions(-) diff --git a/services/web/frontend/js/features/settings/components/emails/add-email.tsx b/services/web/frontend/js/features/settings/components/emails/add-email.tsx index 94ceb5efea..6cccca4dea 100644 --- a/services/web/frontend/js/features/settings/components/emails/add-email.tsx +++ b/services/web/frontend/js/features/settings/components/emails/add-email.tsx @@ -107,31 +107,31 @@ function AddEmail() { ) } - const InputCol = ( - - - - - - + const InputComponent = ( + <> + + + ) if (!isValidEmail(newEmail)) { return (
- {InputCol} - + -
{t('start_by_adding_your_email')}
+ {InputComponent} +
+
{t('start_by_adding_your_email')}
+
- + @@ -141,24 +141,17 @@ function AddEmail() { ) } + const isSsoAvailableForDomain = + newEmailMatchedDomain && ssoAvailableForDomain(newEmailMatchedDomain) + return ( - {InputCol} - {newEmailMatchedDomain && - ssoAvailableForDomain(newEmailMatchedDomain) ? ( - - - - - - ) : ( - <> - - + + + {InputComponent} + {!isSsoAvailableForDomain ? ( +
- - - - - + ) : null} + + + {!isSsoAvailableForDomain ? ( + + + + + + ) : ( + + +
+ - - - +
+
+ )} diff --git a/services/web/frontend/js/features/settings/components/emails/add-email/email-affiliated-with-institution.tsx b/services/web/frontend/js/features/settings/components/emails/add-email/email-affiliated-with-institution.tsx index 37ab6f1ae2..b0c04c38f9 100644 --- a/services/web/frontend/js/features/settings/components/emails/add-email/email-affiliated-with-institution.tsx +++ b/services/web/frontend/js/features/settings/components/emails/add-email/email-affiliated-with-institution.tsx @@ -7,7 +7,6 @@ function EmailAffiliatedWithInstitution({ onClick, ...props }: ButtonProps) { return (
{t('is_email_affiliated')} -
diff --git a/services/web/frontend/js/features/settings/components/emails/add-email/university-name.tsx b/services/web/frontend/js/features/settings/components/emails/add-email/university-name.tsx index 12c99b7fe2..2229edd7ff 100644 --- a/services/web/frontend/js/features/settings/components/emails/add-email/university-name.tsx +++ b/services/web/frontend/js/features/settings/components/emails/add-email/university-name.tsx @@ -10,7 +10,7 @@ function UniversityName({ name, onClick }: UniversityNameProps) { const { t } = useTranslation() return ( -

+

{name} {' '} diff --git a/services/web/frontend/stylesheets/app/account-settings.less b/services/web/frontend/stylesheets/app/account-settings.less index c824cc23f6..28f981473e 100644 --- a/services/web/frontend/stylesheets/app/account-settings.less +++ b/services/web/frontend/stylesheets/app/account-settings.less @@ -27,6 +27,11 @@ padding: 0.5rem; overflow-wrap: break-word; } +.affiliations-table-cell-tabbed { + margin: @margin-sm 0 0 @margin-md; + padding-left: @margin-sm; + border-left: 2px solid @table-border-color; +} .affiliations-table-row--highlighted { background-color: tint(@content-alt-bg-color, 6%); }