diff options
Diffstat (limited to 'modern/src/UserPage.js')
-rw-r--r-- | modern/src/UserPage.js | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/modern/src/UserPage.js b/modern/src/UserPage.js index c6274af9..d53777a5 100644 --- a/modern/src/UserPage.js +++ b/modern/src/UserPage.js @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import TextField from '@material-ui/core/TextField'; import { - Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography, + Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography, FormControl, InputLabel, Select, MenuItem, } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { useDispatch, useSelector } from 'react-redux'; @@ -86,6 +86,39 @@ const UserPage = () => { label={t('sharedPhone')} variant="filled" /> + <FormControl variant="filled" margin="normal" fullWidth> + <InputLabel>{t('settingsSpeedUnit')}</InputLabel> + <Select + value={item.attributes.speedUnit || 'kn'} + onChange={(event) => setItem({ ...item, attributes: { ...item.attributes, speedUnit: event.target.value } })} + > + <MenuItem value="kn">{t('sharedKn')}</MenuItem> + <MenuItem value="kmh">{t('sharedKmh')}</MenuItem> + <MenuItem value="mph">{t('sharedMph')}</MenuItem> + </Select> + </FormControl> + <FormControl variant="filled" margin="normal" fullWidth> + <InputLabel>{t('settingsDistanceUnit')}</InputLabel> + <Select + value={item.attributes.distanceUnit || 'km'} + onChange={(event) => setItem({ ...item, attributes: { ...item.attributes, distanceUnit: event.target.value } })} + > + <MenuItem value="km">{t('sharedKm')}</MenuItem> + <MenuItem value="mi">{t('sharedMi')}</MenuItem> + <MenuItem value="nmi">{t('sharedNmi')}</MenuItem> + </Select> + </FormControl> + <FormControl variant="filled" margin="normal" fullWidth> + <InputLabel>{t('settingsVolumeUnit')}</InputLabel> + <Select + value={item.attributes.volumeUnit || 'ltr'} + onChange={(event) => setItem({ ...item, attributes: { ...item.attributes, volumeUnit: event.target.value } })} + > + <MenuItem value="ltr">{t('sharedLiter')}</MenuItem> + <MenuItem value="usGal">{t('sharedUsGallon')}</MenuItem> + <MenuItem value="impGal">{t('sharedImpGallon')}</MenuItem> + </Select> + </FormControl> <TextField margin="normal" value={item.poiLayer || ''} |