lato 3.10.7 → 3.10.8
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/app/assets/javascripts/lato/controllers/lato_confirm_controller.js +43 -0
- data/app/views/layouts/lato/_confirm.html.erb +16 -0
- data/app/views/layouts/lato/application.html.erb +1 -0
- data/config/locales/en.yml +3 -0
- data/config/locales/it.yml +3 -0
- data/lib/lato/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 436b3cbfc43edde86ae58caf74ab64c3502e29a429d655c4098ea9ee47dfe182
|
4
|
+
data.tar.gz: 91cc005d8f5814e7a800505b9a03cc04d2be784eebd321d9f1f0a7ecf4422ca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0633016cf6ca20a809c5a870f0692e776ca10c9cf209c43c03befcb7cbe921f923a5a79e266bf3dde482e9a7355cccb4635c7a823a4821746f7df77eda866b20
|
7
|
+
data.tar.gz: acba4819ac1541b78e2dbcb6e98d4b2adf79161144ffacebe7e2dd427d766c6dc11b07d29ad3cfdf5e62cb055b774aa9621eedeb40cc46b71e60cf64a9caa992
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus"
|
2
|
+
|
3
|
+
export default class extends Controller {
|
4
|
+
static targets = [
|
5
|
+
'modalBody'
|
6
|
+
]
|
7
|
+
|
8
|
+
connect() {
|
9
|
+
this.modal = new bootstrap.Modal(this.element)
|
10
|
+
Turbo.setConfirmMethod(this.customConfirm.bind(this))
|
11
|
+
}
|
12
|
+
|
13
|
+
disconnect() {
|
14
|
+
Turbo.setConfirmMethod(window.confirm)
|
15
|
+
}
|
16
|
+
|
17
|
+
async customConfirm(message) {
|
18
|
+
this.modalBodyTarget.innerHTML = message
|
19
|
+
this.modal.show()
|
20
|
+
|
21
|
+
this._result = undefined
|
22
|
+
while (this._result === undefined) {
|
23
|
+
await new Promise(resolve => setTimeout(resolve, 100))
|
24
|
+
}
|
25
|
+
|
26
|
+
return this._result
|
27
|
+
}
|
28
|
+
|
29
|
+
confirmSuccess() {
|
30
|
+
this.hideModal()
|
31
|
+
this._result = true
|
32
|
+
}
|
33
|
+
|
34
|
+
confirmCancel() {
|
35
|
+
this.hideModal()
|
36
|
+
this._result = false
|
37
|
+
}
|
38
|
+
|
39
|
+
hideModal() {
|
40
|
+
this.modal.hide()
|
41
|
+
setTimeout(() => this.modalBodyTarget.innerHTML = '', 500)
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="modal fade" data-controller="lato-confirm" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
2
|
+
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="modal-header">
|
5
|
+
<h2 class="mb-0 mt-0 fs-4"><%= I18n.t('lato.confirm_title') %></h2>
|
6
|
+
<button type="button" class="btn-close" data-action="click->lato-confirm#confirmCancel" aria-label="Close"></button>
|
7
|
+
</div>
|
8
|
+
<div class="modal-body" data-lato-confirm-target="modalBody">
|
9
|
+
</div>
|
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>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
data/config/locales/en.yml
CHANGED
@@ -59,6 +59,9 @@ en:
|
|
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
|
61
61
|
per_page: Per page
|
62
|
+
confirm_title: Confirm
|
63
|
+
confirm_yes: Yes, confirm
|
64
|
+
confirm_no: No, cancel
|
62
65
|
|
63
66
|
invitation_mailer:
|
64
67
|
invite_mail_subject: You received an invitation
|
data/config/locales/it.yml
CHANGED
@@ -61,6 +61,9 @@ it:
|
|
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
|
63
63
|
per_page: Per pagina
|
64
|
+
confirm_title: Conferma
|
65
|
+
confirm_yes: Sì, procedi
|
66
|
+
confirm_no: No, annulla
|
64
67
|
|
65
68
|
invitation_mailer:
|
66
69
|
invite_mail_subject: Hai ricevuto un invito
|
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.10.
|
4
|
+
version: 3.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- app/assets/javascripts/lato/controllers/index.js
|
157
157
|
- app/assets/javascripts/lato/controllers/lato_action_controller.js
|
158
158
|
- app/assets/javascripts/lato/controllers/lato_aside_opener_controller.js
|
159
|
+
- app/assets/javascripts/lato/controllers/lato_confirm_controller.js
|
159
160
|
- app/assets/javascripts/lato/controllers/lato_feedback_controller.js
|
160
161
|
- app/assets/javascripts/lato/controllers/lato_form_controller.js
|
161
162
|
- app/assets/javascripts/lato/controllers/lato_hello_controller.js
|
@@ -231,6 +232,7 @@ files:
|
|
231
232
|
- app/views/lato/operations/show.html.erb
|
232
233
|
- app/views/layouts/lato/_action.html.erb
|
233
234
|
- app/views/layouts/lato/_aside-opener.html.erb
|
235
|
+
- app/views/layouts/lato/_confirm.html.erb
|
234
236
|
- app/views/layouts/lato/_content.html.erb
|
235
237
|
- app/views/layouts/lato/_feedbacks.html.erb
|
236
238
|
- app/views/layouts/lato/_foot_content.html.erb
|