Skip to content

Commit 0ff60d8

Browse files
authored
Fix incorrect alignment on 2FA boxes due to incorrect TW breakpoints (pterodactyl#3914)
1 parent 5c229d6 commit 0ff60d8

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

resources/scripts/components/dashboard/AccountOverviewContainer.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ import MessageBox from '@/components/MessageBox';
1111
import { useLocation } from 'react-router-dom';
1212

1313
const Container = styled.div`
14-
${tw`flex flex-wrap`};
14+
${tw`flex flex-wrap`};
1515
16-
& > div {
17-
${tw`w-full`};
16+
& > div {
17+
${tw`w-full`};
1818
19-
${breakpoint('md')`
20-
width: calc(50% - 1rem);
21-
`}
19+
${breakpoint('sm')`
20+
width: calc(50% - 1rem);
21+
`}
2222
23-
${breakpoint('xl')`
24-
${tw`w-auto flex-1`};
25-
`}
26-
}
23+
${breakpoint('md')`
24+
${tw`w-auto flex-1`};
25+
`}
26+
}
2727
`;
2828

2929
export default () => {
@@ -36,21 +36,23 @@ export default () => {
3636
Your account must have two-factor authentication enabled in order to continue.
3737
</MessageBox>
3838
}
39-
<Container css={[ tw`mb-10`, state?.twoFactorRedirect ? tw`mt-4` : tw`mt-10` ]}>
39+
40+
<Container css={[ tw`lg:grid lg:grid-cols-3 mb-10`, state?.twoFactorRedirect ? tw`mt-4` : tw`mt-10` ]}>
4041
<ContentBox title={'Update Password'} showFlashes={'account:password'}>
4142
<UpdatePasswordForm/>
4243
</ContentBox>
4344
<ContentBox
44-
css={tw`mt-8 md:mt-0 md:ml-8`}
45+
css={tw`mt-8 sm:mt-0 sm:ml-8`}
4546
title={'Update Email Address'}
4647
showFlashes={'account:email'}
4748
>
4849
<UpdateEmailAddressForm/>
4950
</ContentBox>
50-
<ContentBox css={tw`lg:ml-8 mt-8 lg:mt-0`} title={'Configure Two Factor'}>
51+
<ContentBox css={tw`md:ml-8 mt-8 md:mt-0`} title={'Configure Two Factor'}>
5152
<ConfigureTwoFactorForm/>
5253
</ContentBox>
5354
</Container>
55+
5456
</PageContentBlock>
5557
);
5658
};

resources/scripts/theme.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { BreakpointFunction, createBreakpoint } from 'styled-components-breakpoi
33
type Breakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
44
export const breakpoint: BreakpointFunction<Breakpoints> = createBreakpoint<Breakpoints>({
55
xs: 0,
6-
sm: 576,
6+
sm: 640,
77
md: 768,
8-
lg: 992,
9-
xl: 1200,
8+
lg: 1024,
9+
xl: 1280,
1010
});

0 commit comments

Comments
 (0)