Cleanup unused code and simplify webpack

This commit is contained in:
Dane Everitt 2020-07-04 18:19:46 -07:00
parent 43fbefbdb6
commit 922383e232
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 135 additions and 855 deletions

View file

@ -66,9 +66,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
error ?
<ServerError message={error}/>
:
<div className={'flex justify-center m-20'}>
<Spinner size={'large'}/>
</div>
<Spinner size={'large'} centered/>
:
<>
<CSSTransition timeout={250} classNames={'fade'} appear={true} in={true}>

View file

@ -1,28 +0,0 @@
/*! purgecss start ignore */
.fade-enter, .fade-appear {
@apply .opacity-0;
}
.fade-enter-active, .fade-appear-active {
@apply .opacity-100;
transition: opacity 250ms;
}
.fade-exit {
@apply .opacity-100;
}
.fade-exit-active {
@apply .opacity-0;
transition: opacity 250ms;
}
/** @todo fix this, hides footer stuff */
div.route-transition-group {
@apply .relative;
& section {
@apply .absolute .w-full .top-0 .left-0;
}
}
/*! purgecss end ignore */

View file

@ -1,81 +0,0 @@
.filemanager {
& .header {
@apply .flex .text-xs .text-neutral-600 .pb-4 .font-bold .border-b .border-neutral-200 .mb-3 .uppercase;
& > div:not(:last-of-type) {
@apply .pr-4;
}
}
& .row {
@apply .flex .text-sm .py-3 .text-sm .border .border-transparent .text-black .rounded .no-underline;
& > div:not(:last-of-type) {
@apply .pr-4;
}
&.active-selection, &:hover {
@apply .bg-neutral-50 .text-neutral-900;
}
& > .icon {
@apply .w-8 .text-center;
& > svg {
@apply .h-4;
}
}
}
.context-menu {
@apply .absolute .bg-white .py-2 .border .border-neutral-300 .shadow-lg .rounded .text-neutral-600 .text-sm .cursor-pointer;
& > div:not(:last-of-type) {
@apply .border-b .border-neutral-100 .pb-2 .mb-2;
}
& .context-row {
@apply .flex .flex-row .items-center .py-2 .px-8 .mx-2 .rounded;
transition: background-color 50ms linear;
& > .icon {
@apply .flex-none;
& > svg {
@apply .h-4;
}
}
& > .action {
@apply .flex-auto .pl-2;
}
&:hover {
@apply .bg-neutral-50 .text-neutral-800;
}
&.danger {
@apply .border .border-transparent;
transition: border 50ms linear;
&:hover {
@apply .bg-red-50 .border-red-100;
}
}
}
}
}
.filemanager-breadcrumbs {
@apply .px-4 .py-3 .mb-6 .rounded .bg-white .text-neutral-400 .border .border-neutral-100 .shadow;
& a {
@apply .no-underline .text-neutral-400;
transition: color 100ms linear;
&:hover {
@apply .text-primary-500;
}
}
}

View file

