lato 3.11.4 → 3.11.6

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: 0f74224daab88d3ccd9e30a552503efaa04503a4e4e1bf103bf0aefa43a1d743
4
- data.tar.gz: 1995b2071e0ef30bfdcad2259dd90b7500af23506ac63fe77375ee8955b19920
3
+ metadata.gz: ef7bb310740a155bc6c9d002b6c9fe0b5e0b40ebd2218176369a0fa0b07c9866
4
+ data.tar.gz: 48ff0aabbbe4e5c107d716279c774be15370b3d4d6b3e12f1da29ed54bbb9ac7
5
5
  SHA512:
6
- metadata.gz: f22a9b7694ee48adbef3b63c1d02cf6ad00b4a719c71c2099576348c6726c5cf2edc7f9b6152d2213fc3dd7ffc9242ea29ac4fe96c3874a957a32e61707ed11b
7
- data.tar.gz: e14da8bcb3bffadcc298a41ad48e47fcdfd631a7025574f7a19e4f1a4377e9f8c449ba82ca5005216ec1b5ef130ab1da4870edeaf217d1bf8b158a7650ea520c
6
+ metadata.gz: a65ae7379545fe07f70a96b9c557f8aa2e4755ac2a9dc10a4b5051ec625d716c2baa8e9ec94629d05e1ef620875adc21b220a55baa954d5ee53dd71edb7214c0
7
+ data.tar.gz: fb374af295c90254e180ad5b1e82669ed6f9f1dbf825ed679afb121bd2d2903d568c3117f6e9e94f7e192f9189da721edc54262cdb819d0b0a27f5dc765a72d5
data/README.md CHANGED
@@ -1,11 +1,27 @@
1
1
  # Lato
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/lato.svg)](https://badge.fury.io/rb/lato)
4
+
3
5
  Lato is a Rails Engine to deliver a full featured web panel for your Rails application.
4
6
 
5
7
  This gem includes:
6
- - User management with full authentication (signin, signup, recover password);
8
+ - User management with full authentication (signin, signup, recover password, email validation, Google Authenticator multi-factor authentication, ETH wallet connection);
7
9
  - Web panel UI (Navbar, Sidebar, Body) with Bootstrap;
8
- - Some UI components ready to use integrated with Rails.
10
+ - Some UI components ready to use integrated with Rails (data tables, forms, modals, async job executions);
11
+
12
+ 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.
13
+
14
+ The gem is ready to be used with the **latest Rails 7+** features like **ESM import maps**, **Turbo** and **Stimulus**.
15
+
16
+ The front-end is designed to be responsive, mobile friendly and accessible.
17
+
18
+ <img src="./preview.gif" alt="Lato preview" width="100%">
19
+
20
+ ## Eco-system
21
+ The idea behind Lato is to create an eco-system of engines that can improve the functionalities of the panel. The following engines are already available:
22
+
23
+ - [LatoSpaces](https://github.com/Lato-org/lato_spaces): A simple engine to manage multiple workspaces in the panel with user invitation and workspace roles;
24
+ - [LatoSettings](https://github.com/Lato-org/lato_settings): A simple engine to manage application settings from the UI panel;
9
25
 
10
26
  ## Installation
11
27
  Add required dependencies to your application's Gemfile:
@@ -48,7 +48,9 @@ export default class extends Controller {
48
48
  try {
49
49
  this.suggestShowLoading()
50
50
  setTimeout(async () => {
51
- const response = await fetch(this.pathValue + '?q=' + value)
51
+ const url = new URL(this.pathValue, window.location.origin)
52
+ url.searchParams.append('q', value)
53
+ const response = await fetch(url)
52
54
  const data = await response.json()
53
55
  this.suggestShow(data)
54
56
  }, 500)
@@ -127,7 +129,9 @@ export default class extends Controller {
127
129
 
128
130
  async setDefaultElementValue() {
129
131
  try {
130
- const response = await fetch(this.pathValue + '?value=' + this.element.value)
132
+ const url = new URL(this.pathValue, window.location.origin)
133
+ url.searchParams.append('value', this.element.value)
134
+ const response = await fetch(url)
131
135
  const data = await response.json()
132
136
  this.element.value = data?.label || this.element.value
133
137
  } catch (err) {
@@ -6,4 +6,4 @@ module LatoUserApplication
6
6
  end
7
7
 
8
8
  # Add here custom methods
9
- end
9
+ end
@@ -25,9 +25,13 @@ user ||= Lato::User.new
25
25
  <div class="input-group mb-3">
26
26
  <%= lato_form_item_input_email form, :email, required: true %>
27
27
  <% if user.email_verified_at %>
28
- <button class="btn btn-outline-success" style="pointer-events: none"><%= I18n.t('lato.email_verified') %></span>
28
+ <button
29
+ class="btn btn-outline-success"
30
+ style="pointer-events: none"
31
+ aria-label="<%= I18n.t('lato.email_verified') %>"
32
+ ><%= I18n.t('lato.email_verified') %></span>
29
33
  <% else %>
30
- <%= link_to I18n.t('lato.verify_email'), account_request_verify_email_action_path, class: 'btn btn-warning', data: { turbo_method: :patch, turbo_frame: '_self' } %>
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') } %>
31
35
  <% end %>
32
36
  </div>
33
37
  </div>
@@ -15,7 +15,11 @@ user ||= Lato::User.new
15
15
  <%= lato_form_item_label form, :web3_address %>
16
16
  <div class="input-group">
17
17
  <input value="<%= user.web3_address %>" class="form-control" readonly>
18
- <button class="btn btn-outline-success" style="pointer-events: none"><%= I18n.t('lato.connected_wallet') %></button>
18
+ <button
19
+ class="btn btn-outline-success"
20
+ style="pointer-events: none"
21
+ aria-label="<%= I18n.t('lato.connected_wallet') %>"
22
+ ><%= I18n.t('lato.connected_wallet') %></button>
19
23
  </div>
20
24
  </div>
21
25
  </div>
@@ -18,7 +18,11 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
18
18
  <% if searchable_columns.any? %>
19
19
  <div class="input-group">
20
20
  <input type="text" name="search" class="form-control" placeholder="<%= I18n.t('lato.search_for') %>: <%= searchable_columns.map { |c| collection.model.human_attribute_name(c) }.to_sentence %>" value="<%= params[:search] %>">
21
- <button class="btn btn-outline-primary" type="submit"><i class="bi bi-search"></i></button>
21
+ <button
22
+ class="btn btn-outline-primary"
23
+ type="submit"
24
+ aria-label="<%= I18n.t('lato.search') %>"
25
+ ><i class="bi bi-search"></i></button>
22
26
  </div>
23
27
  <% else %>
24
28
  <div></div>
@@ -155,7 +159,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
155
159
  <div class="d-flex justify-content-end align-items-center">
156
160
  <span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
157
161
  <% if pagination_options %>
158
- <select name="per_page" class="ms-3 form-select form-select-sm w-auto" data-action="change->lato_form#submit">
162
+ <select name="per_page" class="ms-3 form-select form-select-sm w-auto" data-action="change->lato_form#submit" aria-label="<%= I18n.t('lato.per_page_description') %>">
159
163
  <% pagination_options.each do |option| %>
160
164
  <option value="<%= option %>" <%= option == params[:per_page].to_i ? 'selected' : '' %>>
161
165
  <%= option %> <%= I18n.t('lato.per_page').downcase %>
@@ -2,6 +2,7 @@
2
2
  class="aside-opener shadow"
3
3
  data-controller="lato-aside-opener"
4
4
  data-action="click->lato-aside-opener#onClickToggle"
5
+ aria-label="Toggle sidebar"
5
6
  >
6
7
  <i class="bi bi-layout-text-sidebar-reverse"></i>
7
8
  </button>
@@ -8,8 +8,18 @@
8
8
  <div class="modal-body" data-lato-confirm-target="modalBody">
9
9
  </div>
10
10
  <div class="modal-footer">
11
- <button type="button" class="btn btn-danger" data-action="click->lato-confirm#confirmCancel"><%= I18n.t('lato.confirm_no') %></button>
12
- <button type="button" class="btn btn-success" data-action="click->lato-confirm#confirmSuccess"><%= I18n.t('lato.confirm_yes') %></button>
11
+ <button
12
+ type="button"
13
+ class="btn btn-danger"
14
+ data-action="click->lato-confirm#confirmCancel"
15
+ aria-label="<%= I18n.t('lato.confirm_no') %>"
16
+ ><%= I18n.t('lato.confirm_no') %></button>
17
+ <button
18
+ type="button"
19
+ class="btn btn-success"
20
+ data-action="click->lato-confirm#confirmSuccess"
21
+ aria-label="<%= I18n.t('lato.confirm_yes') %>"
22
+ ><%= I18n.t('lato.confirm_yes') %></button>
13
23
  </div>
14
24
  </div>
15
25
  </div>
@@ -2,7 +2,7 @@
2
2
  <html lang="<%= I18n.locale %>">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,shrink-to-fit=no">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
6
6
  <title><%= @layout_page_title %></title>
7
7
  <%= csrf_meta_tags %>
8
8
  <%= csp_meta_tag %>
@@ -21,7 +21,7 @@
21
21
  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
22
22
 
23
23
  <%= stylesheet_link_tag Lato.config.assets_stylesheet_entry, media: "all" %>
24
- <%= javascript_importmap_tags %>
24
+ <%= javascript_importmap_tags Lato.config.assets_importmap_entry %>
25
25
  </head>
26
26
  <body
27
27
  class="controller-<%= controller_name %> action-<%= action_name %> <%= @layout_body_classes.join(' ') %>"
@@ -19,6 +19,7 @@ en:
19
19
  there_are_some_errors: There are some errors
20
20
  update_password: Update password
21
21
  confirm: Confirm
22
+ search: Search
22
23
  search_for: Search for
23
24
  total_results: Total results
24
25
  account_informations: Account informations
@@ -59,6 +60,7 @@ en:
59
60
  authenticator_code_help: Insert the code generated by the Google Authenticator app for the account <b>%{email}</b>
60
61
  reset_password: Reset your password
61
62
  per_page: Per page
63
+ per_page_description: Number of elements per page
62
64
  confirm_title: Confirm
63
65
  confirm_yes: Yes, confirm
64
66
  confirm_no: No, cancel
@@ -21,6 +21,7 @@ it:
21
21
  there_are_some_errors: Si sono verificati i seguenti errori
22
22
  update_password: Aggiornamento password
23
23
  confirm: Conferma
24
+ search: Cerca
24
25
  search_for: Ricerca per
25
26
  total_results: Risultati totali
26
27
  account_informations: Informazioni account
@@ -61,6 +62,7 @@ it:
61
62
  authenticator_code_help: Inserisci il codice generato dall'app Google Authenticator per l'account <b>%{email}</b>
62
63
  reset_password: Reimposta la tua password
63
64
  per_page: Per pagina
65
+ per_page_description: Elementi per pagina
64
66
  confirm_title: Conferma
65
67
  confirm_yes: Sì, procedi
66
68
  confirm_no: No, annulla
data/lib/lato/config.rb CHANGED
@@ -14,6 +14,7 @@ module Lato
14
14
 
15
15
  # Assets configs
16
16
  attr_accessor :assets_stylesheet_entry
17
+ attr_accessor :assets_importmap_entry
17
18
 
18
19
  # Email configs
19
20
  attr_accessor :email_from
@@ -41,6 +42,7 @@ module Lato
41
42
  @auth_disable_authenticator = false
42
43
 
43
44
  @assets_stylesheet_entry = 'application'
45
+ @assets_importmap_entry = 'application'
44
46
 
45
47
  @session_lifetime = 30.days
46
48
  @session_root_path = nil # :tutorial_path
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.11.4"
2
+ VERSION = "3.11.6"
3
3
  end
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.11.4
4
+ version: 3.11.6
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-02-13 00:00:00.000000000 Z
11
+ date: 2025-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails