diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-05 16:43:42 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-05 16:43:42 -0700 |
commit | 8bde80a8cd1fb9b92f4867edbeeae48158f9036b (patch) | |
tree | 493edc77a38e4e39b438c4255a02cf843eedc821 /modern/src/settings | |
parent | dad1892d4718f15c9ecdd301db140d66d52da6b3 (diff) | |
download | trackermap-web-8bde80a8cd1fb9b92f4867edbeeae48158f9036b.tar.gz trackermap-web-8bde80a8cd1fb9b92f4867edbeeae48158f9036b.tar.bz2 trackermap-web-8bde80a8cd1fb9b92f4867edbeeae48158f9036b.zip |
Configurable altitude units
Diffstat (limited to 'modern/src/settings')
-rw-r--r-- | modern/src/settings/ServerPage.js | 11 | ||||
-rw-r--r-- | modern/src/settings/UserPage.js | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/modern/src/settings/ServerPage.js b/modern/src/settings/ServerPage.js index 90b854db..ee2d5f31 100644 --- a/modern/src/settings/ServerPage.js +++ b/modern/src/settings/ServerPage.js @@ -157,6 +157,17 @@ const ServerPage = () => { </Select> </FormControl> <FormControl> + <InputLabel>{t('settingsAltitudeUnit')}</InputLabel> + <Select + label={t('settingsAltitudeUnit')} + value={item.attributes.altitudeUnit || 'm'} + onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, altitudeUnit: e.target.value } })} + > + <MenuItem value="m">{t('sharedMeters')}</MenuItem> + <MenuItem value="ft">{t('sharedFeet')}</MenuItem> + </Select> + </FormControl> + <FormControl> <InputLabel>{t('settingsVolumeUnit')}</InputLabel> <Select label={t('settingsVolumeUnit')} diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js index 6e637d49..012d5c66 100644 --- a/modern/src/settings/UserPage.js +++ b/modern/src/settings/UserPage.js @@ -187,6 +187,17 @@ const UserPage = () => { </Select> </FormControl> <FormControl> + <InputLabel>{t('settingsAltitudeUnit')}</InputLabel> + <Select + label={t('settingsAltitudeUnit')} + value={item.attributes.altitudeUnit || 'm'} + onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, altitudeUnit: e.target.value } })} + > + <MenuItem value="m">{t('sharedMeters')}</MenuItem> + <MenuItem value="ft">{t('sharedFeet')}</MenuItem> + </Select> + </FormControl> + <FormControl> <InputLabel>{t('settingsVolumeUnit')}</InputLabel> <Select label={t('settingsVolumeUnit')} |