lato 3.6.0 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/lato/application.scss +10 -0
- data/app/controllers/lato/account_controller.rb +19 -7
- data/app/models/lato/user.rb +4 -0
- data/app/views/lato/account/_form-authenticator.html.erb +3 -3
- data/app/views/lato/components/_index.html.erb +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/it.yml +1 -1
- data/lib/lato/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b455041febf6fa0199543a3540a560dce02db7840ae8a6efc274018961b1d44
|
4
|
+
data.tar.gz: d0694e1fd297058319ddaac053256ed7fd053ca80a04cb41332e4b2dfe757b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d1b5d9c26e8d00013d9ca8304d893c397e0f01670a6a1a6deb502efce183d03dd9ae2c0d8c6fec689a66da6e1b4f573f363ebb3e79c5bab4e7380c8766434b
|
7
|
+
data.tar.gz: d091db10a8e2ae22476886330d068f817e5a5cad1893465a9d5d57b4fc14653624b0e6947da9debcd54b4a77c5782506df9c2273ae27ce16ee36e09b9b8546bc
|
@@ -66,6 +66,9 @@ main {
|
|
66
66
|
|
67
67
|
aside {
|
68
68
|
width: 280px;
|
69
|
+
max-height: 100vh;
|
70
|
+
position: sticky;
|
71
|
+
top: 0;
|
69
72
|
}
|
70
73
|
|
71
74
|
main, aside {
|
@@ -117,3 +120,10 @@ main, aside {
|
|
117
120
|
border-radius: 50%;
|
118
121
|
}
|
119
122
|
}
|
123
|
+
|
124
|
+
.lato-index-col-sort {
|
125
|
+
.btn {
|
126
|
+
font-size: 12px;
|
127
|
+
padding: 0.15rem 0.3rem;
|
128
|
+
}
|
129
|
+
}
|
@@ -58,13 +58,25 @@ module Lato
|
|
58
58
|
def update_authenticator_action
|
59
59
|
return respond_to_with_not_found unless Lato.config.authenticator_connection
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
if @session.user.authenticator_secret
|
62
|
+
respond_to do |format|
|
63
|
+
if @session.user.remove_authenticator_secret
|
64
|
+
format.html { redirect_to lato.account_path }
|
65
|
+
format.json { render json: @session.user }
|
66
|
+
else
|
67
|
+
format.html { render :index, status: :unprocessable_entity }
|
68
|
+
format.json { render json: @session.user.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
else
|
72
|
+
respond_to do |format|
|
73
|
+
if @session.user.generate_authenticator_secret
|
74
|
+
format.html { redirect_to lato.account_path }
|
75
|
+
format.json { render json: @session.user }
|
76
|
+
else
|
77
|
+
format.html { render :index, status: :unprocessable_entity }
|
78
|
+
format.json { render json: @session.user.errors, status: :unprocessable_entity }
|
79
|
+
end
|
68
80
|
end
|
69
81
|
end
|
70
82
|
end
|
data/app/models/lato/user.rb
CHANGED
@@ -12,17 +12,17 @@ user ||= Lato::User.new
|
|
12
12
|
<% if user.authenticator_secret %>
|
13
13
|
<div class="d-block d-md-flex align-items-stretch">
|
14
14
|
<div class="text-center mb-3 mb-md-0 me-md-3">
|
15
|
-
<img src="<%= user.authenticator_qr_code_base64 %>" />
|
15
|
+
<img class="shadow-sm rounded" src="<%= user.authenticator_qr_code_base64 %>" />
|
16
16
|
</div>
|
17
17
|
<div class="d-flex flex-column justify-content-between">
|
18
18
|
<div class="alert alert-light">
|
19
|
-
<p>
|
19
|
+
<p class="mb-0">
|
20
20
|
<%= raw I18n.t('lato.account_authenticator_ready_qr') %>
|
21
21
|
</p>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="d-flex justify-content-end">
|
25
|
-
<%= lato_form_submit form, I18n.t('lato.
|
25
|
+
<%= lato_form_submit form, I18n.t('lato.cancel_authenticator'), class: %w[btn-danger] %>
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
</div>
|
@@ -89,7 +89,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
|
|
89
89
|
column: column
|
90
90
|
}) %></span>
|
91
91
|
<% if sortable_columns.include?(column) %>
|
92
|
-
<div class="btn-group ms-3">
|
92
|
+
<div class="btn-group ms-3 lato-index-col-sort">
|
93
93
|
<div class="position-relative btn btn-sm <%= params[:sort_by] == "#{column}|ASC" ? 'btn-primary' : 'btn-outline-primary' %>">
|
94
94
|
<input type="submit" name="sort_by" value="<%= column %>|ASC" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0">
|
95
95
|
<i class="bi bi-sort-up"></i>
|
data/config/locales/en.yml
CHANGED
@@ -54,7 +54,7 @@ en:
|
|
54
54
|
account_authenticator_start_description: Generate a QR code by clicking the button below and scan it with the Google Authenticator app on your phone.<br>This will allow you to use the protect your account with a second factor authentication.
|
55
55
|
account_authenticator_ready_qr: Scan the QR code with the Google Authenticator app to use the account protection with a second factor authentication.
|
56
56
|
generate_qr_code: Generate QR code
|
57
|
-
|
57
|
+
cancel_authenticator: Disconnect
|
58
58
|
authenticator: Two-factor authentication
|
59
59
|
authenticator_code_help: Insert the code generated by the Google Authenticator app for the account <b>%{email}</b>
|
60
60
|
reset_password: Reset your password
|
data/config/locales/it.yml
CHANGED
@@ -56,7 +56,7 @@ it:
|
|
56
56
|
account_authenticator_start_description: Genera un codice QR cliccando il pulsante sottostante e scansionalo con l'app Google Authenticator sul tuo telefono.<br>Questo ti permetterà di proteggere il tuo account con un'autenticazione a due fattori.
|
57
57
|
account_authenticator_ready_qr: Scansiona il codice QR con l'app Google Authenticator per utilizzare la protezione dell'account con un'autenticazione a due fattori.
|
58
58
|
generate_qr_code: Genera codice QR
|
59
|
-
|
59
|
+
cancel_authenticator: Disconnetti
|
60
60
|
authenticator: Autenticazione a due fattori
|
61
61
|
authenticator_code_help: Inserisci il codice generato dall'app Google Authenticator per l'account <b>%{email}</b>
|
62
62
|
reset_password: Reimposta la tua password
|
data/lib/lato/version.rb
CHANGED