@ -1,253 +0,0 @@
form {
@apply .m-0;
}
textarea, select, input, button {
@apply .outline-none;
}
button:focus, button:focus-visible {
@apply .outline-none;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield !important;
}
/**
* Styling for other forms throughout the Panel.
*/
.input:not(select), .input-dark:not(select) {
@apply .appearance-none .w-full;
min-width: 0;
&:required, &:invalid {
box-shadow: none;
}
}
.input:not(select) {
@apply .p-3 .rounded .border .border-neutral-200 .text-neutral-800;
transition: border 150ms linear;
&:focus {
@apply .border-primary-400;
}
&.error {
@apply .text-red-600 .border-red-500;
}
&:disabled {
@apply .bg-neutral-100 .border-neutral-200;
}
}
.input-dark:not(select) {
@apply .p-3 .bg-neutral-600 .border .border-neutral-500 .text-sm .rounded .text-neutral-200 .shadow-none;
transition: border 150ms linear, box-shaodw 150ms ease-in;
&:focus {
@apply .shadow-md .border-neutral-400;
}
&:hover {
@apply .border-neutral-400;
}
& + .input-help {
@apply .text-xs .text-neutral-400;
}
&.error + .input-help {
@apply .text-red-400 !important;
}
&:disabled {
@apply .opacity-75;
}
}
.has-error .input-dark:not(select), .input-dark.error {
@apply .text-red-100 .border-red-400;
}
.input-help {
@apply .text-xs .text-neutral-400 .pt-2;
&.error {
@apply .text-red-400 !important;
}
}
label {
@apply .block .text-xs .uppercase .text-neutral-700 .mb-2;
}
select:not(.appearance-none) {
@apply .shadow-none .block .p-3 .pr-8 .rounded .border .w-full .text-sm;
transition: border-color 150ms linear;
&, &:hover:not(:disabled), &:focus {
@apply .outline-none;
}
-webkit-appearance: none;
-moz-appearance: none;
background-size: 1rem;
background-repeat: no-repeat;
background-position-x: calc(100% - 0.75rem);
background-position-y: center;
&::-ms-expand {
display: none;
}
}
select.input:not(.appearance-none) {
@apply .bg-white .border-neutral-200 .text-neutral-400;
transition: color 150ms linear;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z'/%3e%3c/svg%3e ");
&:hover:not(:disabled), &:focus {
@apply .border-primary-500 .text-neutral-700;
}
}
select.input-dark:not(.appearance-none) {
@apply .bg-neutral-600 .border-neutral-500 .text-neutral-200;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='%23C3D1DF' d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z'/%3e%3c/svg%3e ");
background-color: hsl(220deg 21% 16%);
&:hover:not(:disabled), &:focus {
@apply .border-neutral-400;
}
}
.input-dark-label {
@apply .uppercase .text-neutral-200;
}
.input-label {
@apply .block .uppercase .tracking-wide .text-neutral-800 .text-xs .font-bold;
&:not(.mb-0) {
@apply .mb-2;
}
}
a.btn {
@apply .no-underline;
}
.btn {
@apply .rounded .p-2 .uppercase .tracking-wide .text-sm;
transition: all 150ms linear;
&.btn-secondary {
@apply .border .border-neutral-600 .bg-transparent .text-neutral-200;
&:hover:not(:disabled) {
@apply .border-neutral-500 .text-neutral-100;
}
&.btn-red:hover:not(:disabled) {
@apply .bg-red-500 .border-red-600 .text-red-50;
}
&.btn-green:hover:not(:disabled) {
@apply .bg-green-500 .border-green-600 .text-green-50;
}
}
&.btn-primary {
&:not(.btn-secondary) {
@apply .bg-primary-500 .border-primary-600 .border .text-primary-50;
}
&:hover:not(:disabled) {
@apply .bg-primary-600 .border-primary-700;
}
}
&.btn-grey {
@apply .border .border-neutral-600 .bg-neutral-500 .text-neutral-50;
&:hover:not(:disabled) {
@apply .bg-neutral-600 .border-neutral-700;
}
}
&.btn-green {
&:not(.btn-secondary) {
@apply .bg-green-500 .border-green-600 .border .text-green-50;
}
&:hover:not(:disabled), &.btn-secondary:active:not(:disabled) {
@apply .bg-green-600 .border-green-700;
}
}
&.btn-red {
&:not(.btn-secondary) {
@apply .bg-red-500 .border-red-600 .text-red-50;
}
&:hover:not(:disabled), &.btn-secondary:active:not(:disabled) {
@apply .bg-red-600 .border-red-700;
}
}
/**
* Button Sizes
*/
&.btn-jumbo {
@apply .p-4 .w-full;
}
&.btn-lg {
@apply .p-4 .text-sm;
}
&.btn-sm {
@apply .p-3;
}
&.btn-xs {
@apply .p-2 .text-xs;
}
&:disabled, &.disabled {
opacity: 0.55;
cursor: default;
}
}
input[type="checkbox"], input[type="radio"] {
@apply .cursor-pointer .appearance-none .inline-block .align-middle .select-none .flex-no-shrink .w-4 .h-4 .text-primary-400 .border .border-neutral-300 .rounded-sm;
color-adjust: exact;
background-origin: border-box;
transition: all 75ms linear, box-shadow 25ms linear;
&:checked {
@apply .border-transparent .bg-no-repeat .bg-center;
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");
background-color: currentColor;
background-size: 100% 100%;
}
&:focus {
@apply .outline-none .border-primary-300;
box-shadow: 0 0 0 1px rgba(9, 103, 210, 0.25);
}
}
input[type="radio"] {
@apply .rounded-full;
}

