diff --git a/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx b/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx index 6c4e2c63d3..accd302567 100644 --- a/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx +++ b/services/web/frontend/js/features/compromised-password/components/compromised-password-root.tsx @@ -1,6 +1,7 @@ import useWaitForI18n from '@/shared/hooks/use-wait-for-i18n' import { Button } from 'react-bootstrap' import { Trans, useTranslation } from 'react-i18next' +import { Interstitial } from '@/shared/components/interstitial' export function CompromisedPasswordCard() { const { t } = useTranslation() @@ -11,29 +12,28 @@ export function CompromisedPasswordCard() { } return ( -
-
-

- {t('compromised_password')} -

-

- , - ]} - /> -

-
+ +

+ , + ]} + /> +

-
+ ) } diff --git a/services/web/frontend/js/shared/components/interstitial.tsx b/services/web/frontend/js/shared/components/interstitial.tsx new file mode 100644 index 0000000000..1ec1830098 --- /dev/null +++ b/services/web/frontend/js/shared/components/interstitial.tsx @@ -0,0 +1,27 @@ +import classNames from 'classnames' + +type InterstitialProps = { + className?: string + contentClassName?: string + children: React.ReactNode + showLogo: boolean + title?: string +} + +export function Interstitial({ + className, + contentClassName, + children, + showLogo, + title, +}: InterstitialProps) { + return ( +
+ {showLogo && ( + Overleaf + )} + {title &&

{title}

} +
{children}
+
+ ) +} diff --git a/services/web/frontend/stylesheets/components/interstitial.less b/services/web/frontend/stylesheets/components/interstitial.less new file mode 100644 index 0000000000..ac51759182 --- /dev/null +++ b/services/web/frontend/stylesheets/components/interstitial.less @@ -0,0 +1,22 @@ +.interstitial { + max-width: 400px; + padding: 24px; + margin: 0 auto; + background: @white; + display: flex; + flex-direction: column; + + .logo { + width: 130px; + margin: 0 auto; + } + + .btn { + width: 100%; + } + + .interstitial-header { + margin-top: 0; + margin-bottom: 4px; + } +} diff --git a/services/web/frontend/stylesheets/main-style.less b/services/web/frontend/stylesheets/main-style.less index 15f68041a6..5c56f96c5c 100644 --- a/services/web/frontend/stylesheets/main-style.less +++ b/services/web/frontend/stylesheets/main-style.less @@ -74,6 +74,7 @@ @import 'components/switcher.less'; @import 'components/stepper.less'; @import 'components/radio-chip.less'; +@import 'components/interstitial.less'; // Components w/ JavaScript @import 'components/modals.less'; diff --git a/services/web/frontend/stylesheets/modules/overleaf-integration.less b/services/web/frontend/stylesheets/modules/overleaf-integration.less index 5d972a19bd..971d89ae86 100644 --- a/services/web/frontend/stylesheets/modules/overleaf-integration.less +++ b/services/web/frontend/stylesheets/modules/overleaf-integration.less @@ -1,17 +1,6 @@ .onboarding-confirm-email { - max-width: 400px; - padding: 24px; - margin: 0 auto; - background: @white; - display: flex; - flex-direction: column; gap: 24px; - .logo { - width: 130px; - margin: 0 auto; - } - form { .text-danger { display: flex; @@ -155,17 +144,8 @@ } } -.compromised-password { - max-width: 400px; - padding: 24px; - margin: 0 auto; - background: @white; +.compromised-password-content { display: flex; flex-direction: column; gap: 12px; - - .compromised-password-header { - margin-top: 0; - margin-bottom: 4px; - } }