lesli_shield 0.1.0
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 +7 -0
- data/Rakefile +5 -0
- data/app/assets/config/lesli_shield_manifest.js +47 -0
- data/app/assets/images/lesli_shield/shield-logo.svg +1 -0
- data/app/assets/javascripts/lesli_shield/application.js +4428 -0
- data/app/assets/javascripts/lesli_shield/confirmations.js +60 -0
- data/app/assets/javascripts/lesli_shield/passwords.js +712 -0
- data/app/assets/javascripts/lesli_shield/registrations.js +712 -0
- data/app/assets/javascripts/lesli_shield/sessions.js +712 -0
- data/app/assets/stylesheets/lesli_shield/application.css +4 -0
- data/app/assets/stylesheets/lesli_shield/confirmations.css +19219 -0
- data/app/assets/stylesheets/lesli_shield/passwords.css +19202 -0
- data/app/assets/stylesheets/lesli_shield/registrations.css +19588 -0
- data/app/assets/stylesheets/lesli_shield/sessions.css +19588 -0
- data/app/controllers/lesli_shield/application_controller.rb +4 -0
- data/app/controllers/lesli_shield/dashboard/components_controller.rb +60 -0
- data/app/controllers/lesli_shield/dashboards_controller.rb +4 -0
- data/app/controllers/users/confirmations_controller.rb +66 -0
- data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
- data/app/controllers/users/passwords_controller.rb +71 -0
- data/app/controllers/users/registrations_controller.rb +141 -0
- data/app/controllers/users/sessions_controller.rb +141 -0
- data/app/controllers/users/unlocks_controller.rb +30 -0
- data/app/helpers/lesli_shield/application_helper.rb +4 -0
- data/app/helpers/lesli_shield/dashboards_helper.rb +4 -0
- data/app/jobs/lesli_shield/application_job.rb +4 -0
- data/app/mailers/lesli_shield/application_mailer.rb +6 -0
- data/app/models/lesli_shield/application_record.rb +5 -0
- data/app/models/lesli_shield/dashboard/component.rb +18 -0
- data/app/models/lesli_shield/dashboard.rb +31 -0
- data/app/views/devise/confirmations/new.html.erb +2 -0
- data/app/views/devise/confirmations/show.html.erb +63 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +79 -0
- data/app/views/devise/passwords/new.html.erb +75 -0
- data/app/views/devise/registrations/edit.html.erb +43 -0
- data/app/views/devise/registrations/new.html.erb +151 -0
- data/app/views/devise/sessions/new.html.erb +114 -0
- data/app/views/devise/shared/_demo.html.erb +7 -0
- data/app/views/devise/shared/_error_messages.html.erb +15 -0
- data/app/views/devise/shared/_links.html.erb +96 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/app/views/layouts/lesli_shield/application.html.erb +15 -0
- data/app/views/lesli_shield/dashboards/edit.html.erb +1 -0
- data/app/views/lesli_shield/dashboards/index.html.erb +1 -0
- data/app/views/lesli_shield/dashboards/new.html.erb +1 -0
- data/app/views/lesli_shield/dashboards/show.html.erb +1 -0
- data/config/initializers/devise.rb +336 -0
- data/config/locales/translations.en.yml +21 -0
- data/config/locales/translations.es.yml +21 -0
- data/config/locales/translations.fr.yml +21 -0
- data/config/locales/translations.it.yml +21 -0
- data/config/locales/translations.pt.yml +21 -0
- data/config/routes.rb +57 -0
- data/db/migrate/v1/0801000110_create_lesli_shield_accounts.rb +42 -0
- data/db/migrate/v1/0801050110_create_lesli_shield_dashboards.rb +51 -0
- data/db/migrate/v1/0801050210_create_lesli_shield_dashboard_components.rb +53 -0
- data/lib/lesli_shield/engine.rb +54 -0
- data/lib/lesli_shield/routing.rb +26 -0
- data/lib/lesli_shield/version.rb +4 -0
- data/lib/lesli_shield.rb +6 -0
- data/lib/scss/application.scss +0 -0
- data/lib/scss/confirmations.scss +58 -0
- data/lib/scss/devise/oauth.scss +34 -0
- data/lib/scss/passwords.scss +33 -0
- data/lib/scss/registrations.scss +35 -0
- data/lib/scss/sessions.scss +35 -0
- data/lib/tasks/lesli_shield_tasks.rake +4 -0
- data/lib/vue/application.js +76 -0
- data/lib/vue/apps/dashboards/components/engine-version.vue +71 -0
- data/lib/vue/confirmations.js +33 -0
- data/lib/vue/passwords.js +137 -0
- data/lib/vue/registrations.js +144 -0
- data/lib/vue/sessions.js +148 -0
- data/lib/vue/stores/translations.json +152 -0
- data/license +674 -0
- data/readme.md +71 -0
- metadata +168 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<%
|
|
2
|
+
=begin
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by https://www.lesli.tech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
=end
|
|
33
|
+
%>
|
|
34
|
+
|
|
35
|
+
<% content_for :application_custom_assets do %>
|
|
36
|
+
<script>
|
|
37
|
+
//setTimeout(() => { window.location.href = "/"; }, 10000)
|
|
38
|
+
</script>
|
|
39
|
+
<% end %>
|
|
40
|
+
|
|
41
|
+
<%= render("lesli/wrappers/application-devise-simple", title: "Account confirmation") do %>
|
|
42
|
+
|
|
43
|
+
<% if flash[:danger] %>
|
|
44
|
+
<% flash.each do |type, msg| %>
|
|
45
|
+
<div class="notification is-<%= type %>">
|
|
46
|
+
<%= msg %>
|
|
47
|
+
</div>
|
|
48
|
+
<% end %>
|
|
49
|
+
<% end %>
|
|
50
|
+
|
|
51
|
+
<% if flash[:success] %>
|
|
52
|
+
<div class="confirmation-message">
|
|
53
|
+
<svg version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
54
|
+
<path d="M256,6.998c-137.533,0-249,111.467-249,249c0,137.534,111.467,249,249,249s249-111.467,249-249 C505,118.464,393.533,6.998,256,6.998z M256,485.078c-126.309,0-229.08-102.771-229.08-229.081 c0-126.31,102.771-229.08,229.08-229.08c126.31,0,229.08,102.771,229.08,229.08C485.08,382.307,382.31,485.078,256,485.078z"/>
|
|
55
|
+
<polygon points="384.235,158.192 216.919,325.518 127.862,236.481 113.72,250.624 216.919,353.803 398.28,172.334"/>
|
|
56
|
+
</svg>
|
|
57
|
+
<p>Confirmation successfully</p>
|
|
58
|
+
</div>
|
|
59
|
+
<% end %>
|
|
60
|
+
|
|
61
|
+
<% end %>
|
|
62
|
+
|
|
63
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<p>Hello <%= @email %>!</p>
|
|
2
|
+
|
|
3
|
+
<% if @resource.try(:unconfirmed_email?) %>
|
|
4
|
+
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
|
|
5
|
+
<% else %>
|
|
6
|
+
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
|
2
|
+
|
|
3
|
+
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
|
4
|
+
|
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
|
|
6
|
+
|
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
|
2
|
+
|
|
3
|
+
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
|
4
|
+
|
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
|
6
|
+
|
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<%
|
|
2
|
+
=begin
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by https://www.lesli.tech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
=end
|
|
33
|
+
%>
|
|
34
|
+
|
|
35
|
+
<%= render("lesli/wrappers/application-devise-simple", title: "Cambiar contraseña") do %>
|
|
36
|
+
|
|
37
|
+
<form ref="form" @submit="putPasswordEdit">
|
|
38
|
+
<p v-if="notification.show" :class="[notification.type, 'is-size-5', 'mt-2']">
|
|
39
|
+
{{ notification.message }}
|
|
40
|
+
</p>
|
|
41
|
+
<div class="field mb-4">
|
|
42
|
+
<p class="label mb-2">Ingrese su nueva contraseña</p>
|
|
43
|
+
<p class="control has-icons-left">
|
|
44
|
+
<input
|
|
45
|
+
class="input"
|
|
46
|
+
type="password"
|
|
47
|
+
v-model="password_edit.new_password"
|
|
48
|
+
required="true"
|
|
49
|
+
name="user_email"
|
|
50
|
+
placeholder="Contraseña nueva"
|
|
51
|
+
/>
|
|
52
|
+
<span class="icon is-small is-left">
|
|
53
|
+
<i class="ri-key-line"></i>
|
|
54
|
+
</span>
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="field mb-4">
|
|
58
|
+
<p class="label mb-1">Confirmar contraseña</p>
|
|
59
|
+
<p class="control has-icons-left">
|
|
60
|
+
<input
|
|
61
|
+
class="input"
|
|
62
|
+
type="password"
|
|
63
|
+
v-model="password_edit.new_password_confirmation"
|
|
64
|
+
required="true"
|
|
65
|
+
name="user_email"
|
|
66
|
+
placeholder="Confirmar contraseña"
|
|
67
|
+
/>
|
|
68
|
+
<span class="icon is-small is-left">
|
|
69
|
+
<i class="ri-key-2-line"></i>
|
|
70
|
+
</span>
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="login-controls has-text-centered">
|
|
74
|
+
<button class="button is-primary">
|
|
75
|
+
Cambiar contraseña
|
|
76
|
+
</button>
|
|
77
|
+
</div>
|
|
78
|
+
</form>
|
|
79
|
+
<% end %>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<%
|
|
2
|
+
=begin
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by https://www.lesli.tech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
=end
|
|
33
|
+
%>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<%= render("lesli/wrappers/application-devise-simple", title: "Forgot your password?") do %>
|
|
37
|
+
|
|
38
|
+
<form class="has-text-centered" @submit="postPasswordNew" method="post">
|
|
39
|
+
|
|
40
|
+
<div class="field mb-4">
|
|
41
|
+
<p class="label mb-2">
|
|
42
|
+
Enter your email address you use in Lesli.
|
|
43
|
+
We'll send instructions for setting a new password to your email.
|
|
44
|
+
</p>
|
|
45
|
+
<p v-if="notification.show" :class="['help', notification.type, 'is-size-5', 'mt-2']">
|
|
46
|
+
{{ notification.message }}
|
|
47
|
+
</p>
|
|
48
|
+
<div class="control has-icons-left has-icons-right">
|
|
49
|
+
<input
|
|
50
|
+
class="input"
|
|
51
|
+
type="email"
|
|
52
|
+
v-model="sign_in.email"
|
|
53
|
+
required="true"
|
|
54
|
+
name="user_email"
|
|
55
|
+
placeholder="email"
|
|
56
|
+
/>
|
|
57
|
+
<span :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
|
|
58
|
+
<i class="ri-mail-lock-line"></i>
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="field">
|
|
64
|
+
<div class="control">
|
|
65
|
+
<button
|
|
66
|
+
type="submit"
|
|
67
|
+
:class="['button', 'is-primary', 'mb-2', {'is-loading':loading}]">
|
|
68
|
+
Send password reset instructions
|
|
69
|
+
</button>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</form>
|
|
73
|
+
|
|
74
|
+
<%= render("devise/shared/links", magic_link:false, otp:false, login:true) %>
|
|
75
|
+
<% end %>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
|
2
|
+
|
|
3
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
|
4
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
5
|
+
|
|
6
|
+
<div class="field">
|
|
7
|
+
<%= f.label :email %><br />
|
|
8
|
+
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
12
|
+
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<div class="field">
|
|
16
|
+
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
|
17
|
+
<%= f.password_field :password, autocomplete: "new-password" %>
|
|
18
|
+
<% if @minimum_password_length %>
|
|
19
|
+
<br />
|
|
20
|
+
<em><%= @minimum_password_length %> characters minimum</em>
|
|
21
|
+
<% end %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<%= f.label :password_confirmation %><br />
|
|
26
|
+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="field">
|
|
30
|
+
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
|
31
|
+
<%= f.password_field :current_password, autocomplete: "current-password" %>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="actions">
|
|
35
|
+
<%= f.submit "Update" %>
|
|
36
|
+
</div>
|
|
37
|
+
<% end %>
|
|
38
|
+
|
|
39
|
+
<h3>Cancel my account</h3>
|
|
40
|
+
|
|
41
|
+
<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
|
|
42
|
+
|
|
43
|
+
<%= link_to "Back", :back %>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<%
|
|
2
|
+
=begin
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
=end
|
|
33
|
+
%>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<%= render("lesli/wrappers/application-devise", title:"Create an account to discover Lesli") do %>
|
|
37
|
+
|
|
38
|
+
<%# Log in form %>
|
|
39
|
+
<form @submit.prevent="postRegistration" method="post">
|
|
40
|
+
<div class="field mb-4">
|
|
41
|
+
<label for="user_email" class="label">E-mail address</label>
|
|
42
|
+
<div class="control has-icons-left has-icons-right">
|
|
43
|
+
<input
|
|
44
|
+
id="user_email"
|
|
45
|
+
name="user_email"
|
|
46
|
+
type="email"
|
|
47
|
+
ref="email"
|
|
48
|
+
:class="['input', `is-${notification.type}`]"
|
|
49
|
+
placeholder="hello@lesli.cloud"
|
|
50
|
+
v-model="sign_up.email"
|
|
51
|
+
@input="typing">
|
|
52
|
+
<span
|
|
53
|
+
class="icon is-small is-left"
|
|
54
|
+
:class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
|
|
55
|
+
<i class="ri-mail-fill"></i>
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="field mb-5">
|
|
61
|
+
<label for="user_password" class="label">Password</label>
|
|
62
|
+
<div class="control has-icons-left has-icons-right">
|
|
63
|
+
<input
|
|
64
|
+
id="user_password"
|
|
65
|
+
name="user_password"
|
|
66
|
+
type="password"
|
|
67
|
+
ref="password"
|
|
68
|
+
:class="['input', `is-${notification.type}`]"
|
|
69
|
+
placeholder="* * * * * * *"
|
|
70
|
+
v-model="sign_up.password"
|
|
71
|
+
@input="typing">
|
|
72
|
+
<span
|
|
73
|
+
:class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
|
|
74
|
+
<i class="ri-key-fill"></i>
|
|
75
|
+
</span>
|
|
76
|
+
<span
|
|
77
|
+
@click="togglePasswordInput()"
|
|
78
|
+
:class="['icon', 'is-small', 'is-right', `has-text-${notification.type}`]">
|
|
79
|
+
<i class="ri-eye-fill"></i>
|
|
80
|
+
</span>
|
|
81
|
+
</div>
|
|
82
|
+
<p v-cloak v-if="notification.show" :class="['help', `is-${notification.type}`]">
|
|
83
|
+
{{ notification.message }}
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="field mb-5">
|
|
88
|
+
<p>Password needs to contain:</p>
|
|
89
|
+
<ul class="pl-3 password-requirements">
|
|
90
|
+
<li :class="[
|
|
91
|
+
'icon-text', 'is-block', {
|
|
92
|
+
'has-text-danger': password_uppercase == 1,
|
|
93
|
+
'has-text-success': password_uppercase == 2
|
|
94
|
+
}
|
|
95
|
+
]">
|
|
96
|
+
<span class="text">
|
|
97
|
+
• minimum one uppercase letter
|
|
98
|
+
</span>
|
|
99
|
+
<span class="icon">
|
|
100
|
+
<i class="ri-eye-fill"></i>
|
|
101
|
+
</span>
|
|
102
|
+
</li>
|
|
103
|
+
<li :class="[
|
|
104
|
+
'icon-text', 'is-block', {
|
|
105
|
+
'has-text-danger': password_symbol == 1,
|
|
106
|
+
'has-text-success': password_symbol == 2
|
|
107
|
+
}
|
|
108
|
+
]">
|
|
109
|
+
<span class="text">
|
|
110
|
+
• one symbol
|
|
111
|
+
</span>
|
|
112
|
+
<span class="icon">
|
|
113
|
+
<i class="ri-eye-fill"></i>
|
|
114
|
+
</span>
|
|
115
|
+
</li>
|
|
116
|
+
<li :class="[
|
|
117
|
+
'icon-text', 'is-block', {
|
|
118
|
+
'has-text-danger': password_number == 1,
|
|
119
|
+
'has-text-success': password_number == 2
|
|
120
|
+
}
|
|
121
|
+
]">
|
|
122
|
+
<span class="text">
|
|
123
|
+
• one number
|
|
124
|
+
</span>
|
|
125
|
+
<span class="icon">
|
|
126
|
+
<i class="ri-eye-fill"></i>
|
|
127
|
+
</span>
|
|
128
|
+
</li>
|
|
129
|
+
</ul>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<div class="field">
|
|
133
|
+
<p class="terms">
|
|
134
|
+
By creating an account, you agree to our <a><u><b>Terms</b></u></a> and have
|
|
135
|
+
read and acknowledge the <a><u><b>Global Privacy Statement</b></u></a>
|
|
136
|
+
</p>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="field">
|
|
140
|
+
<div class="control is-fullwidth">
|
|
141
|
+
<input type="submit" class="button is-primary is-fullwidth mb-2" value="Create account">
|
|
142
|
+
<p class="account has-text-centered">
|
|
143
|
+
Already have an account?
|
|
144
|
+
<%= link_to new_user_session_path, :class => "has-text-primary" do %>
|
|
145
|
+
<u><b>Log in</b></u>
|
|
146
|
+
<% end %>
|
|
147
|
+
</p>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</form>
|
|
151
|
+
<% end %>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<%
|
|
2
|
+
=begin
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by https://www.lesli.tech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
=end
|
|
33
|
+
%>
|
|
34
|
+
|
|
35
|
+
<%= render("lesli/wrappers/application-devise", title:"Welcome to Lesli") do %>
|
|
36
|
+
|
|
37
|
+
<%# Log in form %>
|
|
38
|
+
<form @submit.prevent="postLogin" method="post">
|
|
39
|
+
<% if Lesli.config.demo %>
|
|
40
|
+
<%= render("devise/shared/demo") %>
|
|
41
|
+
<% end %>
|
|
42
|
+
<div class="field mb-4">
|
|
43
|
+
<label for="user_email" class="label">E-mail address</label>
|
|
44
|
+
<div class="control has-icons-left has-icons-right">
|
|
45
|
+
<input
|
|
46
|
+
required
|
|
47
|
+
id="user_email"
|
|
48
|
+
name="user_email"
|
|
49
|
+
type="email"
|
|
50
|
+
ref="email"
|
|
51
|
+
:class="['input', `is-${notification.type}`]"
|
|
52
|
+
placeholder="hello@lesli.tech"
|
|
53
|
+
v-model="sign_in.email"
|
|
54
|
+
@input="typing">
|
|
55
|
+
<span :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
|
|
56
|
+
<i class="ri-user-line"></i>
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="field mb-5">
|
|
61
|
+
<label for="user_password" class="label">Password</label>
|
|
62
|
+
<div class="control has-icons-left has-icons-right">
|
|
63
|
+
<input
|
|
64
|
+
required
|
|
65
|
+
id="user_password"
|
|
66
|
+
name="user_password"
|
|
67
|
+
type="password"
|
|
68
|
+
ref="password"
|
|
69
|
+
:class="['input', `is-${notification.type}`]"
|
|
70
|
+
placeholder="* * * * * * *"
|
|
71
|
+
v-model="sign_in.password"
|
|
72
|
+
@input="typing">
|
|
73
|
+
<span :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
|
|
74
|
+
<i class="ri-key-fill"></i>
|
|
75
|
+
</span>
|
|
76
|
+
<span
|
|
77
|
+
@click="togglePasswordInput()"
|
|
78
|
+
:class="['icon', 'is-small', 'is-right', `has-text-${notification.type}`]">
|
|
79
|
+
<i class="ri-eye-fill"></i>
|
|
80
|
+
</span>
|
|
81
|
+
</div>
|
|
82
|
+
<p v-cloak v-if="notification.show" :class="['help', `is-${notification.type}`]">
|
|
83
|
+
{{ notification.message }}
|
|
84
|
+
</p>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="field mb-6">
|
|
88
|
+
<div class="control is-fullwidth">
|
|
89
|
+
<button
|
|
90
|
+
type="submit"
|
|
91
|
+
:class="['button', 'is-primary', 'is-fullwidth', 'mb-2', {'is-loading':loading}]">
|
|
92
|
+
Log in
|
|
93
|
+
</button>
|
|
94
|
+
<% if Lesli.config.security.dig(:allow_registration) %>
|
|
95
|
+
<p class="account has-text-centered">
|
|
96
|
+
Still not registered?
|
|
97
|
+
<%= link_to(new_user_registration_path, :class => "has-text-primary") do %>
|
|
98
|
+
<u><b>Create account</b></u>
|
|
99
|
+
<% end %>
|
|
100
|
+
</p>
|
|
101
|
+
<% end %>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="field mb-6" v-if="false">
|
|
106
|
+
<p class="message has-text-success">
|
|
107
|
+
Registration successfully done. Please check your E-mail to activate your account.
|
|
108
|
+
</p>
|
|
109
|
+
</div>
|
|
110
|
+
</form>
|
|
111
|
+
|
|
112
|
+
<%= render("devise/shared/links", password_reset:true, magic_link:false, otp:false) %>
|
|
113
|
+
|
|
114
|
+
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<% if resource.errors.any? %>
|
|
2
|
+
<div id="error_explanation" data-turbo-cache="false">
|
|
3
|
+
<h2>
|
|
4
|
+
<%= I18n.t("errors.messages.not_saved",
|
|
5
|
+
count: resource.errors.count,
|
|
6
|
+
resource: resource.class.model_name.human.downcase)
|
|
7
|
+
%>
|
|
8
|
+
</h2>
|
|
9
|
+
<ul>
|
|
10
|
+
<% resource.errors.full_messages.each do |message| %>
|
|
11
|
+
<li><%= message %></li>
|
|
12
|
+
<% end %>
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
15
|
+
<% end %>
|