lato 3.14.2 → 3.14.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e875480609c4aaa1b932e6f1deaee666a2a3df6e30c86dafcd487bf874c7807
|
4
|
+
data.tar.gz: 2598d84609cc7be515b88e903e101dde2ef8fa8b95e2943b345818380c7354a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fd18d8715d6eda3955dcaad2781d6217becec2cc7aaf722aa52f55ad42a0d40f459322a825aa5b0836a81c004ac4f96119eaf08aa0ccaada0542e29c9f1ca14
|
7
|
+
data.tar.gz: a1dba640c648db9b3a12b29211b8e25566c9a54366b274d528e181e8772146c56dffee945f05cede88298876948c5fa2fbda859d174ce228783261807186b43b
|
@@ -41,7 +41,7 @@ module Lato
|
|
41
41
|
# This method is used to get the real ip of the user when the application is behind a proxy.
|
42
42
|
# For example if the application is behind a nginx proxy the request.remote_ip will be the ip of the proxy and not the ip of the user.
|
43
43
|
def override_request_remote_ip
|
44
|
-
request.remote_ip = request.headers['X-Forwarded-For'] if request.headers['X-Forwarded-For']
|
44
|
+
request.remote_ip = request.headers['X-Forwarded-For'].split(',').first if request.headers['X-Forwarded-For']
|
45
45
|
end
|
46
46
|
|
47
47
|
# This method set the default locale for the application.
|
@@ -293,7 +293,6 @@ module Lato
|
|
293
293
|
"remoteip" => request.remote_ip
|
294
294
|
})
|
295
295
|
result = JSON.parse(response.body)
|
296
|
-
Rails.logger.info("[hCaptcha] Verification remoteip: #{request.remote_ip}")
|
297
296
|
Rails.logger.info("[hCaptcha] Verification result: #{result}")
|
298
297
|
unless result["success"]
|
299
298
|
@user.errors.add(:base, "hCaptcha verification failed")
|
@@ -21,11 +21,11 @@ module Lato
|
|
21
21
|
# Sidebar
|
22
22
|
##
|
23
23
|
|
24
|
-
def lato_sidebar_nav_item(key, path, &block)
|
24
|
+
def lato_sidebar_nav_item(key, path, external: false, &block)
|
25
25
|
active = request.path == path
|
26
26
|
active = @sidebar_key == key if @sidebar_key
|
27
27
|
|
28
|
-
render 'lato/components/sidebar_nav_item', active: active, path: path do
|
28
|
+
render 'lato/components/sidebar_nav_item', active: active, path: path, external: external do
|
29
29
|
yield if block
|
30
30
|
end
|
31
31
|
end
|
@@ -1,5 +1,18 @@
|
|
1
|
+
<%
|
2
|
+
|
3
|
+
link_to_options = {
|
4
|
+
class: ['nav-link position-relative', (active ? 'active' : 'link-dark')].join(' '),
|
5
|
+
}
|
6
|
+
link_to_options[:target] = '_blank' if external
|
7
|
+
|
8
|
+
%>
|
9
|
+
|
1
10
|
<li class="nav-item border-bottom py-2">
|
2
|
-
<%= link_to path,
|
11
|
+
<%= link_to path, link_to_options do %>
|
3
12
|
<%= yield %>
|
13
|
+
|
14
|
+
<% if external %>
|
15
|
+
<i class="bi bi-arrow-up-right position-absolute end-0 top-50 translate-middle-y me-2" style="font-size: 0.75rem"></i>
|
16
|
+
<% end %>
|
4
17
|
<% end %>
|
5
18
|
</li>
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.14.
|
4
|
+
version: 3.14.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|