pg_rails 7.0.8.pre.alpha.43 → 7.0.8.pre.alpha.45

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: a511a86c3378c0e8a02a7ffb6bae6dd1a42d20e78573fb52920084dca56408c5
4
- data.tar.gz: 99cf2d173fc85f09acfa308321a227043996b9a073f236039a9eac611a67e910
3
+ metadata.gz: 51044044d32796f5a93f9fcbaff4dbbc304750d17b06ea31adc4a569c6ac6aeb
4
+ data.tar.gz: da956e274b861c0aca4fb6a52ff2f0b1ffbe9e8bf24a917864de09cea13a1459
5
5
  SHA512:
6
- metadata.gz: a7b64b41e69d15acd510a795c9002877d3f50172e10837c6dcb0498ffb79c7a5e9b34e145e46cc1b08b80cbfb8e7d27216334031dfc2dccd657bfea1f972a7fb
7
- data.tar.gz: fcbbcf98a4c84399aeebb6727380ebddb41b24c755a113bbe9a61b4b3e0544ec2f8ee8d10e6c668533bf03dd33122b1c5ce60cf90a4a05f54e79a0cae927773f
6
+ metadata.gz: 164e7f6a1412103f63e35576c221145c592e908123c8f8d08942a8539578d970959d39a4c179a5779882add40fe673f9760657b13fa9ae6d010c8b9a6077d207
7
+ data.tar.gz: e0ac5127c12affbd5c16d2d03656e56c34d83af715ad838f49dc6f88c8da10c2d1713316bb1971e9cd38b13589507a5d117cbaef92aa96b7f58eca2cdc283b94
@@ -56,11 +56,9 @@ module PgEngine
56
56
 
57
57
  before_action do
58
58
  @breakpoint_navbar_expand = 'md'
59
- @navbar_opened_class = if cookies[:navbar_expand] == 'false'
60
- ''
61
- else
62
- 'opened'
63
- end
59
+ navbar_expanded = cookies[:navbar_expand] != 'false'
60
+ @navbar_opened_class = navbar_expanded ? 'opened' : ''
61
+ @navbar_chevron_class = navbar_expanded ? 'bi-chevron-left' : 'bi-chevron-right'
64
62
  @navbar = Navbar.new(Current.user)
65
63
 
66
64
  if Rollbar.configuration.enabled && Rails.application.credentials.rollbar.present?
@@ -45,7 +45,7 @@ class User < ApplicationRecord
45
45
  validates_uniqueness_of :email, message: 'ya pertenece a un usuario'
46
46
  validates_format_of :email, with: /\A[^@\s]+@[^@\s]+\z/
47
47
  validates_presence_of :password, if: :password_required?
48
- validates_confirmation_of :password, if: :password_required?, message: 'Las contraseñas no coinciden'
48
+ validates_confirmation_of :password, if: :password_required?, message: 'no coincide'
49
49
  validates_length_of :password, if: :password_required?, within: 6..128,
50
50
  message: 'es demasiado corta (6 caracteres mínimo)'
51
51
 
@@ -58,6 +58,10 @@ es:
58
58
  signed_in: ''
59
59
  signed_out: ''
60
60
  already_signed_out: ''
61
+ failure:
62
+ already_authenticated: ''
63
+ timeout: ''
64
+ unauthenticated: ''
61
65
  registrations:
62
66
  new:
63
67
  sign_up: Crear una cuenta
@@ -69,6 +69,22 @@ SimpleForm.setup do |config|
69
69
  b.use :hint, wrap_with: { class: 'form-text' }
70
70
  end
71
71
 
