pg_rails 7.0.8.pre.alpha.104 → 7.0.8.pre.alpha.106
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/assets/stylesheets/notifications.scss +6 -7
- data/pg_engine/app/components/notification_component.rb +3 -3
- data/pg_engine/app/components/notifications_bell_component.rb +1 -1
- data/pg_engine/app/overrides/activestorage_direct_uploads.rb +10 -0
- data/pg_engine/app/views/admin/eventos/new.html.slim +4 -1
- data/pg_engine/config/initializers/zeitwerk.rb +7 -0
- data/pg_engine/lib/pg_engine/engine.rb +6 -6
- data/pg_layout/app/views/pg_layout/_navbar.html.erb +1 -1
- data/pg_rails/lib/version.rb +1 -1
- data/pg_rails/scss/pg_rails.scss +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a9f062721d2900f647105438960c927cc262319bbbcb7f5216e259b500b6ab
|
4
|
+
data.tar.gz: 167d755004373fbaefab1b12b7b84c692bf31913e301ade7c813093ecd91a648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8356ae90a28fff08552492726f92fa54a351000950dcf82a6ac2733b3214d7b505b7a3cb18d358ac0e1deac8b8793c645e23fddaeba8a7184d8cd2317e199e74
|
7
|
+
data.tar.gz: 524ecc875a60ca7420196d87c0bdeae04b83ee1b6c025a72ea8ba6ca2a54b6e03622e01ea1f760b12f51c5a2b9e95c3f8b4eee6852605c54477395d609b0c144
|
@@ -27,7 +27,7 @@
|
|
27
27
|
flex-direction: column;
|
28
28
|
gap: 5px;
|
29
29
|
background-color: $primary;
|
30
|
-
padding: 1.5em
|
30
|
+
padding: 1.5em 1em;
|
31
31
|
}
|
32
32
|
|
33
33
|
#notifications-inner {
|
@@ -41,9 +41,7 @@
|
|
41
41
|
border: 1px solid #0003;
|
42
42
|
border-radius: 2px;
|
43
43
|
position: relative;
|
44
|
-
padding: 0.
|
45
|
-
padding-right: 0.5em;
|
46
|
-
xpadding-left: 2.5em;
|
44
|
+
padding: 0.5em;
|
47
45
|
display: flex;
|
48
46
|
align-items: stretch;
|
49
47
|
background-color: white;
|
@@ -58,11 +56,11 @@
|
|
58
56
|
.notification.unseen {
|
59
57
|
background-color: rgb(230, 225, 251);
|
60
58
|
}
|
61
|
-
.notification.unseen::before {
|
59
|
+
.notification.unseen .notification--time::before {
|
62
60
|
content: '';
|
63
61
|
padding: 5px;
|
64
|
-
|
65
|
-
|
62
|
+
right: 0.4em;
|
63
|
+
top: 0.4em;
|
66
64
|
position: absolute;
|
67
65
|
background-color: #079510;
|
68
66
|
border-radius: 50%;
|
@@ -75,4 +73,5 @@
|
|
75
73
|
.notification--time {
|
76
74
|
font-size: 0.8em;
|
77
75
|
min-width: 6em;
|
76
|
+
padding-top: 0.9em;
|
78
77
|
}
|
@@ -5,12 +5,12 @@ class NotificationComponent < BaseComponent
|
|
5
5
|
end
|
6
6
|
|
7
7
|
erb_template <<~ERB
|
8
|
-
<div class="notification d-flex justify-content-between <%= 'unseen' if @notification.unseen? %>"
|
8
|
+
<div class="notification d-flex flex-column flex-sm-row justify-content-between <%= 'unseen' if @notification.unseen? %>"
|
9
9
|
id="<%= dom_id(@notification) %>" data-id="<%= @notification.id %>">
|
10
|
-
<div>
|
10
|
+
<div class="pe-3">
|
11
11
|
<%= @notification.message.html_safe %>
|
12
12
|
</div>
|
13
|
-
<div class="notification--time d-flex flex-column justify-content-end text-body-tertiary text-end
|
13
|
+
<div class="notification--time d-flex flex-column justify-content-end text-body-tertiary text-end">
|
14
14
|
<div>
|
15
15
|
hace
|
16
16
|
<%= distance_of_time_in_words @notification.created_at, Time.zone.now %>
|
@@ -8,7 +8,7 @@ class NotificationsBellComponent < BaseComponent
|
|
8
8
|
erb_template <<~ERB
|
9
9
|
<div>
|
10
10
|
<% if @tooltip.present? %>
|
11
|
-
<div class="d-
|
11
|
+
<div class="d-inline-block text-white pg--notifications-bell--tooltip">
|
12
12
|
<%= @tooltip %>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MonkeyPatch para que las direct uploads usen el service
|
2
|
+
# local. Si se usa S3 es complicado, porque hay que setear
|
3
|
+
# la CORS config.
|
4
|
+
ActiveStorage::DirectUploadsController.class_eval do
|
5
|
+
alias_method :old_blob_args, :blob_args
|
6
|
+
|
7
|
+
def blob_args
|
8
|
+
old_blob_args.merge(service_name: :local)
|
9
|
+
end
|
10
|
+
end
|
@@ -2,7 +2,10 @@
|
|
2
2
|
= f.mensajes_de_error
|
3
3
|
|
4
4
|
= f.input :type, as: :select, collection: ApplicationNotifier.descendants.map(&:to_s)
|
5
|
-
|
5
|
+
- if params[:plain_text]
|
6
|
+
= f.input :message, as: :text
|
7
|
+
- else
|
8
|
+
= f.rich_text_area :message
|
6
9
|
= f.input :tooltip
|
7
10
|
= f.input :record_type
|
8
11
|
= f.input :record_id
|
@@ -13,13 +13,13 @@ module PgEngine
|
|
13
13
|
g.fallbacks[:pg_active_record] = :active_record
|
14
14
|
end
|
15
15
|
|
16
|
-
|
16
|
+
overrides = "#{PgEngine::Engine.root}/app/overrides"
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
config.to_prepare do
|
19
|
+
Dir.glob("#{overrides}/**/*.rb").each do |override|
|
20
|
+
load override
|
21
|
+
end
|
22
|
+
end
|
23
23
|
|
24
24
|
initializer 'pg_engine.set_exceptions_app' do
|
25
25
|
Rails.application.config.exceptions_app = Rails.application.routes
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<% if @notifications&.any? %>
|
29
29
|
<%= render NotificationComponent.with_collection(@notifications) if @notifications&.any? %>
|
30
30
|
<% else %>
|
31
|
-
<span class="text-light">
|
31
|
+
<span class="text-light text-center">
|
32
32
|
No hay notificaciones
|
33
33
|
</span>
|
34
34
|
<% end %>
|
data/pg_rails/lib/version.rb
CHANGED
data/pg_rails/scss/pg_rails.scss
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.8.pre.alpha.
|
4
|
+
version: 7.0.8.pre.alpha.106
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1044,6 +1044,7 @@ files:
|
|
1044
1044
|
- pg_engine/app/models/user_account.rb
|
1045
1045
|
- pg_engine/app/notifiers/application_notifier.rb
|
1046
1046
|
- pg_engine/app/notifiers/simple_user_notifier.rb
|
1047
|
+
- pg_engine/app/overrides/activestorage_direct_uploads.rb
|
1047
1048
|
- pg_engine/app/policies/account_policy.rb
|
1048
1049
|
- pg_engine/app/policies/email_log_policy.rb
|
1049
1050
|
- pg_engine/app/policies/email_policy.rb
|
@@ -1091,6 +1092,7 @@ files:
|
|
1091
1092
|
- pg_engine/config/initializers/devise.rb
|
1092
1093
|
- pg_engine/config/initializers/rollbar.rb
|
1093
1094
|
- pg_engine/config/initializers/simple_form_monkey_patch.rb
|
1095
|
+
- pg_engine/config/initializers/zeitwerk.rb
|
1094
1096
|
- pg_engine/config/locales/devise.en.yml
|
1095
1097
|
- pg_engine/config/locales/es.yml
|
1096
1098
|
- pg_engine/config/routes.rb
|