diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 73f758b0..82a934af 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -31,8 +31,7 @@ class SettingsController < ApplicationController params.require(:settings).permit( :meters_between_routes, :minutes_between_routes, :fog_of_war_meters, :time_threshold_minutes, :merge_threshold_minutes, :route_opacity, - :immich_url, :immich_api_key, :photoprism_url, :photoprism_api_key, - :distance_unit + :immich_url, :immich_api_key, :photoprism_url, :photoprism_api_key ) end end diff --git a/app/services/users/safe_settings.rb b/app/services/users/safe_settings.rb index 0b057e48..6e0d0743 100644 --- a/app/services/users/safe_settings.rb +++ b/app/services/users/safe_settings.rb @@ -93,6 +93,6 @@ class Users::SafeSettings end def distance_unit - settings['maps']['distance_unit'] || 'km' + settings.dig('maps', 'distance_unit') || 'km' end end diff --git a/app/views/settings/_navigation.html.erb b/app/views/settings/_navigation.html.erb index 1f61e86b..41b9e296 100644 --- a/app/views/settings/_navigation.html.erb +++ b/app/views/settings/_navigation.html.erb @@ -1,8 +1,8 @@
<%= link_to 'Integrations', settings_path, role: 'tab', class: "tab tab-lg #{active_tab?(settings_path)}" %> + <%= link_to 'Map', settings_maps_path, role: 'tab', class: "tab tab-lg #{active_tab?(settings_maps_path)}" %> <% if DawarichSettings.self_hosted? && current_user.admin? %> <%= link_to 'Users', settings_users_path, role: 'tab', class: "tab tab-lg #{active_tab?(settings_users_path)}" %> <%= link_to 'Background Jobs', settings_background_jobs_path, role: 'tab', class: "tab tab-lg #{active_tab?(settings_background_jobs_path)}" %> <% end %> - <%= link_to 'Map', settings_maps_path, role: 'tab', class: "tab tab-lg #{active_tab?(settings_maps_path)}" %>