From 4fc8992f731cba83a4295082e0c2fc40ebf6d0ab Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Mon, 13 Jan 2025 22:05:25 +0100 Subject: [PATCH] Rename Polylines to Routes in the interface --- app/controllers/api/v1/settings_controller.rb | 2 +- app/javascript/controllers/maps_controller.js | 34 ++++++++----------- app/javascript/maps/polylines.js | 4 +-- app/views/map/_settings_modals.html.erb | 4 +-- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/app/controllers/api/v1/settings_controller.rb b/app/controllers/api/v1/settings_controller.rb index b15bad16..316c201e 100644 --- a/app/controllers/api/v1/settings_controller.rb +++ b/app/controllers/api/v1/settings_controller.rb @@ -28,7 +28,7 @@ class Api::V1::SettingsController < ApiController :time_threshold_minutes, :merge_threshold_minutes, :route_opacity, :preferred_map_layer, :points_rendering_mode, :live_map_enabled, :immich_url, :immich_api_key, :photoprism_url, :photoprism_api_key, - :speed_colored_polylines + :speed_colored_routes ) end end diff --git a/app/javascript/controllers/maps_controller.js b/app/javascript/controllers/maps_controller.js index 7a12d565..fa2ef5e1 100644 --- a/app/javascript/controllers/maps_controller.js +++ b/app/javascript/controllers/maps_controller.js @@ -65,7 +65,7 @@ export default class extends Controller { this.pointsRenderingMode = this.userSettings.points_rendering_mode || "raw"; this.liveMapEnabled = this.userSettings.live_map_enabled || false; this.countryCodesMap = countryCodesMap(); - this.speedColoredPolylines = this.userSettings.speed_colored_polylines || false; + this.speedColoredPolylines = this.userSettings.speed_colored_routes || false; this.center = this.markers[this.markers.length - 1] || [52.514568, 13.350111]; @@ -96,7 +96,7 @@ export default class extends Controller { const controlsLayer = { Points: this.markersLayer, - Polylines: this.polylinesLayer, + Routes: this.polylinesLayer, Heatmap: this.heatmapLayer, "Fog of War": this.fogOverlay, "Scratch map": this.scratchLayer, @@ -476,7 +476,7 @@ export default class extends Controller { this.map.removeControl(this.layerControl); const controlsLayer = { Points: this.markersLayer, - Polylines: this.polylinesLayer, + Routes: this.polylinesLayer, Heatmap: this.heatmapLayer, "Fog of War": this.fogOverlay, "Scratch map": this.scratchLayer, @@ -714,10 +714,10 @@ export default class extends Controller { -