View file

@ -1,65 +0,0 @@
code.clean {
@apply .font-mono .px-2 .py-1;
background-color: #eef1f6;
color: #596981;
border-radius: 2px;
border: 1px solid rgba(0, 0, 0, .1);
display: inline-block;
}
.grey-row-box {
@apply .flex .rounded .no-underline .text-neutral-200 .items-center .bg-neutral-700 .p-4 .border .border-transparent;
transition: border-color 150ms linear;
&:not(.no-hover):hover {
@apply .border-neutral-500;
}
& > div.icon {
@apply .rounded-full .bg-neutral-500 .p-3;
}
}
.grey-box {
@apply .shadow-md .bg-neutral-700 .rounded .p-3 .flex .text-xs;
&:not(.mt-0) {
@apply .mt-4;
}
}
::-webkit-scrollbar {
background: none;
width: 16px;
height: 16px;
}
::-webkit-scrollbar-thumb {
border: solid 0 rgb(0 0 0 / 0%);
border-right-width: 4px;
border-left-width: 4px;
-webkit-border-radius: 9px 4px;
-webkit-box-shadow: inset 0 0 0 1px hsl(211, 10%, 53%), inset 0 0 0 4px hsl(209deg 18% 30%);
}
::-webkit-scrollbar-track-piece {
margin: 4px 0;
}
::-webkit-scrollbar-thumb:horizontal {
border-right-width: 0;
border-left-width: 0;
border-top-width: 4px;
border-bottom-width: 4px;
-webkit-border-radius: 4px 9px;
}
::-webkit-scrollbar-thumb:hover {
-webkit-box-shadow:
inset 0 0 0 1px hsl(212, 92%, 43%),
inset 0 0 0 4px hsl(212, 92%, 43%);
}
::-webkit-scrollbar-corner {
background: transparent;
}

View file

@ -1,51 +0,0 @@
.modal-mask {
@apply .fixed .pin .z-50 .overflow-auto .flex;
background: rgba(0, 0, 0, 0.70);
transition: opacity 250ms ease;
& > .modal-container {
@apply .relative .w-full .max-w-1/2 .m-auto .flex-col .flex;
&.top {
margin-top: 10%;
}
& > .modal-close-icon {
@apply .absolute .right-0 .p-2 .text-white .cursor-pointer .opacity-50;
transition: opacity 150ms linear, transform 150ms ease-in;
top: -2rem;
&:hover {
@apply .opacity-100;
transform: rotate(90deg);
}
}
& > .modal-content {
@apply .bg-neutral-800 .rounded .shadow-md .overflow-y-scroll;
max-height: calc(100vh - 16rem);
transition: all 250ms ease;
}
/**
* On tiny phone screens make sure there is a margin on the sides and also
* center the modal rather than putting it towards the top of the screen.
*/
@screen smx {
width: 90%;
.top {
margin-top: auto;
}
}
}
& > .modal-container.full-screen {
@apply .w-3/4;
height: calc(100vh - 16rem);
max-width: none;
}
& > .modal-container.w-auto {
@apply .w-auto;
}
}

View file

