diff --git a/public/base-locales/en.json b/public/base-locales/en.json index fcd33dfb6..8199a4a10 100644 --- a/public/base-locales/en.json +++ b/public/base-locales/en.json @@ -550,5 +550,6 @@ "historic_rarity": "Historic Rarity", "poi": "Points of Interest", "300m_range": "300m Range", - "lure_range": "Lure Range" + "lure_range": "Lure Range", + "tap_to_toggle": "Tap To Toggle" } diff --git a/server/src/configs/custom-environment-variables.json b/server/src/configs/custom-environment-variables.json index 67e0f6917..108be64c4 100644 --- a/server/src/configs/custom-environment-variables.json +++ b/server/src/configs/custom-environment-variables.json @@ -653,6 +653,10 @@ "alwaysShowLabels": { "__name": "CLIENT_SIDE_OPTIONS_SCAN_AREAS_ALWAYS_SHOW_LABELS", "__format": "boolean" + }, + "tapToToggle": { + "__name": "CLIENT_SIDE_OPTIONS_SCAN_AREAS_TAP_TO_TOGGLE", + "__format": "boolean" } }, "weather": { diff --git a/server/src/configs/default.json b/server/src/configs/default.json index 89c607bcd..aae9bbf16 100644 --- a/server/src/configs/default.json +++ b/server/src/configs/default.json @@ -300,7 +300,8 @@ "poiColor": "#03ffff" }, "scanAreas": { - "alwaysShowLabels": true + "alwaysShowLabels": true, + "tapToToggle": true }, "weather": { "clickableIcon": false, diff --git a/server/src/services/ui/clientOptions.js b/server/src/services/ui/clientOptions.js index 6e8e44045..6720dd0a6 100644 --- a/server/src/services/ui/clientOptions.js +++ b/server/src/services/ui/clientOptions.js @@ -57,6 +57,7 @@ module.exports = function clientOptions(perms) { }, scanAreas: { alwaysShowLabels: { type: 'bool', perm: ['scanAreas'] }, + tapToToggle: { type: 'bool', perm: ['scanAreas'] }, }, weather: { clickableIcon: { type: 'bool', perm: ['weather'] }, diff --git a/src/components/tiles/ScanArea.jsx b/src/components/tiles/ScanArea.jsx index 05386c8dc..4ed47d393 100644 --- a/src/components/tiles/ScanArea.jsx +++ b/src/components/tiles/ScanArea.jsx @@ -55,7 +55,7 @@ export function ScanAreaTile({ } if (webhookMode) { layer.on('click', () => handleClick(name.toLowerCase())) - } else if (!feature.properties.manual) { + } else if (!feature.properties.manual && userSettings?.tapToToggle) { layer.on('click', () => setAreas(name, names)) } }