diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml
index fba7cf12..597df91b 100644
--- a/.devcontainer/docker-compose.yml
+++ b/.devcontainer/docker-compose.yml
@@ -71,3 +71,4 @@ volumes:
dawarich_shared:
dawarich_public:
dawarich_watched:
+ dawarich_storage:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd34526c..131d28f6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -67,6 +67,7 @@ If your hardware doesn't have enough memory to migrate the imports, you can dele
- `rake points:migrate_to_lonlat` task now also reindexes the points table.
- Fixed filling `lonlat` column for old places after reverse geocoding.
- Deleting an import now correctly recalculates stats.
+- Datetime across the app is now being displayed in human readable format, i.e 26 Dec 2024, 13:49. Hover over the datetime to see the ISO 8601 timestamp.
# 0.25.3 - 2025-03-22
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a4a01a5e..e9045092 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -115,6 +115,17 @@ module ApplicationHelper
date.strftime('%e %B %Y')
end
+ def human_datetime(datetime)
+ return unless datetime
+
+ content_tag(
+ :span,
+ datetime.strftime('%e %b %Y, %H:%M'),
+ class: 'tooltip',
+ data: { tip: datetime.iso8601 }
+ )
+ end
+
def speed_text_color(speed)
return 'text-default' if speed.to_i >= 0
diff --git a/app/views/exports/index.html.erb b/app/views/exports/index.html.erb
index 8f9fa865..cc48435d 100644
--- a/app/views/exports/index.html.erb
+++ b/app/views/exports/index.html.erb
@@ -37,7 +37,7 @@
<% @exports.each do |export| %>
| <%= export.name %> |
- <%= export.created_at.strftime('%Y-%m-%d %H:%M:%S') %> |
+ <%= human_datetime(export.created_at) %> |
<%= export.status %> |
<% if export.completed? %>
diff --git a/app/views/imports/_import.html.erb b/app/views/imports/_import.html.erb
index a5d93b3c..aca91fd1 100644
--- a/app/views/imports/_import.html.erb
+++ b/app/views/imports/_import.html.erb
@@ -15,7 +15,7 @@
|
<%= "#{number_with_delimiter import.points.size}" %>
|
- <%= import.created_at.strftime("%d.%m.%Y, %H:%M") %> |
+ <%= human_datetime(import.created_at) %> |
diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb
index 56f136d7..54a7eb79 100644
--- a/app/views/imports/index.html.erb
+++ b/app/views/imports/index.html.erb
@@ -68,12 +68,17 @@
<%= number_with_delimiter import.reverse_geocoded_points_count %>
|
- <%= import.created_at.strftime("%d.%m.%Y, %H:%M") %> |
+ <%= human_datetime(import.created_at) %> |
<% end %>
+
+
+ <%= paginate @imports %>
+
+
<% end %>
diff --git a/app/views/places/index.html.erb b/app/views/places/index.html.erb
index 5ed9365f..fd899884 100644
--- a/app/views/places/index.html.erb
+++ b/app/views/places/index.html.erb
@@ -38,7 +38,7 @@
<% @places.each do |place| %>
| <%= place.name %> |
- <%= place.created_at.strftime('%Y-%m-%d %H:%M:%S') %> |
+ <%= human_datetime(place.created_at) %> |
<%= "#{place.lat}, #{place.lon}" %> |
<%= link_to 'Delete', place, data: { confirm: "Are you sure? Deleting a place will result in deleting all visits for this place.", turbo_confirm: "Are you sure? Deleting a place will result in deleting all visits for this place.", turbo_method: :delete }, method: :delete, class: "px-4 py-2 bg-red-500 text-white rounded-md" %>
diff --git a/app/views/points/_point.html.erb b/app/views/points/_point.html.erb
index f96f5714..6c0c238b 100644
--- a/app/views/points/_point.html.erb
+++ b/app/views/points/_point.html.erb
@@ -14,7 +14,7 @@
%>
|
<%= point.velocity %> |
- <%= point.recorded_at %> |
+ <%= human_datetime(point.recorded_at) %> |
<%= point.lat %>, <%= point.lon %> |
|
diff --git a/app/views/settings/users/index.html.erb b/app/views/settings/users/index.html.erb
index 087d0e23..dff5d2fb 100644
--- a/app/views/settings/users/index.html.erb
+++ b/app/views/settings/users/index.html.erb
@@ -26,7 +26,7 @@
<%= number_with_delimiter user.tracked_points.count %>
- <%= user.created_at.strftime('%Y-%m-%d %H:%M:%S') %>
+ <%= human_datetime(user.created_at) %>
|
<% end %>
diff --git a/bin/importmap b/bin/importmap
index 36502ab1..05b5f755 100755
--- a/bin/importmap
+++ b/bin/importmap
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
-require_relative "../config/application"
-require "importmap/commands"
+require_relative '../config/application'
+require 'importmap/commands'
diff --git a/config/importmap.rb b/config/importmap.rb
index 2eb08a74..0bef93f9 100644
--- a/config/importmap.rb
+++ b/config/importmap.rb
@@ -6,6 +6,7 @@ pin_all_from 'app/javascript/channels', under: 'channels'
pin 'application', preload: true
pin '@rails/actioncable', to: 'actioncable.esm.js'
+pin '@rails/activestorage', to: 'activestorage.esm.js'
pin '@hotwired/turbo-rails', to: 'turbo.min.js', preload: true
pin '@hotwired/stimulus', to: 'stimulus.min.js', preload: true
pin '@hotwired/stimulus-loading', to: 'stimulus-loading.js', preload: true
@@ -17,10 +18,8 @@ pin 'chartkick', to: 'chartkick.js'
pin 'Chart.bundle', to: 'Chart.bundle.js'
pin 'leaflet.heat' # @0.2.0
pin 'leaflet-draw' # @1.0.4
-pin '@rails/actioncable', to: 'actioncable.esm.js'
-pin_all_from 'app/javascript/channels', under: 'channels'
pin 'notifications_channel', to: 'channels/notifications_channel.js'
pin 'points_channel', to: 'channels/points_channel.js'
pin 'imports_channel', to: 'channels/imports_channel.js'
-pin "trix"
-pin "@rails/actiontext", to: "actiontext.esm.js"
+pin 'trix'
+pin '@rails/actiontext', to: 'actiontext.esm.js'