File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed
resources/scripts/components Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,13 @@ export default () => {
1010
1111 return user . useTotp ?
1212 < div >
13- { visible && < DisableTwoFactorModal visible = { visible } onDismissed = { ( ) => setVisible ( false ) } /> }
13+ { visible &&
14+ < DisableTwoFactorModal
15+ appear = { true }
16+ visible = { visible }
17+ onDismissed = { ( ) => setVisible ( false ) }
18+ />
19+ }
1420 < p className = { 'text-sm' } >
1521 Two-factor authentication is currently enabled on your account.
1622 </ p >
@@ -25,7 +31,13 @@ export default () => {
2531 </ div >
2632 :
2733 < div >
28- { visible && < SetupTwoFactorModal visible = { visible } onDismissed = { ( ) => setVisible ( false ) } /> }
34+ { visible &&
35+ < SetupTwoFactorModal
36+ appear = { true }
37+ visible = { visible }
38+ onDismissed = { ( ) => setVisible ( false ) }
39+ />
40+ }
2941 < p className = { 'text-sm' } >
3042 You do not currently have two-factor authentication enabled on your account. Click
3143 the button below to begin configuring it.
Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ export default ({ ...props }: RequiredModalProps) => {
6363 >
6464 < Form className = { 'mb-0' } >
6565 < FlashMessageRender className = { 'mb-6' } byKey = { 'account:two-factor' } />
66- < div className = { 'flex' } >
67- < div className = { 'flex-1' } >
68- < div className = { 'w-64 h-64 bg-neutral-600 p-2 rounded' } >
66+ < div className = { 'flex flex-wrap ' } >
67+ < div className = { 'w-full md: flex-1' } >
68+ < div className = { 'w-32 h-32 md:w- 64 md:w-64 bg-neutral-600 p-2 rounded mx-auto ' } >
6969 { ! token || ! token . length ?
7070 < img
7171 src = { 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' }
@@ -80,7 +80,7 @@ export default ({ ...props }: RequiredModalProps) => {
8080 }
8181 </ div >
8282 </ div >
83- < div className = { 'flex-1 flex flex-col' } >
83+ < div className = { 'w-full mt-6 md:mt-0 md: flex-1 md: flex md: flex-col' } >
8484 < div className = { 'flex-1' } >
8585 < Field
8686 id = { 'code' }
@@ -91,7 +91,7 @@ export default ({ ...props }: RequiredModalProps) => {
9191 autoFocus = { ! loading }
9292 />
9393 </ div >
94- < div className = { 'text-right' } >
94+ < div className = { 'mt-6 md:mt-0 text-right' } >
9595 < button className = { 'btn btn-primary btn-sm' } disabled = { ! isValid } >
9696 Setup
9797 </ button >
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import Spinner from '@/components/elements/Spinner';
77export interface RequiredModalProps {
88 visible : boolean ;
99 onDismissed : ( ) => void ;
10+ appear ?: boolean ;
1011}
1112
1213type Props = RequiredModalProps & {
@@ -38,6 +39,7 @@ export default (props: Props) => {
3839 < CSSTransition
3940 timeout = { 250 }
4041 classNames = { 'fade' }
42+ appear = { props . appear }
4143 in = { render }
4244 unmountOnExit = { true }
4345 onExited = { ( ) => props . onDismissed ( ) }
You can’t perform that action at this time.
0 commit comments