72
+ config.wrappers :vertical_form_inline_wrap, class: 'mb-3' do |b|
73
+ b.use :html5
74
+ b.use :placeholder
75
+ b.optional :maxlength
76
+ b.optional :minlength
77
+ b.optional :pattern
78
+ b.optional :min_max
79
+ b.optional :readonly
80
+ b.use :label, class: 'form-label d-block'
81
+ b.wrapper class: 'd-inline-block' do |bb|
82
+ bb.use :input, class: 'form-control', error_class: 'is-invalid'
83
+ end
84
+ b.use :error, wrap_with: { class: 'invalid-feedback' }
85
+ b.use :hint, wrap_with: { class: 'form-text' }
86
+ end
87
+
72
88
  config.wrappers :vertical_no_margin_control, &control_wrapper
73
89
 
74
90
  config.wrappers :vertical_no_margin_select, &select_wrapper
@@ -3,7 +3,14 @@ import Cookies from './../utils/cookies'
3
3
 
4
4
  export default class extends Controller {
5
5
  expandNavbar (e) {
6
- document.getElementById('sidebar').classList.toggle('opened')
6
+ const icon = this.element.querySelector('i')
7
+ if (document.getElementById('sidebar').classList.toggle('opened')) {
8
+ icon.classList.add('bi-chevron-left')
9
+ icon.classList.remove('bi-chevron-right')
10
+ } else {
11
+ icon.classList.remove('bi-chevron-left')
12
+ icon.classList.add('bi-chevron-right')
13
+ }
7
14
  const isOpened = document.getElementById('sidebar').classList.contains('opened')
8
15
  new Cookies().setCookie('navbar_expand', isOpened, 30)
9
16
  }
@@ -2,13 +2,16 @@
2
2
  <div class="container-fluid">
3
3
  <% unless @sidebar == false %>
4
4
  <button data-controller="navbar" data-action="navbar#expandNavbar" class="btn btn-outline-light me-2 d-none d-<%= @breakpoint_navbar_expand %>-inline-block">
5
- <i class="bi bi-list"></i>
5
+ <i class="bi <%= @navbar_chevron_class %>"></i>
6
6
  </button>
7
7
 
8
8
  <button class="btn btn-outline-light d-inline-block d-<%= @breakpoint_navbar_expand %>-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
9
9
  <i class="bi bi-list"></i>
10
10
  </button>
11
11
  <% end %>
12
+ <% @navbar.extensiones.each do |extension| %>
13
+ <%= extension %>
14
+ <% end %>
12
15
  <%= @navbar.logo if @navbar.logo.present? %>
13
16
  </div>
14
17
  </nav>
@@ -1,11 +1,11 @@
1
1
  <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
2
- <div class="offcanvas-header">
2
+ <div class="offcanvas-header" data-bs-theme="dark">
3
3
  <h5 class="offcanvas-title" id="offcanvasExampleLabel"></h5>
4
4
  <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
5
5
  </div>
6
6
  <div class="offcanvas-body">
7
7
  <% if user_signed_in? %>
8
- <span class="text-body-secondary"><%= Current.user %></span>
8
+ <span class="text-light"><%= Current.user %></span>
9
9
  <hr>
10
10
  <% end %>
11
11
  <ul class="list-unstyled mt-4">
@@ -15,16 +15,13 @@
15
15
  <li>
16
16
  <a
17
17
  href="<%= entry[:path] %>"
18
- class="<%= @navbar.active_entry?(entry, request) ? 'active' : '' %>"
18
+ class="text-light <%= @navbar.active_entry?(entry, request) ? 'active' : '' %>"
19
19
  <%= entry[:attributes] %>
20
20
  >
21
21
  <%= entry[:title] %>
22
22
  </a>
23
23
  </li>
24
24
  <% end %>
25
- <% @navbar.extensiones.each do |extension| %>
26
- <%= extension %>
27
- <% end %>
28
25
  </ul>
29
26
  </div>
30
27
  </div>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.43'
4
+ VERSION = '7.0.8-alpha.45'
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.43
4
+ version: 7.0.8.pre.alpha.45
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-04-23 00:00:00.000000000 Z
11
+ date: 2024-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails