diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-19 20:30:56 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-19 20:30:56 -0700 |
commit | 9e7ca99218cb7176d27a7a2271294e976d885ccd (patch) | |
tree | d171d6c9416bbb56b4b1cda490c03936b8d2ff5a /modern/src/settings/PreferencesPage.js | |
parent | 1e685dcf92e5eaa5579fd1cf5bbe84d4886117d7 (diff) | |
download | trackermap-web-9e7ca99218cb7176d27a7a2271294e976d885ccd.tar.gz trackermap-web-9e7ca99218cb7176d27a7a2271294e976d885ccd.tar.bz2 trackermap-web-9e7ca99218cb7176d27a7a2271294e976d885ccd.zip |
Option to hide geofences
Diffstat (limited to 'modern/src/settings/PreferencesPage.js')
-rw-r--r-- | modern/src/settings/PreferencesPage.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modern/src/settings/PreferencesPage.js b/modern/src/settings/PreferencesPage.js index d6589231..11cf860c 100644 --- a/modern/src/settings/PreferencesPage.js +++ b/modern/src/settings/PreferencesPage.js @@ -47,10 +47,11 @@ const PreferencesPage = () => { const positionAttributes = usePositionAttributes(t); const [positionItems, setPositionItems] = usePersistedState('positionItems', ['speed', 'address', 'totalDistance', 'course']); + const [mapGeofences, setMapGeofences] = usePersistedState('mapGeofences', true); const [mapLiveRoutes, setMapLiveRoutes] = usePersistedState('mapLiveRoutes', false); const [mapFollow, setMapFollow] = usePersistedState('mapFollow', false); const [mapCluster, setMapCluster] = usePersistedState('mapCluster', true); - const [mapMapOnSelect, setMapOnSelect] = usePersistedState('mapOnSelect', false); + const [mapOnSelect, setMapOnSelect] = usePersistedState('mapOnSelect', false); const alarms = useTranslationKeys((it) => it.startsWith('alarm')).map((it) => ({ key: unprefixString('alarm', it), @@ -150,6 +151,10 @@ const PreferencesPage = () => { </FormControl> <FormGroup> <FormControlLabel + control={<Checkbox checked={mapGeofences} onChange={(e) => setMapGeofences(e.target.checked)} />} + label={t('sharedGeofences')} + /> + <FormControlLabel control={<Checkbox checked={mapLiveRoutes} onChange={(e) => setMapLiveRoutes(e.target.checked)} />} label={t('mapLiveRoutes')} /> @@ -162,7 +167,7 @@ const PreferencesPage = () => { label={t('mapClustering')} /> <FormControlLabel - control={<Checkbox checked={mapMapOnSelect} onChange={(e) => setMapOnSelect(e.target.checked)} />} + control={<Checkbox checked={mapOnSelect} onChange={(e) => setMapOnSelect(e.target.checked)} />} label={t('mapOnSelect')} /> </FormGroup> |