diff options
author | Anton Tananaev <anton@traccar.org> | 2024-02-24 13:47:19 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-02-24 13:47:19 -0800 |
commit | 89a40e48259ce39959101b4f1f7dc5e26c630b74 (patch) | |
tree | 2bbffc14a1846cc7ba7b283f6accd0c1577fe902 /modern/src/settings/PreferencesPage.jsx | |
parent | 460cd9ae0e98e9c2d3fb2e566d10d9ac99aa18f5 (diff) | |
download | trackermap-web-89a40e48259ce39959101b4f1f7dc5e26c630b74.tar.gz trackermap-web-89a40e48259ce39959101b4f1f7dc5e26c630b74.tar.bz2 trackermap-web-89a40e48259ce39959101b4f1f7dc5e26c630b74.zip |
Unify settings styles
Diffstat (limited to 'modern/src/settings/PreferencesPage.jsx')
-rw-r--r-- | modern/src/settings/PreferencesPage.jsx | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/modern/src/settings/PreferencesPage.jsx b/modern/src/settings/PreferencesPage.jsx index bd96b140..676bd58b 100644 --- a/modern/src/settings/PreferencesPage.jsx +++ b/modern/src/settings/PreferencesPage.jsx @@ -5,7 +5,6 @@ import { useNavigate } from 'react-router-dom'; import { Accordion, AccordionSummary, AccordionDetails, Typography, Container, FormControl, InputLabel, Select, MenuItem, Checkbox, FormControlLabel, FormGroup, InputAdornment, IconButton, OutlinedInput, Autocomplete, TextField, createFilterOptions, Button, } from '@mui/material'; -import makeStyles from '@mui/styles/makeStyles'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import CachedIcon from '@mui/icons-material/Cached'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; @@ -20,6 +19,7 @@ import useMapOverlays from '../map/overlay/useMapOverlays'; import { useCatch } from '../reactHelper'; import { sessionActions } from '../store'; import { useRestriction } from '../common/util/permissions'; +import useSettingsStyles from './common/useSettingsStyles'; const deviceFields = [ { id: 'name', name: 'sharedName' }, @@ -29,33 +29,8 @@ const deviceFields = [ { id: 'contact', name: 'deviceContact' }, ]; -const useStyles = makeStyles((theme) => ({ - container: { - marginTop: theme.spacing(2), - }, - buttons: { - marginTop: theme.spacing(2), - marginBottom: theme.spacing(2), - display: 'flex', - justifyContent: 'space-evenly', - '& > *': { - flexBasis: '33%', - }, - }, - details: { - display: 'flex', - flexDirection: 'column', - gap: theme.spacing(2), - paddingBottom: theme.spacing(3), - }, - tokenActions: { - display: 'flex', - flexDirection: 'column', - }, -})); - const PreferencesPage = () => { - const classes = useStyles(); + const classes = useSettingsStyles(); const dispatch = useDispatch(); const navigate = useNavigate(); const t = useTranslation(); @@ -334,7 +309,7 @@ const PreferencesPage = () => { value={token || ''} endAdornment={( <InputAdornment position="end"> - <div className={classes.tokenActions}> + <div className={classes.verticalActions}> <IconButton size="small" edge="end" onClick={generateToken} disabled={!!token}> <CachedIcon fontSize="small" /> </IconButton> |