Somewhat get a max-width container working

This commit is contained in:
Matthew Penner 2020-08-22 16:49:18 -06:00
parent 6c53738070
commit a1115ff096
13 changed files with 250 additions and 14 deletions

View file

@ -0,0 +1,29 @@
import React from 'react';
import { CSSTransition } from 'react-transition-group';
import tw from 'twin.macro';
import FlashMessageRender from '@/components/FlashMessageRender';
const PageContentBlock: React.FC<{ showFlashKey?: string; className?: string }> = ({ children, showFlashKey }) => (
<CSSTransition timeout={150} classNames={'fade'} appear in>
<>
{showFlashKey &&
<FlashMessageRender byKey={showFlashKey} css={tw`mb-4`}/>
}
{children}
{/* <p css={tw`text-center text-neutral-500 text-xs mt-4`}>
&copy; 2015 - 2020&nbsp;
<a
rel={'noopener nofollow noreferrer'}
href={'https://pterodactyl.io'}
target={'_blank'}
css={tw`no-underline text-neutral-500 hover:text-neutral-300`}
>
Pterodactyl Software
</a>
</p> */}
</>
</CSSTransition>
);
export default PageContentBlock;

View file

@ -0,0 +1,46 @@
import React, { useState } from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
import Button from '@/components/elements/Button';
import Spinner from '@/components/elements/Spinner';
export default () => {
const [ loading ] = useState<boolean>(false);
const [ keys ] = useState<any[]>([]);
return (
<AdminContentBlock>
<div css={tw`w-full flex flex-row items-center mb-8`}>
<div css={tw`flex flex-col`}>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>API Keys</h2>
<p css={tw`text-base text-neutral-400`}>Control access credentials for managing this Panel via the API.</p>
</div>
<Button type={'button'} size={'large'} css={tw`h-10 ml-auto px-4 py-0`}>
New API Key
</Button>
</div>
<div css={tw`w-full flex flex-col`}>
<div css={tw`w-full flex flex-col bg-neutral-700 rounded-lg shadow-md`}>
{ loading ?
<div css={tw`w-full flex flex-col items-center justify-center`} style={{ height: '24rem' }}>
<Spinner/>
</div>
:
keys.length < 1 ?
<div css={tw`w-full flex flex-col items-center justify-center pb-6 py-2 sm:py-8 md:py-10 px-8`}>
<div css={tw`h-64 flex`}>
<img src={'/assets/svgs/not_found.svg'} alt={'No Items'} css={tw`h-full`}/>
</div>
<p css={tw`text-xl text-neutral-400 text-center font-normal sm:mt-8`}>No items could be found, it&apos;s almost like they are hiding.</p>
</div>
:
null
}
</div>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,21 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
import Button from '@/components/elements/Button';
export default () => {
return (
<AdminContentBlock>
<div css={tw`w-full flex flex-row items-center`}>
<div css={tw`flex flex-col`}>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Databases</h2>
<p css={tw`text-base text-neutral-400`}>Database hosts that servers can have databases created on.</p>
</div>
<Button type={'button'} size={'large'} css={tw`h-10 ml-auto px-4 py-0`}>
New Database
</Button>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,21 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
import Button from '@/components/elements/Button';
export default () => {
return (
<AdminContentBlock>
<div css={tw`w-full flex flex-row items-center`}>
<div css={tw`flex flex-col`}>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Locations</h2>
<p css={tw`text-base text-neutral-400`}>All locations that nodes can be assigned to for easier categorization.</p>
</div>
<Button type={'button'} size={'large'} css={tw`h-10 ml-auto px-4 py-0`}>
New Location
</Button>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Mounts</h2>
<p css={tw`text-base text-neutral-400`}>SoonTM</p>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Nests</h2>
<p css={tw`text-base text-neutral-400`}>All nests currently available on this system.</p>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Nodes</h2>
<p css={tw`text-base text-neutral-400`}>All nodes available on the system.</p>
</div>
</AdminContentBlock>
);
};

View file

@ -1,7 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<h1>Overview</h1>
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Overview</h2>
<p css={tw`text-base text-neutral-400`}>A quick glance at your system.</p>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Packs</h2>
<p css={tw`text-base text-neutral-400`}>All service packs available on the system.</p>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Servers</h2>
<p css={tw`text-base text-neutral-400`}>All servers available on the system.</p>
</div>
</AdminContentBlock>
);
};

View file

@ -1,7 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<h1>Settings</h1>
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Settings</h2>
<p css={tw`text-base text-neutral-400`}>Configure and manage settings for Pterodactyl.</p>
</div>
</AdminContentBlock>
);
};

View file

@ -0,0 +1,14 @@
import React from 'react';
import tw from 'twin.macro';
import AdminContentBlock from '@/components/admin/AdminContentBlock';
export default () => {
return (
<AdminContentBlock>
<div>
<h2 css={tw`text-2xl text-neutral-50 font-header font-medium`}>Users</h2>
<p css={tw`text-base text-neutral-400`}>All registered users on the system.</p>
</div>
</AdminContentBlock>
);
};