From 2a42ef5c62c1791fc0616821a7be31d5bd9733c8 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 3 Oct 2020 16:25:39 -0700 Subject: [PATCH] Mobile responsiveness fixes --- .../components/dashboard/ServerRow.tsx | 74 +++++++++---------- .../components/elements/GreyRowBox.tsx | 4 +- .../components/server/backups/BackupRow.tsx | 52 ++++++------- .../server/backups/CreateBackupButton.tsx | 2 +- .../components/server/files/FileObjectRow.tsx | 6 +- 5 files changed, 66 insertions(+), 72 deletions(-) diff --git a/resources/scripts/components/dashboard/ServerRow.tsx b/resources/scripts/components/dashboard/ServerRow.tsx index cc57870d4..5d8b6598e 100644 --- a/resources/scripts/components/dashboard/ServerRow.tsx +++ b/resources/scripts/components/dashboard/ServerRow.tsx @@ -9,20 +9,12 @@ import tw from 'twin.macro'; import GreyRowBox from '@/components/elements/GreyRowBox'; import Spinner from '@/components/elements/Spinner'; import styled from 'styled-components/macro'; -import { IconProp } from '@fortawesome/fontawesome-svg-core'; import isEqual from 'react-fast-compare'; // Determines if the current value is in an alarm threshold so we can show it in red rather // than the more faded default style. const isAlarmState = (current: number, limit: number): boolean => limit > 0 && (current / (limit * 1024 * 1024) >= 0.90); -interface IconProps { - icon: IconProp; - usage: number; - limit: string; - isAlarm: boolean; -} - const Icon = memo(styled(FontAwesomeIcon)<{ $alarm: boolean }>` ${props => props.$alarm ? tw`text-red-400` : tw`text-neutral-500`}; `, isEqual); @@ -69,29 +61,31 @@ export default ({ server, className }: { server: Server; className?: string }) = const memorylimit = server.limits.memory !== 0 ? megabytesToHuman(server.limits.memory) : 'Unlimited'; return ( - -
- -
-
-

{server.name}

- {!!server.description && -

{server.description}

- } -
-