pg_rails 7.0.8.pre.alpha.105 → 7.0.8.pre.alpha.106

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6449fcb56114d2f214c03476b625c5dbcd2ebf416ddf87cfe23224432cc5a60e
4
- data.tar.gz: e84b73268092c987312c2530a53945f9281a2364b663e9c331abb8a971971f58
3
+ metadata.gz: e2a9f062721d2900f647105438960c927cc262319bbbcb7f5216e259b500b6ab
4
+ data.tar.gz: 167d755004373fbaefab1b12b7b84c692bf31913e301ade7c813093ecd91a648
5
5
  SHA512:
6
- metadata.gz: 750cd9d4dd72d4d6bda3e6ebc33edf23eda9d84d41090f6bd8cc5af2889ce04471c01a722c80249055608b7ffe2b0e9f417436252e64c38bfbda315d7f911aa1
7
- data.tar.gz: 4bd4276d1cc708cdbae0487aa74e180fc5974a71ce1d6e5046f45f7bc1c3a85cec2be3e5146188d2af0a55f5fd2aa8698ce171406d083f8c8717a5d3e480ca3f
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 5px;
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.3em 2.5em;
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
- left: 1em;
65
- vertical-align: middle;
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 ms-4">
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-none d-sm-inline-block text-white pg--notifications-bell--tooltip">
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
- = f.rich_text_area :message
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
@@ -0,0 +1,7 @@
1
+ Rails.autoloaders.main.ignore(
2
+ "#{PgEngine::Engine.root}/app/admin",
3
+ "#{PgEngine::Engine.root}/app/assets",
4
+ "#{PgEngine::Engine.root}/app/javascript",
5
+ "#{PgEngine::Engine.root}/app/overrides",
6
+ "#{PgEngine::Engine.root}/app/views"
7
+ )
@@ -13,13 +13,13 @@ module PgEngine
13
13
  g.fallbacks[:pg_active_record] = :active_record
14
14
  end
15
15
 
16
- # overrides = "#{PgEngine::Engine.root}/app/overrides"
16
+ overrides = "#{PgEngine::Engine.root}/app/overrides"
17
17
 
18
- # config.to_prepare do
19
- # Dir.glob("#{overrides}/**/*.rb").each do |override|
20
- # load override
21
- # end
22
- # end
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 %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.105'
4
+ VERSION = '7.0.8-alpha.106'
5
5
  end
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.105
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-21 00:00:00.000000000 Z
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