From c83b8eb8aa07b2f8731668d4dd671ccf970a59e0 Mon Sep 17 00:00:00 2001 From: bourquecharles Date: Wed, 30 Jun 2021 15:16:06 -0400 Subject: [PATCH] Device configuration CSS cleanup --- src/components/BlinkModal/index.js | 2 +- src/components/CopyToClipboardButton/index.js | 21 +- src/components/DeviceActionCard/index.js | 4 +- src/components/DeviceConfiguration/index.js | 202 +++++++++--------- .../DeviceConfiguration/index.module.scss | 5 + 5 files changed, 119 insertions(+), 115 deletions(-) diff --git a/src/components/BlinkModal/index.js b/src/components/BlinkModal/index.js index 0b2aa85..ee6a13a 100644 --- a/src/components/BlinkModal/index.js +++ b/src/components/BlinkModal/index.js @@ -39,7 +39,7 @@ const BlinkModal = ({ show, toggleModal }) => { const toggleNow = () => { setIsNow(!isNow); - } + }; const setDate = (date) => { if (date) { diff --git a/src/components/CopyToClipboardButton/index.js b/src/components/CopyToClipboardButton/index.js index a584e81..b81371c 100644 --- a/src/components/CopyToClipboardButton/index.js +++ b/src/components/CopyToClipboardButton/index.js @@ -5,28 +5,29 @@ import { cilClone } from '@coreui/icons'; import PropTypes from 'prop-types'; import { CButton, CPopover } from '@coreui/react'; -const CopyToClipboardButton = ({content, size}) => { +const CopyToClipboardButton = ({ content, size }) => { const { t } = useTranslation(); const [result, setResult] = useState(''); const copyToClipboard = () => { navigator.clipboard.writeText(content); setResult(t('common.copied')); - } + }; return ( - - - - {' '}{result || ''} - - + + + + {' '} + {result || ''} + + ); -} +}; CopyToClipboardButton.propTypes = { content: PropTypes.string.isRequired, - size: PropTypes.string + size: PropTypes.string, }; CopyToClipboardButton.defaultProps = { diff --git a/src/components/DeviceActionCard/index.js b/src/components/DeviceActionCard/index.js index e5327db..93c86a3 100644 --- a/src/components/DeviceActionCard/index.js +++ b/src/components/DeviceActionCard/index.js @@ -78,7 +78,9 @@ const DeviceActions = ({ selectedDeviceId }) => { return ( -
{t('actions.title')}
+ +
{t('actions.title')}
+
diff --git a/src/components/DeviceConfiguration/index.js b/src/components/DeviceConfiguration/index.js index ee4c0f4..8df373d 100644 --- a/src/components/DeviceConfiguration/index.js +++ b/src/components/DeviceConfiguration/index.js @@ -4,10 +4,8 @@ import { CCard, CCardHeader, CCardBody, - CFormGroup, CCol, CLabel, - CForm, CInput, CCollapse, CCardFooter, @@ -66,7 +64,9 @@ const DeviceConfiguration = ({ selectedDeviceId }) => { -
{t('configuration.title')}
+ +
{t('configuration.title')}
+
@@ -79,122 +79,118 @@ const DeviceConfiguration = ({ selectedDeviceId }) => { - - + + + {t('common.uuid')} : + + + {device.UUID} + + + + + {t('common.serial_number')} : + + + {device.serialNumber} + + + + + + {t('configuration.type')} : + + + {device.deviceType} + + + + + {t('configuration.last_configuration_change')} : + + + {prettyDate(device.lastConfigurationChange)} + + + + + {t('common.mac')} : + + + {device.macAddress} + + + + + {t('configuration.created')} : + + + {prettyDate(device.createdTimestamp)} + + + + + {t('configuration.last_configuration_download')} : + + + {prettyDate(device.lastConfigurationDownload)} + + + + + {t('configuration.device_password')} : + + + {device.devicePassword === '' ? 'openwifi' : device.devicePassword} + + + + + - {t('common.uuid')} : + {t('common.manufacturer')} : - {device.UUID} + {device.manufacturer} - - + + - {t('common.serial_number')} : + {t('configuration.notes')} : - {device.serialNumber} - + - - + + - {t('configuration.type')} : + {t('configuration.owner')} : - {device.deviceType} + {device.owner} - - + + - {t('configuration.last_configuration_change')} : + {t('configuration.location')} : - {prettyDate(device.lastConfigurationChange)} + {device.location} - - - - {t('common.mac')} : - - - {device.macAddress} - - - - - {t('configuration.created')} : - - - {prettyDate(device.createdTimestamp)} - - - - - {t('configuration.last_configuration_download')} : - - - {prettyDate(device.lastConfigurationDownload)} - - - - - {t('configuration.device_password')} : - - - {device.devicePassword === '' ? 'openwifi' : device.devicePassword} - - - - - - - {t('common.manufacturer')} : - - - {device.manufacturer} - - - - - {t('configuration.notes')} : - - - - - - - - {t('configuration.owner')} : - - - {device.owner} - - - - - {t('configuration.location')} : - - - {device.location} - - - - - - - - - + + + + + + + diff --git a/src/components/DeviceConfiguration/index.module.scss b/src/components/DeviceConfiguration/index.module.scss index 364d894..6c9025c 100644 --- a/src/components/DeviceConfiguration/index.module.scss +++ b/src/components/DeviceConfiguration/index.module.scss @@ -13,3 +13,8 @@ .topPadding { padding-top: 5px; } + +.spacedRow { + margin-top: 5px; + margin-bottom: 5px; +}