diff options
author | Anton Tananaev <anton@traccar.org> | 2023-06-13 06:26:44 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-06-13 06:26:44 -0700 |
commit | 299b69887b2f2fcedc71b6a000effeab5ba58b25 (patch) | |
tree | 19122dc50f021800f4502fdc10fda19272ee95d9 /modern/src | |
parent | cb7106f4bfd6856470861890ea5e4c0bbc4703ac (diff) | |
download | trackermap-web-299b69887b2f2fcedc71b6a000effeab5ba58b25.tar.gz trackermap-web-299b69887b2f2fcedc71b6a000effeab5ba58b25.tar.bz2 trackermap-web-299b69887b2f2fcedc71b6a000effeab5ba58b25.zip |
Add table bottom margin (fix #1091)
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/settings/CalendarsPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/CommandsPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/ComputedAttributesPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/DevicesPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/DriversPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/GroupsPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/MaintenancesPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/NotificationsPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/UsersPage.js | 13 | ||||
-rw-r--r-- | modern/src/settings/common/useSettingsStyles.js | 11 |
10 files changed, 38 insertions, 90 deletions
diff --git a/modern/src/settings/CalendarsPage.js b/modern/src/settings/CalendarsPage.js index c418cff2..de27a451 100644 --- a/modern/src/settings/CalendarsPage.js +++ b/modern/src/settings/CalendarsPage.js @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import PageLayout from '../common/components/PageLayout'; @@ -11,16 +10,10 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const CalendarsPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const t = useTranslation(); const [timestamp, setTimestamp] = useState(Date.now()); @@ -45,7 +38,7 @@ const CalendarsPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedCalendars']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedName')}</TableCell> diff --git a/modern/src/settings/CommandsPage.js b/modern/src/settings/CommandsPage.js index 01acb33e..1b893831 100644 --- a/modern/src/settings/CommandsPage.js +++ b/modern/src/settings/CommandsPage.js @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import { formatBoolean } from '../common/util/formatter'; @@ -14,16 +13,10 @@ import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; import { useRestriction } from '../common/util/permissions'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const CommandsPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const t = useTranslation(); const [timestamp, setTimestamp] = useState(Date.now()); @@ -49,7 +42,7 @@ const CommandsPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedSavedCommands']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedDescription')}</TableCell> diff --git a/modern/src/settings/ComputedAttributesPage.js b/modern/src/settings/ComputedAttributesPage.js index d9b2786d..6d098547 100644 --- a/modern/src/settings/ComputedAttributesPage.js +++ b/modern/src/settings/ComputedAttributesPage.js @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import { useAdministrator } from '../common/util/permissions'; @@ -12,16 +11,10 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const ComputedAttributesPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const t = useTranslation(); const [timestamp, setTimestamp] = useState(Date.now()); @@ -47,7 +40,7 @@ const ComputedAttributesPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedComputedAttributes']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedDescription')}</TableCell> diff --git a/modern/src/settings/DevicesPage.js b/modern/src/settings/DevicesPage.js index d3ebc85f..5f356964 100644 --- a/modern/src/settings/DevicesPage.js +++ b/modern/src/settings/DevicesPage.js @@ -5,7 +5,6 @@ import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; import LinkIcon from '@mui/icons-material/Link'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import PageLayout from '../common/components/PageLayout'; @@ -17,16 +16,10 @@ import SearchHeader, { filterByKeyword } from './components/SearchHeader'; import { usePreference } from '../common/util/preferences'; import { formatTime } from '../common/util/formatter'; import { useDeviceReadonly } from '../common/util/permissions'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const DevicesPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const navigate = useNavigate(); const t = useTranslation(); @@ -65,7 +58,7 @@ const DevicesPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'deviceTitle']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedName')}</TableCell> diff --git a/modern/src/settings/DriversPage.js b/modern/src/settings/DriversPage.js index cbca6bb7..72834860 100644 --- a/modern/src/settings/DriversPage.js +++ b/modern/src/settings/DriversPage.js @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import PageLayout from '../common/components/PageLayout'; @@ -11,16 +10,10 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const DriversPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const t = useTranslation(); const [timestamp, setTimestamp] = useState(Date.now()); @@ -45,7 +38,7 @@ const DriversPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedDrivers']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedName')}</TableCell> diff --git a/modern/src/settings/GroupsPage.js b/modern/src/settings/GroupsPage.js index e570c4bf..baba7f72 100644 --- a/modern/src/settings/GroupsPage.js +++ b/modern/src/settings/GroupsPage.js @@ -5,7 +5,6 @@ import { } from '@mui/material'; import LinkIcon from '@mui/icons-material/Link'; import PublishIcon from '@mui/icons-material/Publish'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { useTranslation } from '../common/components/LocalizationProvider'; import PageLayout from '../common/components/PageLayout'; @@ -15,16 +14,10 @@ import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; import { useRestriction } from '../common/util/permissions'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const GroupsPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const navigate = useNavigate(); const t = useTranslation(); @@ -66,7 +59,7 @@ const GroupsPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'settingsGroups']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedName')}</TableCell> diff --git a/modern/src/settings/MaintenancesPage.js b/modern/src/settings/MaintenancesPage.js index 6dc29e56..2a66590c 100644 --- a/modern/src/settings/MaintenancesPage.js +++ b/modern/src/settings/MaintenancesPage.js @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import usePositionAttributes from '../common/attributes/usePositionAttributes'; import { formatDistance, formatSpeed } from '../common/util/formatter'; @@ -14,16 +13,10 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const MaintenacesPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const t = useTranslation(); const positionAttributes = usePositionAttributes(t); @@ -68,7 +61,7 @@ const MaintenacesPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedMaintenance']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedName')}</TableCell> diff --git a/modern/src/settings/NotificationsPage.js b/modern/src/settings/NotificationsPage.js index 9229e8f1..f1e70a85 100644 --- a/modern/src/settings/NotificationsPage.js +++ b/modern/src/settings/NotificationsPage.js @@ -2,7 +2,6 @@ import React, { useState } from 'react'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import { useEffectAsync } from '../reactHelper'; import { prefixString } from '../common/util/stringUtils'; import { formatBoolean } from '../common/util/formatter'; @@ -13,16 +12,10 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const NotificationsPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const t = useTranslation(); const [timestamp, setTimestamp] = useState(Date.now()); @@ -58,7 +51,7 @@ const NotificationsPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'sharedNotifications']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('notificationType')}</TableCell> diff --git a/modern/src/settings/UsersPage.js b/modern/src/settings/UsersPage.js index f571e3a8..d04f2a2b 100644 --- a/modern/src/settings/UsersPage.js +++ b/modern/src/settings/UsersPage.js @@ -5,7 +5,6 @@ import { } from '@mui/material'; import LoginIcon from '@mui/icons-material/Login'; import LinkIcon from '@mui/icons-material/Link'; -import makeStyles from '@mui/styles/makeStyles'; import { useCatch, useEffectAsync } from '../reactHelper'; import { formatBoolean, formatTime } from '../common/util/formatter'; import { useTranslation } from '../common/components/LocalizationProvider'; @@ -17,16 +16,10 @@ import TableShimmer from '../common/components/TableShimmer'; import { useManager } from '../common/util/permissions'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; import { usePreference } from '../common/util/preferences'; - -const useStyles = makeStyles((theme) => ({ - columnAction: { - width: '1%', - paddingRight: theme.spacing(1), - }, -})); +import useSettingsStyles from './common/useSettingsStyles'; const UsersPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const navigate = useNavigate(); const t = useTranslation(); @@ -79,7 +72,7 @@ const UsersPage = () => { return ( <PageLayout menu={<SettingsMenu />} breadcrumbs={['settingsTitle', 'settingsUsers']}> <SearchHeader keyword={searchKeyword} setKeyword={setSearchKeyword} /> - <Table> + <Table className={classes.table}> <TableHead> <TableRow> <TableCell>{t('sharedName')}</TableCell> diff --git a/modern/src/settings/common/useSettingsStyles.js b/modern/src/settings/common/useSettingsStyles.js new file mode 100644 index 00000000..396af232 --- /dev/null +++ b/modern/src/settings/common/useSettingsStyles.js @@ -0,0 +1,11 @@ +import { makeStyles } from '@mui/styles'; + +export default makeStyles((theme) => ({ + table: { + marginBottom: theme.spacing(10), + }, + columnAction: { + width: '1%', + paddingRight: theme.spacing(1), + }, +})); |