pg_rails 7.0.8.pre.alpha.42 → 7.0.8.pre.alpha.44

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: eae95722a5c742a339e40bffb5495f911f9bc44e77aab21c27ad50019d2db7d2
4
- data.tar.gz: ca1e43109b3c16974bc272e35257e6dcae606b2fc195e996436dfbf7860fbd56
3
+ metadata.gz: 24ba4e7696371a6111d27203476e573c6ea9d0a182f8495a9109effa3ea310e7
4
+ data.tar.gz: ff5baec88b8d412bd3cf462c51afeddaa457ded9c999f47d14d350951f2a1497
5
5
  SHA512:
6
- metadata.gz: 07fd10c304f3bfdaa3fef2e08aad45f9f36e0d869c7e68c3a76f82f52e80260871a4d8b129f270d4bea312f05d0b416532d315f5e9413bbc08a1e961750a6666
7
- data.tar.gz: 8d0a25184049339ec20bcc7d0fc46eabcde6e9a7cde39795d25d9123163268a4c4b40b76cc610a6edef08e29de9c90a1a59e78ba0a0b34d2d9e47aaf95c9c80d
6
+ metadata.gz: 90fe56d611f0804685215c9624d6eeae554c8caae3904e224d6a8904623753fc51e47b12eb3208060c9f6194719ec5ba064b643d0b92c59d7cea36cf81799bdd
7
+ data.tar.gz: c633ac8e64af14d6ae0afb11c53d6944c1358e081e871656c9490f2184d3488e565c80217b5f78fdf0a91af6ccb38d43cde746335fe97b2916734b7fb21d6d01
@@ -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,9 @@ es:
58
58
  signed_in: ''
59
59
  signed_out: ''
60
60
  already_signed_out: ''
61
+ already_authenticated: ''
62
+ timeout: ''
63
+ unauthenticated: ''
61
64
  registrations:
62
65
  new:
63
66
  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
  }
@@ -30,12 +30,6 @@
30
30
  </div>
31
31
  <% end %>
32
32
 
33
- <h3><%= t(".cancel_my_account") %></h3>
34
-
35
- <div><%= t(".unhappy") %> <%= button_to t(".cancel_my_account"), registration_path(resource_name), data: { confirm: t(".are_you_sure"), turbo_confirm: t(".are_you_sure") }, method: :delete %></div>
36
-
37
- <%= link_to t("devise.shared.links.back"), :back %>
38
-
39
33
  <style type="text/css" media="screen">
40
34
  form {
41
35
  max-width: 22em;
@@ -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.42'
4
+ VERSION = '7.0.8-alpha.44'
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.42
4
+ version: 7.0.8.pre.alpha.44
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