From 39307e1bb379a984886e12bee6c3c0ccbae56f29 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Mon, 1 Dec 2025 20:30:09 +0100 Subject: [PATCH] Make popups respect dark theme --- CHANGELOG.md | 1 + .../maps_v2/components/popup_factory.js | 49 +++++++++++-------- .../maps_v2/components/visit_popup.js | 25 ++++++---- app/javascript/maps_v2/layers/photos_layer.js | 21 +++++--- ..._id_reverse_geocoded_at_index_to_points.rb | 12 +++++ db/schema.rb | 3 +- 6 files changed, 72 insertions(+), 39 deletions(-) create mode 100644 db/migrate/20251201192510_add_user_id_reverse_geocoded_at_index_to_points.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 91cf497f..10364b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Heatmap and Fog of War now are moving correctly during map interactions. #1798 - Polyline crossing international date line now are rendered correctly. #1162 - Place popup tags parsing (MapLibre GL JS compatibility) +- Stats calculation should be faster now. ## Changed diff --git a/app/javascript/maps_v2/components/popup_factory.js b/app/javascript/maps_v2/components/popup_factory.js index a29ad057..4a6e9a47 100644 --- a/app/javascript/maps_v2/components/popup_factory.js +++ b/app/javascript/maps_v2/components/popup_factory.js @@ -1,4 +1,5 @@ import { formatTimestamp } from '../utils/geojson_transformers' +import { getCurrentTheme, getThemeColors } from '../utils/popup_theme' /** * Factory for creating map popups @@ -12,38 +13,42 @@ export class PopupFactory { static createPointPopup(properties) { const { id, timestamp, altitude, battery, accuracy, velocity } = properties + // Get theme colors + const theme = getCurrentTheme() + const colors = getThemeColors(theme) + return ` -
-