Skip to content

Commit 1e08f7d

Browse files
authored
Merge pull request pterodactyl#2454 from zKoz210/patch-1
Fixed phantom shadow when opening modal window
2 parents 2041bc0 + 2f5e080 commit 1e08f7d

File tree

8 files changed

+15
-33
lines changed

8 files changed

+15
-33
lines changed

resources/scripts/components/auth/ForgotPasswordContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export default () => {
9494
}
9595
<div css={tw`mt-6 text-center`}>
9696
<Link
97-
type={'button'}
9897
to={'/auth/login'}
9998
css={tw`text-xs text-neutral-500 tracking-wide uppercase no-underline hover:text-neutral-700`}
10099
>

resources/scripts/components/dashboard/AccountApiContainer.tsx

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,8 @@ import { httpErrorToHuman } from '@/api/http';
1414
import { format } from 'date-fns';
1515
import PageContentBlock from '@/components/elements/PageContentBlock';
1616
import tw from 'twin.macro';
17-
import { breakpoint } from '@/theme';
18-
import styled from 'styled-components/macro';
1917
import GreyRowBox from '@/components/elements/GreyRowBox';
2018

21-
const Container = styled.div`
22-
${tw`flex flex-wrap my-10`};
23-
24-
& > div {
25-
${tw`w-full`};
26-
27-
${breakpoint('md')`
28-
width: calc(50% - 1rem);
29-
`}
30-
31-
${breakpoint('xl')`
32-
${tw`w-auto flex-1`};
33-
`}
34-
}
35-
`;
36-
3719
export default () => {
3820
const [ deleteIdentifier, setDeleteIdentifier ] = useState('');
3921
const [ keys, setKeys ] = useState<ApiKey[]>([]);
@@ -67,12 +49,12 @@ export default () => {
6749

6850
return (
6951
<PageContentBlock title={'Account API'}>
70-
<FlashMessageRender byKey={'account'} css={tw`mb-4`}/>
71-
<Container>
72-
<ContentBox title={'Create API Key'}>
52+
<FlashMessageRender byKey={'account'}/>
53+
<div css={tw`md:flex flex-no-wrap my-10`}>
54+
<ContentBox title={'Create API Key'} css={tw`flex-none w-full md:w-1/2`}>
7355
<CreateApiKeyForm onKeyCreated={key => setKeys(s => ([ ...s!, key ]))}/>
7456
</ContentBox>
75-
<ContentBox title={'API Keys'} css={tw`mt-8 md:mt-0 md:ml-8`}>
57+
<ContentBox title={'API Keys'} css={tw`flex-1 overflow-hidden mt-8 md:mt-0 md:ml-8`}>
7658
<SpinnerOverlay visible={loading}/>
7759
<ConfirmationModal
7860
visible={!!deleteIdentifier}
@@ -99,14 +81,14 @@ export default () => {
9981
css={[ tw`bg-neutral-600 flex items-center`, index > 0 && tw`mt-2` ]}
10082
>
10183
<FontAwesomeIcon icon={faKey} css={tw`text-neutral-300`}/>
102-
<div css={tw`ml-4 flex-1`}>
103-
<p css={tw`text-sm`}>{key.description}</p>
84+
<div css={tw`ml-4 flex-1 overflow-hidden`}>
85+
<p css={tw`text-sm break-words`}>{key.description}</p>
10486
<p css={tw`text-2xs text-neutral-300 uppercase`}>
10587
Last used:&nbsp;
10688
{key.lastUsedAt ? format(key.lastUsedAt, 'MMM do, yyyy HH:mm') : 'Never'}
10789
</p>
10890
</div>
109-
<p css={tw`text-sm ml-4`}>
91+
<p css={tw`text-sm ml-4 hidden md:block`}>
11092
<code css={tw`font-mono py-1 px-2 bg-neutral-900 rounded`}>
11193
{key.identifier}
11294
</code>
@@ -124,7 +106,7 @@ export default () => {
124106
))
125107
}
126108
</ContentBox>
127-
</Container>
109+
</div>
128110
</PageContentBlock>
129111
);
130112
};

resources/scripts/components/dashboard/forms/SetupTwoFactorModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export default ({ onDismissed, ...props }: RequiredModalProps) => {
6969
{({ isSubmitting }) => (
7070
<Modal
7171
{...props}
72+
top={false}
7273
onDismissed={dismiss}
7374
dismissable={!isSubmitting}
7475
showSpinnerOverlay={loading || isSubmitting}

resources/scripts/components/elements/Modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const ModalContainer = styled.div<{ alignTop?: boolean }>`
3636
${breakpoint('md')`margin-top: 10%`};
3737
`};
3838
39-
margin-bottom: 5%;
39+
margin-bottom: auto;
4040
4141
& > .close-icon {
4242
${tw`absolute right-0 p-2 text-white cursor-pointer opacity-50 transition-all duration-150 ease-linear hover:opacity-100`};

resources/scripts/components/server/backups/BackupRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default ({ backup, className }: Props) => {
5656
Failed
5757
</span>
5858
}
59-
<p css={tw`break-all truncate`}>
59+
<p css={tw`break-words truncate`}>
6060
{backup.name}
6161
</p>
6262
{(backup.completedAt && backup.isSuccessful) &&

resources/scripts/components/server/files/FileObjectRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const FileObjectRow = ({ file }: { file: FileObject }) => (
6969
<FontAwesomeIcon icon={faFolder}/>
7070
}
7171
</div>
72-
<div css={tw`flex-1 break-all truncate`}>
72+
<div css={tw`flex-1 truncate`}>
7373
{file.name}
7474
</div>
7575
{file.isFile &&

resources/scripts/components/server/network/AllocationRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import setServerAllocationNotes from '@/api/server/network/setServerAllocationNo
1515
import useFlash from '@/plugins/useFlash';
1616
import { ServerContext } from '@/state/server';
1717

18-
const Code = styled.code`${tw`font-mono py-1 px-2 bg-neutral-900 rounded text-sm inline-block break-all`}`;
18+
const Code = styled.code`${tw`font-mono py-1 px-2 bg-neutral-900 rounded text-sm inline-block`}`;
1919
const Label = styled.label`${tw`uppercase text-xs mt-1 text-neutral-400 block px-1 select-none transition-colors duration-150`}`;
2020

2121
interface Props {

resources/scripts/components/server/users/UserRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export default ({ subuser }: Props) => {
3030
<div css={tw`w-10 h-10 rounded-full bg-white border-2 border-neutral-800 overflow-hidden hidden md:block`}>
3131
<img css={tw`w-full h-full`} src={`${subuser.image}?s=400`}/>
3232
</div>
33-
<div css={tw`ml-4 flex-1`}>
34-
<p css={tw`text-sm break-all`}>{subuser.email}</p>
33+
<div css={tw`ml-4 flex-1 overflow-hidden`}>
34+
<p css={tw`text-sm truncate`}>{subuser.email}</p>
3535
</div>
3636
<div css={tw`ml-4`}>
3737
<p css={tw`font-medium text-center`}>

0 commit comments

Comments
 (0)