chore: run prettier
This commit is contained in:
parent
9cdbbc3a00
commit
155d7bb876
76 changed files with 788 additions and 550 deletions
|
@ -35,20 +35,20 @@ export default () => {
|
|||
<ServerContentBlock title={'Activity Log'}>
|
||||
<FlashMessageRender byKey={'server:activity'} />
|
||||
{(filters.filters?.event || filters.filters?.ip) && (
|
||||
<div className={'flex justify-end mb-2'}>
|
||||
<div className={'mb-2 flex justify-end'}>
|
||||
<Link
|
||||
to={'#'}
|
||||
className={classNames(btnStyles.button, btnStyles.text, 'w-full sm:w-auto')}
|
||||
onClick={() => setFilters(value => ({ ...value, filters: {} }))}
|
||||
>
|
||||
Clear Filters <XCircleIcon className={'w-4 h-4 ml-2'} />
|
||||
Clear Filters <XCircleIcon className={'ml-2 h-4 w-4'} />
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
{!data && isValidating ? (
|
||||
<Spinner centered />
|
||||
) : !data?.items.length ? (
|
||||
<p className={'text-sm text-center text-slate-400'}>No activity logs available for this server.</p>
|
||||
<p className={'text-center text-sm text-slate-400'}>No activity logs available for this server.</p>
|
||||
) : (
|
||||
<div className={'bg-slate-700'}>
|
||||
{data?.items.map(activity => (
|
||||
|
|
|
@ -12,7 +12,7 @@ export default ({ title, legend, children }: ChartBlockProps) => (
|
|||
<div className={classNames(styles.chart_container, 'group')}>
|
||||
<div className={'flex items-center justify-between px-4 py-2'}>
|
||||
<h3 className={'font-header transition-colors duration-100 group-hover:text-slate-50'}>{title}</h3>
|
||||
{legend && <p className={'text-sm flex items-center'}>{legend}</p>}
|
||||
{legend && <p className={'flex items-center text-sm'}>{legend}</p>}
|
||||
</div>
|
||||
<div className={'z-10 ml-2'}>{children}</div>
|
||||
</div>
|
||||
|
|
|
@ -232,11 +232,11 @@ export default () => {
|
|||
/>
|
||||
<div
|
||||
className={classNames(
|
||||
'text-slate-100 peer-focus:text-slate-50 peer-focus:animate-pulse',
|
||||
'text-slate-100 peer-focus:animate-pulse peer-focus:text-slate-50',
|
||||
styles.command_icon,
|
||||
)}
|
||||
>
|
||||
<ChevronDoubleRightIcon className={'w-4 h-4'} />
|
||||
<ChevronDoubleRightIcon className={'h-4 w-4'} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -33,26 +33,26 @@ function ServerConsoleContainer() {
|
|||
: 'This server is currently being transferred to another node and all actions are unavailable.'}
|
||||
</Alert>
|
||||
)}
|
||||
<div className={'grid grid-cols-4 gap-4 mb-4'}>
|
||||
<div className={'hidden sm:block sm:col-span-2 lg:col-span-3 pr-4'}>
|
||||
<h1 className={'font-header text-2xl text-slate-50 leading-relaxed line-clamp-1'}>{name}</h1>
|
||||
<div className={'mb-4 grid grid-cols-4 gap-4'}>
|
||||
<div className={'hidden pr-4 sm:col-span-2 sm:block lg:col-span-3'}>
|
||||
<h1 className={'font-header text-2xl leading-relaxed text-slate-50 line-clamp-1'}>{name}</h1>
|
||||
<p className={'text-sm line-clamp-2'}>{description}</p>
|
||||
</div>
|
||||
<div className={'col-span-4 sm:col-span-2 lg:col-span-1 self-end'}>
|
||||
<div className={'col-span-4 self-end sm:col-span-2 lg:col-span-1'}>
|
||||
<Can action={['control.start', 'control.stop', 'control.restart']} matchAny>
|
||||
<PowerButtons className={'flex sm:justify-end space-x-2'} />
|
||||
<PowerButtons className={'flex space-x-2 sm:justify-end'} />
|
||||
</Can>
|
||||
</div>
|
||||
</div>
|
||||
<div className={'grid grid-cols-4 gap-2 sm:gap-4 mb-4'}>
|
||||
<div className={'flex col-span-4 lg:col-span-3'}>
|
||||
<div className={'mb-4 grid grid-cols-4 gap-2 sm:gap-4'}>
|
||||
<div className={'col-span-4 flex lg:col-span-3'}>
|
||||
<Spinner.Suspense>
|
||||
<Console />
|
||||
</Spinner.Suspense>
|
||||
</div>
|
||||
<ServerDetailsBlock className={'col-span-4 lg:col-span-1 order-last lg:order-none'} />
|
||||
<ServerDetailsBlock className={'order-last col-span-4 lg:order-none lg:col-span-1'} />
|
||||
</div>
|
||||
<div className={'grid grid-cols-1 md:grid-cols-3 gap-2 sm:gap-4'}>
|
||||
<div className={'grid grid-cols-1 gap-2 sm:gap-4 md:grid-cols-3'}>
|
||||
<Spinner.Suspense>
|
||||
<StatGraphs />
|
||||
</Spinner.Suspense>
|
||||
|
|
|
@ -38,7 +38,7 @@ function Limit({ limit, children }: { limit: string | null; children: ReactNode
|
|||
return (
|
||||
<>
|
||||
{children}
|
||||
<span className={'ml-1 text-slate-300 text-[70%] select-none'}>/ {limit || <>∞</>}</span>
|
||||
<span className={'ml-1 select-none text-[70%] text-slate-300'}>/ {limit || <>∞</>}</span>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -33,11 +33,11 @@ function StatBlock({ title, copyOnClick, icon, color, className, children }: Sta
|
|||
})}
|
||||
/>
|
||||
</div>
|
||||
<div className={'flex flex-col justify-center overflow-hidden w-full'}>
|
||||
<p className={'font-header leading-tight text-xs md:text-sm text-slate-200'}>{title}</p>
|
||||
<div className={'flex w-full flex-col justify-center overflow-hidden'}>
|
||||
<p className={'font-header text-xs leading-tight text-slate-200 md:text-sm'}>{title}</p>
|
||||
<div
|
||||
ref={ref}
|
||||
className={'h-[1.75rem] w-full font-semibold text-slate-50 truncate'}
|
||||
className={'h-[1.75rem] w-full truncate font-semibold text-slate-50'}
|
||||
style={{ fontSize }}
|
||||
>
|
||||
{children}
|
||||
|
|
|
@ -79,10 +79,10 @@ export default () => {
|
|||
legend={
|
||||
<>
|
||||
<Tooltip arrow content={'Inbound'}>
|
||||
<CloudDownloadIcon className={'mr-2 w-4 h-4 text-yellow-400'} />
|
||||
<CloudDownloadIcon className={'mr-2 h-4 w-4 text-yellow-400'} />
|
||||
</Tooltip>
|
||||
<Tooltip arrow content={'Outbound'}>
|
||||
<CloudUploadIcon className={'w-4 h-4 text-cyan-400'} />
|
||||
<CloudUploadIcon className={'h-4 w-4 text-cyan-400'} />
|
||||
</Tooltip>
|
||||
</>
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ export default () => {
|
|||
return (
|
||||
<ServerContentBlock title={'File Manager'} showFlashKey={'files'}>
|
||||
<ErrorBoundary>
|
||||
<div className={'flex flex-wrap-reverse md:flex-nowrap mb-4'}>
|
||||
<div className={'mb-4 flex flex-wrap-reverse md:flex-nowrap'}>
|
||||
<FileManagerBreadcrumbs
|
||||
renderLeft={
|
||||
<FileActionCheckbox
|
||||
|
|
|
@ -25,7 +25,7 @@ const Spinner = ({ progress, className }: { progress: number; className?: string
|
|||
{...svgProps}
|
||||
stroke={'white'}
|
||||
strokeDasharray={28 * Math.PI}
|
||||
className={'rotate-[-90deg] origin-[50%_50%] transition-[stroke-dashoffset] duration-300'}
|
||||
className={'origin-[50%_50%] rotate-[-90deg] transition-[stroke-dashoffset] duration-300'}
|
||||
style={{ strokeDashoffset: ((100 - progress) / 100) * 28 * Math.PI }}
|
||||
/>
|
||||
</svg>
|
||||
|
@ -40,20 +40,20 @@ const FileUploadList = () => {
|
|||
);
|
||||
|
||||
return (
|
||||
<div className={'space-y-2 mt-6'}>
|
||||
<div className={'mt-6 space-y-2'}>
|
||||
{uploads.map(([name, file]) => (
|
||||
<div key={name} className={'flex items-center space-x-3 bg-slate-700 p-3 rounded'}>
|
||||
<div key={name} className={'flex items-center space-x-3 rounded bg-slate-700 p-3'}>
|
||||
<Tooltip content={`${Math.floor((file.loaded / file.total) * 100)}%`} placement={'left'}>
|
||||
<div className={'flex-shrink-0'}>
|
||||
<Spinner progress={(file.loaded / file.total) * 100} className={'w-6 h-6'} />
|
||||
<Spinner progress={(file.loaded / file.total) * 100} className={'h-6 w-6'} />
|
||||
</div>
|
||||
</Tooltip>
|
||||
<Code className={'flex-1 truncate'}>{name}</Code>
|
||||
<button
|
||||
onClick={cancelFileUpload.bind(this, name)}
|
||||
className={'text-slate-500 hover:text-slate-200 transition-colors duration-75'}
|
||||
className={'text-slate-500 transition-colors duration-75 hover:text-slate-200'}
|
||||
>
|
||||
<XIcon className={'w-5 h-5'} />
|
||||
<XIcon className={'h-5 w-5'} />
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
|
@ -92,11 +92,11 @@ export default () => {
|
|||
{count > 0 && (
|
||||
<Tooltip content={`${count} files are uploading, click to view`}>
|
||||
<button
|
||||
className={'flex items-center justify-center w-10 h-10'}
|
||||
className={'flex h-10 w-10 items-center justify-center'}
|
||||
onClick={() => (open.value = true)}
|
||||
>
|
||||
<Spinner progress={(progress.uploaded / progress.total) * 100} className={'w-8 h-8'} />
|
||||
<CloudUploadIcon className={'h-3 absolute mx-auto animate-pulse'} />
|
||||
<Spinner progress={(progress.uploaded / progress.total) * 100} className={'h-8 w-8'} />
|
||||
<CloudUploadIcon className={'absolute mx-auto h-3 animate-pulse'} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
|
|
@ -62,7 +62,7 @@ const MassActionsBar = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div className="pointer-events-none fixed bottom-0 z-20 left-0 right-0 flex justify-center">
|
||||
<div className="pointer-events-none fixed bottom-0 left-0 right-0 z-20 flex justify-center">
|
||||
<SpinnerOverlay visible={loading} size={'large'} fixed>
|
||||
{loadingMessage}
|
||||
</SpinnerOverlay>
|
||||
|
@ -93,9 +93,9 @@ const MassActionsBar = () => {
|
|||
/>
|
||||
)}
|
||||
<Portal>
|
||||
<div className="fixed bottom-0 mb-6 flex justify-center w-full z-50">
|
||||
<div className="fixed bottom-0 z-50 mb-6 flex w-full justify-center">
|
||||
<FadeTransition duration="duration-75" show={selectedFiles.length > 0} appear unmount>
|
||||
<div className="flex items-center space-x-4 pointer-events-auto rounded p-4 bg-black/50">
|
||||
<div className="pointer-events-auto flex items-center space-x-4 rounded bg-black/50 p-4">
|
||||
<Button onClick={() => setShowMove(true)}>Move</Button>
|
||||
<Button onClick={onClickCompress}>Archive</Button>
|
||||
<Button.Danger variant={Button.Variants.Secondary} onClick={() => setShowConfirm(true)}>
|
||||
|
|
|
@ -120,14 +120,14 @@ export default ({ className }: WithClassname) => {
|
|||
onFileSubmission(e.dataTransfer.files);
|
||||
}}
|
||||
>
|
||||
<div className={'w-full flex items-center justify-center pointer-events-none'}>
|
||||
<div className={'pointer-events-none flex w-full items-center justify-center'}>
|
||||
<div
|
||||
className={
|
||||
'flex items-center space-x-4 bg-black w-full ring-4 ring-blue-200 ring-opacity-60 rounded p-6 mx-10 max-w-sm'
|
||||
'mx-10 flex w-full max-w-sm items-center space-x-4 rounded bg-black p-6 ring-4 ring-blue-200 ring-opacity-60'
|
||||
}
|
||||
>
|
||||
<CloudUploadIcon className={'w-10 h-10 flex-shrink-0'} />
|
||||
<p className={'font-header flex-1 text-lg text-neutral-100 text-center'}>
|
||||
<CloudUploadIcon className={'h-10 w-10 flex-shrink-0'} />
|
||||
<p className={'flex-1 text-center font-header text-lg text-neutral-100'}>
|
||||
Drag and drop files to upload.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -60,8 +60,8 @@ const AllocationRow = ({ allocation }: Props) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<GreyRowBox $hoverable={false} className={'flex-wrap md:flex-nowrap mt-2'}>
|
||||
<div className={'flex items-center w-full md:w-auto'}>
|
||||
<GreyRowBox $hoverable={false} className={'mt-2 flex-wrap md:flex-nowrap'}>
|
||||
<div className={'flex w-full items-center md:w-auto'}>
|
||||
<div className={'pl-4 pr-6 text-neutral-400'}>
|
||||
<FontAwesomeIcon icon={faNetworkWired} />
|
||||
</div>
|
||||
|
@ -79,24 +79,24 @@ const AllocationRow = ({ allocation }: Props) => {
|
|||
)}
|
||||
<Label>{allocation.alias ? 'Hostname' : 'IP Address'}</Label>
|
||||
</div>
|
||||
<div className={'w-16 md:w-24 overflow-hidden'}>
|
||||
<div className={'w-16 overflow-hidden md:w-24'}>
|
||||
<Code dark>{allocation.port}</Code>
|
||||
<Label>Port</Label>
|
||||
</div>
|
||||
</div>
|
||||
<div className={'mt-4 w-full md:mt-0 md:flex-1 md:w-auto'}>
|
||||
<div className={'mt-4 w-full md:mt-0 md:w-auto md:flex-1'}>
|
||||
<InputSpinner visible={loading}>
|
||||
<Textarea
|
||||
className={'bg-neutral-800 hover:border-neutral-600 border-transparent'}
|
||||
className={'border-transparent bg-neutral-800 hover:border-neutral-600'}
|
||||
placeholder={'Notes'}
|
||||
defaultValue={allocation.notes || undefined}
|
||||
onChange={e => setAllocationNotes(e.currentTarget.value)}
|
||||
/>
|
||||
</InputSpinner>
|
||||
</div>
|
||||
<div className={'flex justify-end space-x-4 mt-4 w-full md:mt-0 md:w-48'}>
|
||||
<div className={'mt-4 flex w-full justify-end space-x-4 md:mt-0 md:w-48'}>
|
||||
{allocation.isDefault ? (
|
||||
<Button size={Button.Sizes.Small} className={'!text-slate-50 !bg-blue-600'} disabled>
|
||||
<Button size={Button.Sizes.Small} className={'!bg-blue-600 !text-slate-50'} disabled>
|
||||
Primary
|
||||
</Button>
|
||||
) : (
|
||||
|
|
|
@ -50,7 +50,7 @@ export default ({ scheduleId, onDeleted }: Props) => {
|
|||
</Dialog.Confirm>
|
||||
<Button.Danger
|
||||
variant={Button.Variants.Secondary}
|
||||
className={'flex-1 sm:flex-none mr-4 border-transparent'}
|
||||
className={'mr-4 flex-1 border-transparent sm:flex-none'}
|
||||
onClick={() => setVisible(true)}
|
||||
>
|
||||
Delete
|
||||
|
|
|
@ -8,25 +8,25 @@ interface Props {
|
|||
|
||||
const ScheduleCronRow = ({ cron, className }: Props) => (
|
||||
<div className={classNames('flex', className)}>
|
||||
<div className={'w-1/5 sm:w-auto text-center'}>
|
||||
<div className={'w-1/5 text-center sm:w-auto'}>
|
||||
<p className={'font-medium'}>{cron.minute}</p>
|
||||
<p className={'text-2xs text-neutral-500 uppercase'}>Minute</p>
|
||||
<p className={'text-2xs uppercase text-neutral-500'}>Minute</p>
|
||||
</div>
|
||||
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
||||
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
||||
<p className={'font-medium'}>{cron.hour}</p>
|
||||
<p className={'text-2xs text-neutral-500 uppercase'}>Hour</p>
|
||||
<p className={'text-2xs uppercase text-neutral-500'}>Hour</p>
|
||||
</div>
|
||||
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
||||
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
||||
<p className={'font-medium'}>{cron.dayOfMonth}</p>
|
||||
<p className={'text-2xs text-neutral-500 uppercase'}>Day (Month)</p>
|
||||
<p className={'text-2xs uppercase text-neutral-500'}>Day (Month)</p>
|
||||
</div>
|
||||
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
||||
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
||||
<p className={'font-medium'}>{cron.month}</p>
|
||||
<p className={'text-2xs text-neutral-500 uppercase'}>Month</p>
|
||||
<p className={'text-2xs uppercase text-neutral-500'}>Month</p>
|
||||
</div>
|
||||
<div className={'w-1/5 sm:w-auto text-center ml-4'}>
|
||||
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
||||
<p className={'font-medium'}>{cron.dayOfWeek}</p>
|
||||
<p className={'text-2xs text-neutral-500 uppercase'}>Day (Week)</p>
|
||||
<p className={'text-2xs uppercase text-neutral-500'}>Day (Week)</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -118,7 +118,7 @@ export default () => {
|
|||
</div>
|
||||
<div css={tw`flex sm:block mt-3 sm:mt-0`}>
|
||||
<Can action={'schedule.update'}>
|
||||
<Button.Text className={'flex-1 mr-4'} onClick={toggleEditModal}>
|
||||
<Button.Text className={'mr-4 flex-1'} onClick={toggleEditModal}>
|
||||
Edit
|
||||
</Button.Text>
|
||||
<NewTaskButton schedule={schedule} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue