From 82cf070c06c33797b3d81b78440439859ad85e43 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 4 Jul 2020 15:05:44 -0700 Subject: [PATCH] Fix styling on 2fa codes modal --- .../dashboard/forms/SetupTwoFactorModal.tsx | 46 ++++++++++--------- .../components/elements/ConfirmationModal.tsx | 16 ++++--- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/resources/scripts/components/dashboard/forms/SetupTwoFactorModal.tsx b/resources/scripts/components/dashboard/forms/SetupTwoFactorModal.tsx index ff5eeec7f..d647bc407 100644 --- a/resources/scripts/components/dashboard/forms/SetupTwoFactorModal.tsx +++ b/resources/scripts/components/dashboard/forms/SetupTwoFactorModal.tsx @@ -9,6 +9,8 @@ import { ApplicationStore } from '@/state'; import { httpErrorToHuman } from '@/api/http'; import FlashMessageRender from '@/components/FlashMessageRender'; import Field from '@/components/elements/Field'; +import tw from 'twin.macro'; +import Button from '@/components/elements/Button'; interface Values { code: string; @@ -64,7 +66,7 @@ export default ({ onDismissed, ...props }: RequiredModalProps) => { .matches(/^(\d){6}$/, 'Authenticator code must be 6 digits.'), })} > - {({ isSubmitting, isValid }) => ( + {({ isSubmitting }) => ( { > {recoveryTokens.length > 0 ? <> -

Two-factor authentication enabled

-

+

Two-factor authentication enabled

+

Two-factor authentication has been enabled on your account. Should you loose access to - this device you'll need to use on of the codes displayed below in order to access your + this device you'll need to use on of the codes displayed below in order to access your account.

-

+

These codes will not be displayed again. Please take note of them now by storing them in a secure repository such as a password manager.

-
-                                {recoveryTokens.map(token => {token})}
+                            
+                                {recoveryTokens.map(token => {token})}
                             
-
- +
: -
- -
-
-
+ + +
+
+
{!token || !token.length ? : setLoading(false)} - className={'w-full h-full shadow-none rounded-0'} + css={tw`w-full h-full shadow-none rounded-none`} /> }
-
-
+
+
{ autoFocus={!loading} />
-
- +
diff --git a/resources/scripts/components/elements/ConfirmationModal.tsx b/resources/scripts/components/elements/ConfirmationModal.tsx index 127a43faa..050ceab73 100644 --- a/resources/scripts/components/elements/ConfirmationModal.tsx +++ b/resources/scripts/components/elements/ConfirmationModal.tsx @@ -1,5 +1,7 @@ import React from 'react'; import Modal, { RequiredModalProps } from '@/components/elements/Modal'; +import tw from 'twin.macro'; +import Button from '@/components/elements/Button'; type Props = { title: string; @@ -16,15 +18,15 @@ const ConfirmationModal = ({ title, appear, children, visible, buttonText, onCon showSpinnerOverlay={showSpinnerOverlay} onDismissed={() => onDismissed()} > -

{title}

-

{children}

-
- - + +
);