lato 3.11.9 → 3.11.11
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 +4 -4
- data/README.md +6 -6
- data/app/assets/javascripts/lato/controllers/lato_account_form_user_controller.js +25 -0
- data/app/assets/javascripts/lato/controllers/lato_confirm_controller.js +9 -0
- data/app/assets/javascripts/lato/controllers/lato_form_controller.js +1 -0
- data/app/assets/javascripts/lato/controllers/lato_index_controller.js +5 -1
- data/app/views/lato/account/_form-user.html.erb +3 -3
- data/app/views/layouts/lato/application.html.erb +1 -1
- data/lib/lato/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7abffc5a49ac1151620093bbbc20eb6d6ca0f07f8cf743344cf6b5534096313b
|
4
|
+
data.tar.gz: d843192122d7b1ea406cbeb1f24870ed12a0fe241cb69f1f15a1a1f0fe6cf3ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf8863f913bee9ec716455993de1c158cd154bb4f20bfcfe252e158ed8526979a2c2daba47d566901bb9f6ae09ece88d5dbf18bdda957547a7c4b4d7700408fa
|
7
|
+
data.tar.gz: 94a979f232325dd11c41fc657562f21d27ab12ce3744e1573df93fc547938c525847181bcee4e440dbb0113c4bec4551faa265347aab13b16949685c4df100fe
|
data/README.md
CHANGED
@@ -5,15 +5,15 @@
|
|
5
5
|
Lato is a Rails Engine to deliver a full featured web panel for your [Rails](https://rubyonrails.org/) application.
|
6
6
|
|
7
7
|
This gem includes:
|
8
|
-
- User management with full authentication (signin, signup, recover password, email validation, Google Authenticator multi-factor authentication, ETH wallet connection);
|
9
|
-
- Web
|
10
|
-
-
|
8
|
+
- User management with **full authentication system** (signin, signup, recover password, email validation, Google Authenticator multi-factor authentication, ETH wallet connection) and **account management** (user settings, password change, email change, etc.);
|
9
|
+
- **Web interface** built with [Bootstrap](https://getbootstrap.com/) and [Bootstrap Icons](https://icons.getbootstrap.com/);
|
10
|
+
- **UI components integrated with Rails** (data tables, forms, modals, async job executions etc.);
|
11
11
|
|
12
|
-
The gem is
|
12
|
+
The gem is **agnostic to the application stack**. You can use it with different databases (PostgreSQL, MySQL, SQLite), different Job processors (Solid queue, Sidekiq, Delayed Job, etc.), different cache systems (Redis, Memcached, etc.).
|
13
13
|
|
14
|
-
The gem is
|
14
|
+
The gem is designed to be easily **customizable and extendable**. You can fully customize the UI and the functionalities of the panel. You can also add new functionalities and components to the panel on the main application or develop new engines to extend the panel.
|
15
15
|
|
16
|
-
The front-end is designed to be responsive, mobile friendly and accessible.
|
16
|
+
The gem is ready to be used with the **latest Rails 7+** features like **[ESM import maps](https://github.com/rails/importmap-rails)**, **[Turbo](https://turbo.hotwired.dev/)** and **[Stimulus](https://stimulus.hotwired.dev)**. The front-end is designed to be responsive, mobile friendly and accessible.
|
17
17
|
|
18
18
|
<img src="./preview.gif" alt="Lato preview" width="100%">
|
19
19
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
|
3
|
+
export default class extends Controller {
|
4
|
+
static targets = [
|
5
|
+
'emailInput',
|
6
|
+
'validateEmailLink'
|
7
|
+
]
|
8
|
+
|
9
|
+
connect() {
|
10
|
+
if (this.hasEmailInputTarget) this.emailInputOriginalValue = this.emailInputTarget.value
|
11
|
+
}
|
12
|
+
|
13
|
+
onEmailKeyUp(e) {
|
14
|
+
if (!this.hasEmailInputTarget || !this.hasValidateEmailLinkTarget) return
|
15
|
+
|
16
|
+
const newEmailInputValue = this.emailInputTarget.value
|
17
|
+
if (this.emailInputOriginalValue !== newEmailInputValue) {
|
18
|
+
this.validateEmailLinkTarget.classList.add('opacity-50')
|
19
|
+
this.validateEmailLinkTarget.style.pointerEvents = 'none'
|
20
|
+
} else {
|
21
|
+
this.validateEmailLinkTarget.classList.remove('opacity-50')
|
22
|
+
this.validateEmailLinkTarget.style.pointerEvents = 'auto'
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -8,6 +8,15 @@ export default class extends Controller {
|
|
8
8
|
connect() {
|
9
9
|
this.modal = new bootstrap.Modal(this.element)
|
10
10
|
Turbo.setConfirmMethod(this.customConfirm.bind(this))
|
11
|
+
|
12
|
+
this.element.style.zIndex = 2001
|
13
|
+
this.element.addEventListener('show.bs.modal', () => {
|
14
|
+
// update backdrop z-index to be sure is always above other modals
|
15
|
+
setTimeout(() => { // use setTimeout because bsModalBackdropElement is not always ready after 'show.bs.modal' event
|
16
|
+
const bsModalBackdropElement = this.modal._backdrop._element
|
17
|
+
if (bsModalBackdropElement) bsModalBackdropElement.style.zIndex = 2000
|
18
|
+
}, 1)
|
19
|
+
})
|
11
20
|
}
|
12
21
|
|
13
22
|
disconnect() {
|
@@ -9,8 +9,12 @@ export default class extends Controller {
|
|
9
9
|
connect() {
|
10
10
|
}
|
11
11
|
|
12
|
+
/**
|
13
|
+
* Events
|
14
|
+
*/
|
15
|
+
|
16
|
+
// This event is used to reset the pagination when the user types in the search input to start a new search.
|
12
17
|
onSearchKeyUp(e) {
|
13
|
-
// Search the input with name "page" inside this.element and force value to 1
|
14
18
|
const pageInput = this.element.querySelector('input[name="page"]')
|
15
19
|
if (pageInput) pageInput.value = 1
|
16
20
|
}
|
@@ -5,7 +5,7 @@ user ||= Lato::User.new
|
|
5
5
|
%>
|
6
6
|
|
7
7
|
<%= turbo_frame_tag 'account_form-user' do %>
|
8
|
-
<%= form_with model: user, url: lato.account_update_user_action_path, data: { turbo_frame: '_self', controller: 'lato-form' } do |form| %>
|
8
|
+
<%= form_with model: user, url: lato.account_update_user_action_path, data: { turbo_frame: '_self', controller: 'lato-form lato-account-form-user' } do |form| %>
|
9
9
|
<%= lato_form_notices class: %w[mb-3] %>
|
10
10
|
<%= lato_form_errors user, class: %w[mb-3] %>
|
11
11
|
|
@@ -23,7 +23,7 @@ user ||= Lato::User.new
|
|
23
23
|
<div class="col col-12 col-lg-4 mb-3">
|
24
24
|
<%= lato_form_item_label form, :email %>
|
25
25
|
<div class="input-group mb-3">
|
26
|
-
<%= lato_form_item_input_email form, :email, required: true %>
|
26
|
+
<%= lato_form_item_input_email form, :email, required: true, data: { lato_account_form_user_target: 'emailInput', action: 'keyup->lato-account-form-user#onEmailKeyUp' } %>
|
27
27
|
<% if user.email_verified_at %>
|
28
28
|
<button
|
29
29
|
class="btn btn-outline-success"
|
@@ -31,7 +31,7 @@ user ||= Lato::User.new
|
|
31
31
|
aria-label="<%= I18n.t('lato.email_verified') %>"
|
32
32
|
><%= I18n.t('lato.email_verified') %></span>
|
33
33
|
<% else %>
|
34
|
-
<%= link_to I18n.t('lato.verify_email'), account_request_verify_email_action_path, class: 'btn btn-warning', data: { turbo_method: :patch, turbo_frame: '_self' }, aria: { label: I18n.t('lato.verify_email') } %>
|
34
|
+
<%= link_to I18n.t('lato.verify_email'), account_request_verify_email_action_path, class: 'btn btn-warning', data: { turbo_method: :patch, turbo_frame: '_self', lato_account_form_user_target: 'validateEmailLink' }, aria: { label: I18n.t('lato.verify_email') } %>
|
35
35
|
<% end %>
|
36
36
|
</div>
|
37
37
|
</div>
|
@@ -52,9 +52,9 @@
|
|
52
52
|
<%= render 'layouts/lato/aside-opener' %>
|
53
53
|
<% end %>
|
54
54
|
|
55
|
+
<%= render 'layouts/lato/action' %>
|
55
56
|
<%= render 'layouts/lato/confirm' %>
|
56
57
|
<%= render 'layouts/lato/feedbacks' %>
|
57
|
-
<%= render 'layouts/lato/action' %>
|
58
58
|
<%= render 'layouts/lato/network' %>
|
59
59
|
|
60
60
|
<%= render 'layouts/lato/foot_content' %>
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.11.
|
4
|
+
version: 3.11.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- app/assets/javascripts/lato/application.js
|
155
155
|
- app/assets/javascripts/lato/controllers/application.js
|
156
156
|
- app/assets/javascripts/lato/controllers/index.js
|
157
|
+
- app/assets/javascripts/lato/controllers/lato_account_form_user_controller.js
|
157
158
|
- app/assets/javascripts/lato/controllers/lato_action_controller.js
|
158
159
|
- app/assets/javascripts/lato/controllers/lato_aside_opener_controller.js
|
159
160
|
- app/assets/javascripts/lato/controllers/lato_confirm_controller.js
|