avo 2.48.0 → 2.50.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/menu/menu.rb +2 -0
- 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: 6ec2fc0304d9fb79831bfe41b68a8ca9b4df52526e2212f2e8db9cd073837ee8
|
4
|
+
data.tar.gz: 45b6b466d8528de3f7bbf182b53ce38b1efb5c14ad6958fa58e5ce4a83070a57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65de9dbd9c220bd8a9723f5e952db9339def09d0f4a9ec0470b3f7dca05d8c970591341cff79986167136821658ad5a400e74bdce12ea66c692108b53b82ffa4
|
7
|
+
data.tar.gz: 5732cf3b83f079b62f4eb4754114d759ad5a4ecc5673ddebe0e7da58f3ff48b294266945d2104ac70aa16681acdc3bafd09b81c2a7227851791786f19589a1f5
|
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/menu/menu.rb
CHANGED
data/lib/avo/version.rb
CHANGED