@ -1,69 +0,0 @@
#navigation {
@apply .w-full .bg-neutral-900 .shadow-md;
& > div {
@apply .mx-auto .w-full .flex .items-center;
}
& #logo {
@apply .flex-1;
& > a {
@apply .text-2xl .font-header .px-4 .no-underline .text-neutral-200;
transition: color 150ms linear;
&:hover {
@apply .text-neutral-100;
}
}
}
& .right-navigation {
@apply .flex .h-full .items-center .justify-center;
& > a, & > .navigation-link {
@apply .flex .items-center .h-full .no-underline .text-neutral-300 .px-6 .cursor-pointer;
transition: background-color 150ms linear, color 150ms linear, box-shadow 150ms ease-in;
/*! purgecss start ignore */
&.active, &:hover {
@apply .text-neutral-100 .bg-black;
box-shadow: inset 0 -2px config('colors.cyan-700');
}
&.active {
box-shadow: inset 0 -2px config('colors.cyan-500');
}
/*! purgecss end ignore */
}
}
}
#sub-navigation {
@apply .w-full .bg-neutral-700 .shadow;
.items {
@apply .flex .items-center .text-sm .mx-auto .px-2;
max-width: 1200px;
/*! purgecss start ignore */
& > a, & > div {
@apply .inline-block .py-3 .px-4 .text-neutral-300 .no-underline;
transition: color 150ms linear, box-shadow 150ms ease-in;
&:not(:first-of-type) {
@apply .ml-2;
}
&.active, &:hover {
@apply .text-neutral-100;
box-shadow: inset 0 -2px config('colors.cyan-700');
}
&.active {
box-shadow: inset 0 -2px config('colors.cyan-500');
}
}
/*! purgecss end ignore */
}
}

View file

@ -1,46 +0,0 @@
/**
* Styling to control alert boxes.
*/
.alert {
@apply .p-2 .border .items-center .leading-normal .rounded .flex .w-full .text-sm;
& > .title {
@apply .flex .rounded-full .uppercase .px-2 .py-1 .text-xs .font-bold .mr-3 .leading-none;
}
& > .message {
@apply .mr-2 .text-left .flex-auto;
}
&.error {
@apply .bg-red-600 .border-red-800 .text-red-50;
& > .title {
@apply .bg-red-500;
}
}
&.info {
@apply .bg-primary-600 .border-primary-800 .text-primary-50;
& > .title {
@apply .bg-primary-500;
}
}
&.success {
@apply .bg-green-600 .border-green-800 .text-green-50;
& > .title {
@apply .bg-green-500;
}
}
&.warning {
@apply .bg-yellow-600 .border-yellow-800 .text-yellow-50;
& > .title {
@apply .bg-yellow-500;
}
}
}

View file

@ -1,34 +0,0 @@
.spinner-circle {
@apply .w-8 .h-8;
border: 3px solid hsla(211, 12%, 43%, 0.2);
border-top-color: hsl(211, 12%, 43%);
border-radius: 50%;
animation: spin 1s cubic-bezier(0.55, 0.25, 0.25, 0.70) infinite;
&.spinner-sm {
@apply .w-4 .h-4 .border-2;
}
&.spinner-lg {
@apply .w-16 .h-16;
border-width: 6px;
}
&.spinner-blue {
border-style: solid;
border-color: hsla(212, 92%, 43%, 0.2);
border-top-color: hsl(212, 92%, 43%);
}
&.spinner-white {
border-style: solid;
border-color: rgba(255, 255, 255, 0.2);
border-top-color: rgb(255, 255, 255);
}
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}

View file

@ -1,17 +0,0 @@
@import url('//fonts.googleapis.com/css?family=Rubik:300,400,500&display=swap');
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans:500&display=swap');
body {
@apply .text-neutral-200;
letter-spacing: 0.015em;
}
h1, h2, h3, h4, h5, h6 {
@apply .font-medium;
letter-spacing: 0;
font-family: 'IBM Plex Sans', -apple-system, '"Roboto"', 'system-ui', 'sans-serif';
}
p {
@apply .text-neutral-200 .leading-snug;
}

View file

@ -1,32 +0,0 @@
/**
* Tailwind Preflight Classes
*/
@import "tailwindcss/preflight";
@import "tailwindcss/components";
@import "xterm/src/xterm.css";
/**
* Pterodactyl Specific CSS
*/
@import "components/typography.css";
@import "components/animations.css";
@import "components/forms.css";
@import "components/miscellaneous.css";
@import "components/modal.css";
@import "components/navigation.css";
@import "components/notifications.css";
@import "components/spinners.css";
@import "components/filemanager.css";
/**
* Tailwind Utilities
*/
@import "tailwindcss/utilities";
/**
* Assorted Other CSS
*/
body {
@apply .font-sans;
}