diff --git a/public/base-locales/en.json b/public/base-locales/en.json index 64e311d22..cd3acd484 100644 --- a/public/base-locales/en.json +++ b/public/base-locales/en.json @@ -544,5 +544,7 @@ "dark_map_border": "Dark Map Border", "cell_blocked": "Cell Blocked", "poi_color": "POI Color", - "quest_condition": "Quest Condition" + "quest_condition": "Quest Condition", + "always_show_labels": "Always Show Labels", + "scan_areas_options": "Scan Areas Options" } diff --git a/server/src/configs/custom-environment-variables.json b/server/src/configs/custom-environment-variables.json index 9d440de4e..0efb11b23 100644 --- a/server/src/configs/custom-environment-variables.json +++ b/server/src/configs/custom-environment-variables.json @@ -637,6 +637,12 @@ "cellBlocked": "CLIENT_SIDE_OPTIONS_WAYFARER_CELL_BLOCKED", "poiColor": "CLIENT_SIDE_OPTIONS_WAYFARER_POI_COLOR" }, + "scanAreas": { + "alwaysShowLabels": { + "__name": "CLIENT_SIDE_OPTIONS_SCAN_AREAS_ALWAYS_SHOW_LABELS", + "__format": "boolean" + } + }, "weather": { "clickableIcon": { "__name": "CLIENT_SIDE_OPTIONS_WEATHER_CLICKABLE_ICON", diff --git a/server/src/configs/default.json b/server/src/configs/default.json index 1b052bf29..0bc68ffc8 100644 --- a/server/src/configs/default.json +++ b/server/src/configs/default.json @@ -283,6 +283,9 @@ "cellBlocked": "#000000", "poiColor": "#03ffff" }, + "scanAreas": { + "alwaysShowLabels": true + }, "weather": { "clickableIcon": false, "darkMapBorder": "#ff0000", diff --git a/server/src/services/ui/clientOptions.js b/server/src/services/ui/clientOptions.js index 88ce30657..34aa9c947 100644 --- a/server/src/services/ui/clientOptions.js +++ b/server/src/services/ui/clientOptions.js @@ -53,6 +53,9 @@ module.exports = function clientOptions(perms) { cellBlocked: { type: 'color', perm: ['submissionCells'] }, poiColor: { type: 'color', perm: ['submissionCells'] }, }, + scanAreas: { + alwaysShowLabels: { type: 'bool', perm: ['scanAreas'] }, + }, weather: { clickableIcon: { type: 'bool', perm: ['weather'] }, lightMapBorder: { type: 'color', perm: ['weather'] }, diff --git a/src/components/layout/dialogs/UserOptions.jsx b/src/components/layout/dialogs/UserOptions.jsx index 1c151d62f..667afa99a 100644 --- a/src/components/layout/dialogs/UserOptions.jsx +++ b/src/components/layout/dialogs/UserOptions.jsx @@ -107,7 +107,7 @@ export default function UserOptions({ category, toggleDialog, isMobile }) { return ( <>
diff --git a/src/components/tiles/ScanArea.jsx b/src/components/tiles/ScanArea.jsx index 96446ccb6..6629a4305 100644 --- a/src/components/tiles/ScanArea.jsx +++ b/src/components/tiles/ScanArea.jsx @@ -10,6 +10,7 @@ export function ScanAreaTile({ selectedAreas, setSelectedAreas, onlyAreas, + userSettings, }) { const setAreas = useStore((s) => s.setAreas) @@ -42,11 +43,13 @@ export function ScanAreaTile({ : 0.2, }) .bindTooltip(popupContent, { - permanent: true, + permanent: userSettings ? userSettings.alwaysShowLabels : true, direction: 'top', className: 'area-tooltip', }) - .openTooltip() + if (!userSettings || userSettings.alwaysShowLabels) { + layer.openTooltip() + } if (webhookMode) { layer.on('click', () => handleClick(name.toLowerCase())) } else if (!feature.properties.manual) {