avo 2.48.0 → 2.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/components/avo/fields/common/files/view_type/grid_item_component.html.erb +1 -1
- data/app/javascript/js/controllers/fields/date_field_controller.js +7 -3
- data/avo.gemspec +5 -4
- data/lib/avo/fields/date_time_field.rb +11 -4
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.base.js +59 -59
- data/public/avo-assets/avo.base.js.map +2 -2
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90b4bd0f7e6b9826427c149aa77090a5c5a3ed37818c9c53c55b36eed32500cd
|
4
|
+
data.tar.gz: b65a1cd540a5e130cca20d19fe6d064dba6788b95789551f5f12487c466504b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b362eb0a92f9be0d53e2ba6cb8117b56726cce1495346793c26ea1ac05f2db65a7e1fee842316f9608c20113dcb9e5eaba40d7899c8e86f0fe9d3f18d7cadd2f
|
7
|
+
data.tar.gz: 5fa3e7fb6e9ff428cdac5250b6ecb31e459a297b007be70c7614bd67c9fcd725fbb56d4715d1b63e788b845a261eb48b4f89f8d55f3612895c4746c4f50d983b
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<% if file.present? %>
|
3
3
|
<div class="flex flex-col h-full">
|
4
4
|
<% if file.representable? && is_image? %>
|
5
|
-
<%= image_tag helpers.main_app.url_for(file), class: "rounded-lg max-w-full #{@extra_classes}" %>
|
5
|
+
<%= image_tag helpers.main_app.url_for(file), class: "rounded-lg max-w-full self-start #{@extra_classes}" %>
|
6
6
|
<% elsif is_audio? %>
|
7
7
|
<%= audio_tag(helpers.main_app.url_for(file), controls: true, preload: false, class: 'w-full') %>
|
8
8
|
<% elsif is_video? %>
|
@@ -204,18 +204,22 @@ export default class extends Controller {
|
|
204
204
|
return
|
205
205
|
}
|
206
206
|
|
207
|
+
const timezonedDate = DateTime.fromISO(selectedDates[0].toISOString())
|
208
|
+
.setZone(this.displayTimezone, { keepLocalTime: true })
|
209
|
+
.setZone('UTC', { keepLocalTime: !this.relativeValue })
|
210
|
+
|
207
211
|
let value
|
208
212
|
switch (this.fieldTypeValue) {
|
209
213
|
case 'time':
|
210
214
|
// For time values, we should maintain the real value and format it to a time-friendly format.
|
211
|
-
value =
|
215
|
+
value = timezonedDate.toFormat(RAW_TIME_FORMAT)
|
212
216
|
break
|
213
217
|
case 'date':
|
214
|
-
value =
|
218
|
+
value = timezonedDate.toFormat(RAW_DATE_FORMAT)
|
215
219
|
break
|
216
220
|
default:
|
217
221
|
case 'dateTime':
|
218
|
-
value =
|
222
|
+
value = timezonedDate.toISO()
|
219
223
|
break
|
220
224
|
}
|
221
225
|
|
data/avo.gemspec
CHANGED
@@ -7,12 +7,13 @@ require "avo/version"
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = "avo"
|
9
9
|
spec.version = Avo::VERSION
|
10
|
-
spec.authors = ["Adrian Marin", "Mihai Marin"]
|
10
|
+
spec.authors = ["Adrian Marin", "Mihai Marin", "Paul Bob"]
|
11
11
|
spec.email = ["avo@avohq.io"]
|
12
12
|
spec.homepage = "https://avohq.io"
|
13
|
-
spec.summary = "
|
14
|
-
spec.description = "Avo
|
15
|
-
spec.license = "
|
13
|
+
spec.summary = "Admin panel framework and Content Management System for Ruby on Rails."
|
14
|
+
spec.description = "Avo is a very custom Content Management System for Ruby on Rails that saves engineers and teams months of development time by building user interfaces and logic using configuration rather than traditional coding; When configuration is not enough, you can fallback to familiar Ruby on Rails code."
|
15
|
+
spec.license = "LGPL-3.0"
|
16
|
+
spec.licenses = ["LGPL-3.0", "Commercial"]
|
16
17
|
|
17
18
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
19
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
@@ -43,19 +43,26 @@ module Avo
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def utc_time(value)
|
46
|
-
|
47
|
-
|
46
|
+
time = Time.parse(value)
|
47
|
+
|
48
|
+
if timezone.present? && !time.utc?
|
49
|
+
ActiveSupport::TimeZone.new(timezone).local_to_utc(time)
|
48
50
|
else
|
49
51
|
value
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
53
55
|
def timezone
|
54
|
-
if @timezone.respond_to?(:call)
|
56
|
+
timezone = if @timezone.respond_to?(:call)
|
55
57
|
return Avo::Hosts::ResourceViewRecordHost.new(block: @timezone, record: resource.model, resource: resource, view: view).handle
|
58
|
+
else
|
59
|
+
@timezone
|
56
60
|
end
|
57
61
|
|
58
|
-
|
62
|
+
# Fix for https://github.com/moment/luxon/issues/1358#issuecomment-2017477897
|
63
|
+
return "Etc/UTC" if timezone&.downcase == "utc" && view.in?([:new, :create, :edit, :update])
|
64
|
+
|
65
|
+
timezone
|
59
66
|
end
|
60
67
|
end
|
61
68
|
end
|
data/lib/avo/version.rb
CHANGED