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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6fdaccc20ccfd58b84e38d8e40297b88dfeedbb6f7a15537f3e73c8b8df44ec
4
- data.tar.gz: c4ade51d7e5e236773a2bd383c7eb57450b62f7c34bd2e2de6dbfb31359bebe7
3
+ metadata.gz: e2a9f062721d2900f647105438960c927cc262319bbbcb7f5216e259b500b6ab
4
+ data.tar.gz: 167d755004373fbaefab1b12b7b84c692bf31913e301ade7c813093ecd91a648
5
5
  SHA512:
6
- metadata.gz: '009593f789f9711382f098a7fd6cbf71f944374c2da8a5f16c6cc1a3873793412ff03e5496d705e3533cfdb4c8796172b258a54d8becdf72a2253bdbc6404e0d'
7
- data.tar.gz: 639c41eb50e2a611522577a8bfc808257e8ca350e7b0a40632749ee6994c797da860de6d4eb39327885c0433f37a4292c2a7b8d7a9aa966f59a9de18dfa0da5b
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.104'
4
+ VERSION = '7.0.8-alpha.106'
5
5
  end
@@ -38,4 +38,4 @@ $alert-margin-bottom: 0.5rem;
38
38
 
39
39
  @import 'bootstrap-icons/font/bootstrap-icons';
40
40
 
41
- @import 'trix.css';
41
+ @import 'trix/dist/trix';
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.104
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