diff --git a/.gitignore b/.gitignore index 3e2a87f6..c5df6beb 100644 --- a/.gitignore +++ b/.gitignore @@ -68,5 +68,7 @@ /config/credentials/production.key /config/credentials/production.yml.enc +/config/credentials/staging.key +/config/credentials/staging.yml.enc Makefile diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c01862a..225bb287 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# 0.25.9 - UNRELEASED + +## Removed + +- Sample points are no longer being imported automatically for new users. + # 0.25.8 - 2025-04-24 ## Fixed diff --git a/app/models/user.rb b/app/models/user.rb index 8d7282b4..e9c072e1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -16,7 +16,6 @@ class User < ApplicationRecord has_many :trips, dependent: :destroy after_create :create_api_key - after_create :import_sample_points after_commit :activate, on: :create, if: -> { DawarichSettings.self_hosted? } before_save :sanitize_input @@ -134,23 +133,4 @@ class User < ApplicationRecord settings['photoprism_url']&.gsub!(%r{/+\z}, '') settings.try(:[], 'maps')&.try(:[], 'url')&.strip! end - - # rubocop:disable Metrics/MethodLength - def import_sample_points - return unless Rails.env.development? || - Rails.env.production? || - (Rails.env.test? && ENV['IMPORT_SAMPLE_POINTS']) - - import = imports.create( - name: 'DELETE_ME_this_is_a_demo_import_DELETE_ME', - source: 'gpx' - ) - - import.file.attach( - Rack::Test::UploadedFile.new( - Rails.root.join('lib/assets/sample_points.gpx'), 'application/xml' - ) - ) - end - # rubocop:enable Metrics/MethodLength end diff --git a/app/views/devise/registrations/_api_key.html.erb b/app/views/devise/registrations/_api_key.html.erb index c6c9f0d0..64fb732c 100644 --- a/app/views/devise/registrations/_api_key.html.erb +++ b/app/views/devise/registrations/_api_key.html.erb @@ -4,21 +4,15 @@
Docs: <%= link_to "API documentation", '/api-docs', class: 'underline hover:no-underline' %>
- Usage example: +<%= api_v1_owntracks_points_url(api_key: current_user.api_key) %>
<%= api_v1_owntracks_points_url(api_key: current_user.api_key) %>
<%= api_v1_overland_batches_url(api_key: current_user.api_key) %>
<%= api_v1_overland_batches_url(api_key: current_user.api_key) %>
- <%= link_to "Generate new API key", generate_api_key_path, data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?", turbo_method: :post }, class: 'btn btn-primary' %> + <%= link_to "Generate new API key", generate_api_key_path, data: { confirm: "Are you sure? This will invalidate the current API key.", turbo_confirm: "Are you sure?", turbo_method: :post }, class: 'btn btn-primary' %>
diff --git a/app/views/settings/_navigation.html.erb b/app/views/settings/_navigation.html.erb index 4201daed..8b5e51e0 100644 --- a/app/views/settings/_navigation.html.erb +++ b/app/views/settings/_navigation.html.erb @@ -5,7 +5,4 @@ <%= link_to 'Background Jobs', settings_background_jobs_path, role: 'tab', class: "tab #{active_tab?(settings_background_jobs_path)}" %> <% end %> <%= link_to 'Map', settings_maps_path, role: 'tab', class: "tab #{active_tab?(settings_maps_path)}" %> - <% if !DawarichSettings.self_hosted? %> - <%= link_to 'Subscriptions', "#{MANAGER_URL}/auth/dawarich?token=#{current_user.generate_subscription_token}", role: 'tab', class: "tab" %> - <% end %> diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index fa0c2555..5ed2d096 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -120,6 +120,10 @@