From f1978683ccb9e2fa652706bc91ca2f934b45318b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 13 Sep 2020 10:49:57 -0700 Subject: [PATCH] More mobile cleanup --- resources/scripts/components/elements/Label.tsx | 2 +- resources/scripts/components/elements/Modal.tsx | 2 +- .../components/elements/PageContentBlock.tsx | 2 +- .../server/databases/CreateDatabaseButton.tsx | 6 +++--- .../components/server/network/NetworkContainer.tsx | 8 ++++++-- .../server/schedules/EditScheduleModal.tsx | 14 +++++++------- .../components/server/users/EditSubuserModal.tsx | 6 +++--- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/resources/scripts/components/elements/Label.tsx b/resources/scripts/components/elements/Label.tsx index cfe16550b..a8dc1d670 100644 --- a/resources/scripts/components/elements/Label.tsx +++ b/resources/scripts/components/elements/Label.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components/macro'; import tw from 'twin.macro'; const Label = styled.label<{ isLight?: boolean }>` - ${tw`block text-xs uppercase text-neutral-200 mb-2`}; + ${tw`block text-xs uppercase text-neutral-200 mb-1 sm:mb-2`}; ${props => props.isLight && tw`text-neutral-700`}; `; diff --git a/resources/scripts/components/elements/Modal.tsx b/resources/scripts/components/elements/Modal.tsx index 342d6ab54..10401e9ca 100644 --- a/resources/scripts/components/elements/Modal.tsx +++ b/resources/scripts/components/elements/Modal.tsx @@ -113,7 +113,7 @@ const Modal: React.FC = ({ visible, appear, dismissable, showSpinner } -
+
{children}
diff --git a/resources/scripts/components/elements/PageContentBlock.tsx b/resources/scripts/components/elements/PageContentBlock.tsx index bcbead377..ef0727e8b 100644 --- a/resources/scripts/components/elements/PageContentBlock.tsx +++ b/resources/scripts/components/elements/PageContentBlock.tsx @@ -20,7 +20,7 @@ const PageContentBlock: React.FC = ({ title, showFlashKey {title} } - + {showFlashKey && } diff --git a/resources/scripts/components/server/databases/CreateDatabaseButton.tsx b/resources/scripts/components/server/databases/CreateDatabaseButton.tsx index 0fff36d25..03eaf63c9 100644 --- a/resources/scripts/components/server/databases/CreateDatabaseButton.tsx +++ b/resources/scripts/components/server/databases/CreateDatabaseButton.tsx @@ -85,16 +85,16 @@ export default () => { description={'Where connections should be allowed from. Use % for wildcards.'} />
-
+
-
diff --git a/resources/scripts/components/server/network/NetworkContainer.tsx b/resources/scripts/components/server/network/NetworkContainer.tsx index 52b8f143f..0bec04274 100644 --- a/resources/scripts/components/server/network/NetworkContainer.tsx +++ b/resources/scripts/components/server/network/NetworkContainer.tsx @@ -68,7 +68,11 @@ const NetworkContainer = () => { : data.map(({ id, ip, port, alias, notes, isDefault }, index) => ( - 0 ? tw`mt-2 overflow-x-auto` : tw`overflow-x-auto`} $hoverable={false}> + 0 ? tw`mt-2 overflow-x-auto` : tw`overflow-x-auto`} + >
@@ -90,7 +94,7 @@ const NetworkContainer = () => { />
-
+
{isDefault ? Primary diff --git a/resources/scripts/components/server/schedules/EditScheduleModal.tsx b/resources/scripts/components/server/schedules/EditScheduleModal.tsx index 423ae9919..73f74f2cf 100644 --- a/resources/scripts/components/server/schedules/EditScheduleModal.tsx +++ b/resources/scripts/components/server/schedules/EditScheduleModal.tsx @@ -30,7 +30,7 @@ const EditScheduleModal = ({ schedule, ...props }: Omit -

{schedule ? 'Edit schedule' : 'Create new schedule'}

+

{schedule ? 'Edit schedule' : 'Create new schedule'}

-
-
+
+
-
+
-
+
-
+
@@ -64,7 +64,7 @@ const EditScheduleModal = ({ schedule, ...props }: Omit
-
diff --git a/resources/scripts/components/server/users/EditSubuserModal.tsx b/resources/scripts/components/server/users/EditSubuserModal.tsx index f3e0f81c7..9396d579e 100644 --- a/resources/scripts/components/server/users/EditSubuserModal.tsx +++ b/resources/scripts/components/server/users/EditSubuserModal.tsx @@ -31,7 +31,7 @@ interface Values { } const PermissionLabel = styled.label` - ${tw`flex items-center border border-transparent rounded p-2`}; + ${tw`flex items-center border border-transparent rounded md:p-2`}; text-transform: none; &:not(.disabled) { @@ -146,7 +146,7 @@ const EditSubuserModal = forwardRef(({ subuser, ...pr htmlFor={`permission_${key}_${pkey}`} css={[ tw`transition-colors duration-75`, - index > 0 ? tw`mt-2` : undefined, + index > 0 ? tw`mt-4 sm:mt-2` : undefined, ]} className={(!canEditUser || editablePermissions.indexOf(`${key}.${pkey}`) < 0) ? 'disabled' : undefined} > @@ -174,7 +174,7 @@ const EditSubuserModal = forwardRef(({ subuser, ...pr
-