lesli 5.0.11 → 5.0.12
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/config/lesli_manifest.js +0 -13
- data/app/assets/icons/lesli/engine-security.svg +1 -0
- data/app/assets/icons/lesli/engine-shield.svg +1 -0
- data/app/assets/images/lesli/lesli-logo.svg +4 -0
- data/app/assets/stylesheets/lesli/templates/application.css +21862 -209
- data/app/assets/stylesheets/lesli/templates/public.css +19098 -1
- data/app/assets/stylesheets/lesli/users/confirmations.css +19219 -0
- data/app/assets/stylesheets/lesli/users/passwords.css +19202 -0
- data/app/assets/stylesheets/lesli/users/registrations.css +19594 -0
- data/app/assets/stylesheets/lesli/users/sessions.css +19594 -1
- data/app/controllers/lesli/abouts_controller.rb +12 -18
- data/app/controllers/lesli/application_controller.rb +25 -25
- data/app/controllers/lesli/application_lesli_controller.rb +5 -6
- data/app/controllers/lesli/interfaces/application/authorization.rb +1 -1
- data/app/controllers/lesli/interfaces/application/customization.rb +1 -1
- data/app/controllers/lesli/interfaces/application/requester.rb +2 -2
- data/app/controllers/lesli/interfaces/application/responder.rb +8 -8
- data/app/controllers/lesli/interfaces/controllers/actions.rb +250 -0
- data/app/controllers/lesli/interfaces/controllers/activities.rb +215 -0
- data/app/controllers/lesli/interfaces/controllers/discussions.rb +270 -0
- data/app/controllers/lesli/interfaces/controllers/files.rb +467 -0
- data/app/controllers/lesli/interfaces/controllers/subscribers.rb +234 -0
- data/app/helpers/lesli/assets_helper.rb +4 -4
- data/app/helpers/lesli/navigation_helper.rb +38 -81
- data/app/lib/lesli/system.rb +4 -3
- data/app/models/concerns/account_initializer.rb +46 -42
- data/{lib/scss/devise/registrations.scss → app/models/lesli/account/detail.rb} +7 -3
- data/app/models/lesli/account.rb +12 -5
- data/app/models/lesli/cloud_object/action.rb +70 -0
- data/app/models/lesli/cloud_object/activity.rb +311 -0
- data/app/models/lesli/cloud_object/custom_field.rb +158 -0
- data/app/models/lesli/cloud_object/discussion.rb +219 -0
- data/app/models/lesli/cloud_object/subscriber.rb +186 -0
- data/app/models/lesli/shared/dashboard.rb +16 -5
- data/app/models/lesli/user/session.rb +0 -2
- data/app/models/lesli/user.rb +13 -13
- data/app/operators/lesli/user_registration_operator.rb +3 -3
- data/app/views/lesli/layouts/application-devise.html.erb +6 -6
- data/app/views/lesli/layouts/application-lesli.html.erb +1 -1
- data/app/views/lesli/partials/_application-data.html.erb +2 -1
- data/app/views/lesli/partials/_application-lesli-engines.html.erb +14 -39
- data/app/views/lesli/partials/_application-lesli-header.html.erb +4 -4
- data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
- data/app/views/lesli/partials/_application-lesli-panels.html.erb +7 -7
- data/app/views/lesli/wrappers/_application-devise.html.erb +5 -7
- data/config/initializers/devise.rb +335 -335
- data/config/initializers/lesli.rb +2 -1
- data/config/locales/translations.en.yml +4 -0
- data/config/locales/translations.es.yml +4 -0
- data/config/locales/translations.fr.yml +28 -0
- data/config/locales/translations.it.yml +28 -0
- data/config/locales/translations.pt.yml +28 -0
- data/config/routes.rb +1 -10
- data/db/migrate/{v1.0/0010003010_create_lesli_user_details.rb → v1/0010000110_create_lesli_accounts.rb} +19 -13
- data/db/migrate/{v1.0/0010000110_create_lesli_accounts.rb → v1/0010001010_create_lesli_account_details.rb} +5 -7
- data/db/migrate/{v1.0/0010001010_create_lesli_account_settings.rb → v1/0010001110_create_lesli_account_settings.rb} +2 -2
- data/db/seed/development/accounts.rb +10 -7
- data/db/seed/development/users.rb +20 -20
- data/db/seed/production/accounts.rb +10 -7
- data/lib/lesli/engine.rb +2 -12
- data/lib/lesli/version.rb +2 -2
- data/lib/lesli.rb +0 -1
- data/lib/scss/cloud-objects/discussion.scss +8 -5
- data/lib/scss/layouts/application-header.scss +3 -1
- data/lib/scss/layouts/application-navbar.scss +2 -1
- data/lib/scss/{elements/msg.scss → overrides/notification.scss} +16 -18
- data/lib/scss/pages/devise-simple.scss +4 -2
- data/lib/scss/pages/devise.scss +111 -107
- data/lib/scss/panels/panel-notification.scss +1 -1
- data/lib/scss/panels/{panel-ticket.scss → panel-support-ticket.scss} +3 -4
- data/lib/scss/templates/application.scss +7 -5
- data/lib/tasks/lesli/controllers.rake +1 -1
- data/lib/tasks/lesli/db.rake +24 -12
- data/lib/tasks/lesli_tasks.rake +6 -6
- data/lib/vue/application.js +13 -12
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/content.vue +10 -8
- data/lib/vue/cloudobjects/discussion/element.vue +170 -0
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/filters.vue +1 -1
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/new.vue +20 -16
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion.vue +25 -24
- data/lib/vue/{refactor/stores/cloudobjects → cloudobjects/stores}/discussion.js +7 -16
- data/lib/vue/layouts/application-header.vue +5 -5
- data/lib/vue/panels/{panel-notifications.vue → panel-bell-notifications.vue} +15 -19
- data/lib/vue/panels/panel-support-tickets.vue +161 -0
- data/lib/vue/panels/stores/bell-notifications.js +46 -0
- data/lib/vue/panels/stores/support-tickets.js +103 -0
- data/lib/vue/shared/dashboards/apps/edit.vue +10 -10
- data/lib/vue/shared/dashboards/components/form.vue +31 -40
- data/lib/vue/shared/stores/dashboard.js +2 -0
- data/lib/vue/shared/stores/layout.js +2 -1
- data/lib/{scss/devise/confirmations.scss → vue/shared/stores/users.js} +22 -21
- data/lib/vue/stores/translations.json +109 -2
- data/lib/webpack/base.js +9 -8
- data/lib/webpack/core.js +8 -6
- data/readme.md +16 -15
- metadata +49 -76
- data/app/assets/icons/lesli/engine-guard.svg +0 -1
- data/app/assets/javascripts/lesli/users/sessions.js +0 -1
- data/app/controllers/users/confirmations_controller.rb +0 -66
- data/app/controllers/users/omniauth_callbacks_controller.rb +0 -30
- data/app/controllers/users/passwords_controller.rb +0 -71
- data/app/controllers/users/registrations_controller.rb +0 -141
- data/app/controllers/users/sessions_controller.rb +0 -141
- data/app/controllers/users/unlocks_controller.rb +0 -30
- data/app/views/devise/confirmations/new.html.erb +0 -2
- data/app/views/devise/confirmations/show.html.erb +0 -63
- data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/app/views/devise/mailer/email_changed.html.erb +0 -7
- data/app/views/devise/mailer/password_change.html.erb +0 -3
- data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/devise/passwords/edit.html.erb +0 -79
- data/app/views/devise/passwords/new.html.erb +0 -75
- data/app/views/devise/registrations/edit.html.erb +0 -43
- data/app/views/devise/registrations/new.html.erb +0 -147
- data/app/views/devise/sessions/new.html.erb +0 -114
- data/app/views/devise/shared/_demo.html.erb +0 -7
- data/app/views/devise/shared/_error_messages.html.erb +0 -15
- data/app/views/devise/shared/_links.html.erb +0 -96
- data/app/views/devise/unlocks/new.html.erb +0 -16
- data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +0 -59
- data/db/migrate/v1.0/0010000310_create_lesli_users.rb +0 -97
- data/db/migrate/v1.0/0010003110_create_lesli_user_settings.rb +0 -44
- data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +0 -55
- data/db/migrate/v1.0/0010003410_create_lesli_user_powers.rb +0 -43
- data/db/migrate/v1.0/0010004010_create_lesli_user_logs.rb +0 -45
- data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +0 -44
- data/db/migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb +0 -45
- data/db/migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb +0 -49
- data/db/migrate/v1.0/0010005510_create_lesli_role_powers.rb +0 -51
- data/db/migrate/v1.0/0010005710_create_lesli_role_privileges.rb +0 -45
- data/lib/lesli/routing.rb +0 -26
- data/lib/scss/components/editor-richtext.scss +0 -88
- data/lib/scss/devise/oauth.scss +0 -34
- data/lib/scss/devise/passwords.scss +0 -33
- data/lib/scss/devise/sessions.scss +0 -35
- data/lib/scss/elements/avatar.scss +0 -48
- data/lib/scss/elements/calendar.scss +0 -47
- data/lib/scss/elements/toggle.scss +0 -102
- data/lib/vue/devise/confirmations.js +0 -33
- data/lib/vue/devise/passwords.js +0 -137
- data/lib/vue/devise/registrations.js +0 -157
- data/lib/vue/devise/sessions.js +0 -148
- data/lib/vue/panels/panel-tickets.vue +0 -181
- data/lib/vue/refactor/shared/cloudobjects/discussion/element.vue +0 -132
- data/lib/vue/shared/stores/account.js +0 -113
- /data/app/assets/icons/lesli/{engine-driver.svg → engine-calendar.svg} +0 -0
- /data/db/migrate/{v1.0 → v1}/0010000610_create_lesli_system_controllers.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010000710_create_lesli_system_controller_actions.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010001210_create_lesli_account_activities.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010001410_create_lesli_account_logs.rb +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
Lesli
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
-
|
|
7
|
-
This program is free software: you can redistribute it and/or modify
|
|
8
|
-
it under the terms of the GNU General Public License as published by
|
|
9
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
(at your option) any later version.
|
|
11
|
-
|
|
12
|
-
This program is distributed in the hope that it will be useful,
|
|
13
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
GNU General Public License for more details.
|
|
16
|
-
|
|
17
|
-
You should have received a copy of the GNU General Public License
|
|
18
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
-
|
|
20
|
-
Lesli · Ruby on Rails SaaS development platform.
|
|
21
|
-
|
|
22
|
-
Made with ♥ by https://www.lesli.tech
|
|
23
|
-
Building a better future, one line of code at a time.
|
|
24
|
-
|
|
25
|
-
@contact hello@lesli.tech
|
|
26
|
-
@website https://www.lesli.tech
|
|
27
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
-
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
-
// ·
|
|
31
|
-
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
.lesli-calendar {
|
|
35
|
-
.input {
|
|
36
|
-
position: relative;
|
|
37
|
-
}
|
|
38
|
-
.icons {
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 50%;
|
|
41
|
-
right: 0%;
|
|
42
|
-
transform: translate(-50%, -50%);
|
|
43
|
-
width: 20px;
|
|
44
|
-
height: 20px;
|
|
45
|
-
color: #b4b4b4;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
Lesli
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
-
|
|
7
|
-
This program is free software: you can redistribute it and/or modify
|
|
8
|
-
it under the terms of the GNU General Public License as published by
|
|
9
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
(at your option) any later version.
|
|
11
|
-
|
|
12
|
-
This program is distributed in the hope that it will be useful,
|
|
13
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
GNU General Public License for more details.
|
|
16
|
-
|
|
17
|
-
You should have received a copy of the GNU General Public License
|
|
18
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
-
|
|
20
|
-
Lesli · Ruby on Rails SaaS development platform.
|
|
21
|
-
|
|
22
|
-
Made with ♥ by https://www.lesli.tech
|
|
23
|
-
Building a better future, one line of code at a time.
|
|
24
|
-
|
|
25
|
-
@contact hello@lesli.tech
|
|
26
|
-
@website https://www.lesli.tech
|
|
27
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
-
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
-
// ·
|
|
31
|
-
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
.lesli-toggle {
|
|
35
|
-
position: relative;
|
|
36
|
-
display: inline-block;
|
|
37
|
-
width: 100px;
|
|
38
|
-
height: 34px;
|
|
39
|
-
font-size: small;
|
|
40
|
-
input {
|
|
41
|
-
opacity: 0;
|
|
42
|
-
width: 0;
|
|
43
|
-
height: 0;
|
|
44
|
-
&:checked + .slider {
|
|
45
|
-
background-color: $primary;
|
|
46
|
-
}
|
|
47
|
-
&:focus + .slider {
|
|
48
|
-
box-shadow: 0 0 1px $primary;
|
|
49
|
-
}
|
|
50
|
-
&:checked + .slider:before {
|
|
51
|
-
-webkit-transform: translateX(26px);
|
|
52
|
-
-ms-transform: translateX(26px);
|
|
53
|
-
transform: translateX(65px);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.slider {
|
|
57
|
-
position: absolute;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
top: 0;
|
|
60
|
-
left: 0;
|
|
61
|
-
right: 0;
|
|
62
|
-
bottom: 0;
|
|
63
|
-
background-color: lesli-css-color(silver, 500);
|
|
64
|
-
-webkit-transition: .4s;
|
|
65
|
-
transition: .4s;
|
|
66
|
-
border-radius: 34px;
|
|
67
|
-
&:before {
|
|
68
|
-
position: absolute;
|
|
69
|
-
content: "";
|
|
70
|
-
height: 26px;
|
|
71
|
-
width: 26px;
|
|
72
|
-
left: 4px;
|
|
73
|
-
bottom: 4px;
|
|
74
|
-
background-color: white;
|
|
75
|
-
-webkit-transition: .4s;
|
|
76
|
-
transition: .4s;
|
|
77
|
-
border-radius: 50%;
|
|
78
|
-
}
|
|
79
|
-
div{
|
|
80
|
-
padding: 6px;
|
|
81
|
-
}
|
|
82
|
-
.enabled-text{
|
|
83
|
-
position: absolute;
|
|
84
|
-
left: 20%;
|
|
85
|
-
top: 10%;
|
|
86
|
-
color: white;
|
|
87
|
-
font-weight: bold;
|
|
88
|
-
}
|
|
89
|
-
.disabled-text{
|
|
90
|
-
position: absolute;
|
|
91
|
-
right: 20%;
|
|
92
|
-
top: 10%;
|
|
93
|
-
color: white;
|
|
94
|
-
font-weight: bold;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Lesli
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
5
|
-
|
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
|
7
|
-
it under the terms of the GNU General Public License as published by
|
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
(at your option) any later version.
|
|
10
|
-
|
|
11
|
-
This program is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU General Public License
|
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
|
|
19
|
-
Lesli · Your Smart Business Assistant.
|
|
20
|
-
|
|
21
|
-
Made with ♥ by https://www.lesli.tech
|
|
22
|
-
Building a better future, one line of code at a time.
|
|
23
|
-
|
|
24
|
-
@contact hello@lesli.tech
|
|
25
|
-
@website https://lesli.tech
|
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
27
|
-
|
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
29
|
-
// ·
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// ·
|
data/lib/vue/devise/passwords.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Lesli
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
5
|
-
|
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
|
7
|
-
it under the terms of the GNU General Public License as published by
|
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
(at your option) any later version.
|
|
10
|
-
|
|
11
|
-
This program is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU General Public License
|
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
|
|
19
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
20
|
-
|
|
21
|
-
Made with ♥ by https://www.lesli.tech
|
|
22
|
-
Building a better future, one line of code at a time.
|
|
23
|
-
|
|
24
|
-
@contact hello@lesli.tech
|
|
25
|
-
@website https://www.lesli.tech
|
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
27
|
-
|
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
29
|
-
// ·
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// ·
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// ·
|
|
37
|
-
import application from "Lesli/public"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// ·
|
|
41
|
-
application({
|
|
42
|
-
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
loading: false,
|
|
46
|
-
translations: {
|
|
47
|
-
main: I18n.t("core.users/passwords")
|
|
48
|
-
},
|
|
49
|
-
sign_in: {
|
|
50
|
-
email: "",
|
|
51
|
-
password: ""
|
|
52
|
-
},
|
|
53
|
-
password_edit: {
|
|
54
|
-
new_password: "",
|
|
55
|
-
new_password_confirmation: ""
|
|
56
|
-
},
|
|
57
|
-
notification: {
|
|
58
|
-
message: "",
|
|
59
|
-
show: false,
|
|
60
|
-
type: ""
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
|
|
66
|
-
postPasswordNew(event) {
|
|
67
|
-
|
|
68
|
-
this.notification.show = false
|
|
69
|
-
|
|
70
|
-
this.loading = true
|
|
71
|
-
|
|
72
|
-
event.preventDefault();
|
|
73
|
-
|
|
74
|
-
let data = {
|
|
75
|
-
user: {
|
|
76
|
-
email: this.sign_in.email.toLowerCase(),
|
|
77
|
-
password: this.sign_in.password
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
this.http.post("/password", data).then(response => {
|
|
82
|
-
this.showNotification("this.translations.main.notification_reset_password_instructions_sent", "success")
|
|
83
|
-
}).catch(error => {
|
|
84
|
-
this.showNotification(error.message)
|
|
85
|
-
}).finally(() => {
|
|
86
|
-
this.loading = false
|
|
87
|
-
})
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
putPasswordEdit(event) {
|
|
91
|
-
|
|
92
|
-
this.notification.show = false
|
|
93
|
-
|
|
94
|
-
this.loading = true
|
|
95
|
-
|
|
96
|
-
event.preventDefault();
|
|
97
|
-
|
|
98
|
-
// check if passwords match
|
|
99
|
-
if (this.password_edit.new_password != this.password_edit.new_password_confirmation) {
|
|
100
|
-
this.showNotification(this.translations.main.error_passwords_do_not_match, "danger")
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var token=null
|
|
105
|
-
|
|
106
|
-
try {
|
|
107
|
-
token = Object.fromEntries(new URLSearchParams(window.location.search)).reset_password_token
|
|
108
|
-
} catch (error) {
|
|
109
|
-
token=null
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.http.put("/password", {
|
|
113
|
-
user: {
|
|
114
|
-
password: this.password_edit.new_password,
|
|
115
|
-
password_confirmation: this.password_edit.new_password_confirmation,
|
|
116
|
-
reset_password_token: token
|
|
117
|
-
}
|
|
118
|
-
}).then(response => {
|
|
119
|
-
this.showNotification(this.translations.main.notification_password_updated, "success")
|
|
120
|
-
//setTimeout(() => { this.url.go("/login") }, 2000)
|
|
121
|
-
}).catch(error => {
|
|
122
|
-
this.showNotification(error.message, "danger")
|
|
123
|
-
}).finally(() => {
|
|
124
|
-
this.loading = false
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
showNotification(message, type="danger"){
|
|
130
|
-
this.notification.message = message;
|
|
131
|
-
this.notification.type = "is-"+type;
|
|
132
|
-
this.notification.show = true;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
})
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
Lesli
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
6
|
-
|
|
7
|
-
This program is free software: you can redistribute it and/or modify
|
|
8
|
-
it under the terms of the GNU General Public License as published by
|
|
9
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
-
(at your option) any later version.
|
|
11
|
-
|
|
12
|
-
This program is distributed in the hope that it will be useful,
|
|
13
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
-
GNU General Public License for more details.
|
|
16
|
-
|
|
17
|
-
You should have received a copy of the GNU General Public License
|
|
18
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
19
|
-
|
|
20
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
21
|
-
|
|
22
|
-
Made with ♥ by https://www.lesli.tech
|
|
23
|
-
Building a better future, one line of code at a time.
|
|
24
|
-
|
|
25
|
-
@contact hello@lesli.tech
|
|
26
|
-
@website https://www.lesli.tech
|
|
27
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
28
|
-
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
-
// ·
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// ·
|
|
35
|
-
import application from "Lesli/public"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// ·
|
|
39
|
-
application({
|
|
40
|
-
|
|
41
|
-
data(){
|
|
42
|
-
return {
|
|
43
|
-
translations: {},
|
|
44
|
-
password_uppercase: 0,
|
|
45
|
-
password_symbol: 0,
|
|
46
|
-
password_number: 0,
|
|
47
|
-
telephone_code: "+49",
|
|
48
|
-
telephone_codes: null,
|
|
49
|
-
sign_up: {
|
|
50
|
-
email: "",
|
|
51
|
-
password: "",
|
|
52
|
-
password_confirmation: '',
|
|
53
|
-
// first_name: null,
|
|
54
|
-
// last_name: null,
|
|
55
|
-
// telephone: null,
|
|
56
|
-
},
|
|
57
|
-
progress_bar_active: false,
|
|
58
|
-
notification: {
|
|
59
|
-
show: false,
|
|
60
|
-
message: '',
|
|
61
|
-
type: 'is-danger'
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
mounted() {
|
|
67
|
-
this.$refs.email.focus()
|
|
68
|
-
},
|
|
69
|
-
methods: {
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @param {*} event that triggers the function
|
|
73
|
-
* @description this function is triggered when the user submits the form to sign up
|
|
74
|
-
*/
|
|
75
|
-
postRegistration(event) {
|
|
76
|
-
|
|
77
|
-
this.notification.show = false;
|
|
78
|
-
|
|
79
|
-
event.preventDefault();
|
|
80
|
-
|
|
81
|
-
const user = this.validateFields()
|
|
82
|
-
|
|
83
|
-
this.http.post(this.url.to(), user).then(response => {
|
|
84
|
-
|
|
85
|
-
//setTimeout(() => { this.url.go("/login") }, 5000)
|
|
86
|
-
|
|
87
|
-
}).catch((err)=>{
|
|
88
|
-
this.showNotification(err.message)
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
typing() {
|
|
94
|
-
this.notification.message= ""
|
|
95
|
-
this.notification.show= false
|
|
96
|
-
this.notification.type= "default"
|
|
97
|
-
this.verifyPasswords()
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
showNotification(message,type = "danger") {
|
|
101
|
-
this.notification.message = message
|
|
102
|
-
this.notification.type = type
|
|
103
|
-
this.notification.show = true
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @description validates the password strength
|
|
108
|
-
*/
|
|
109
|
-
verifyPasswords() {
|
|
110
|
-
|
|
111
|
-
this.password_uppercase = 0
|
|
112
|
-
this.password_number = 0
|
|
113
|
-
this.password_symbol = 0
|
|
114
|
-
|
|
115
|
-
if (this.sign_up.password.length <= 0) {
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (this.sign_up.password.search(/[A-Z]/) < 0) {
|
|
120
|
-
this.password_uppercase = 1
|
|
121
|
-
} else {
|
|
122
|
-
this.password_uppercase = 2
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (this.sign_up.password.search(/[0-9]/) < 0) {
|
|
126
|
-
this.password_number = 1
|
|
127
|
-
} else {
|
|
128
|
-
this.password_number = 2
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (this.sign_up.password.search(/[!#$%&]/) < 0) {
|
|
132
|
-
this.password_symbol = 1
|
|
133
|
-
} else {
|
|
134
|
-
this.password_symbol = 2
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @description this function validates if the fields are correct
|
|
141
|
-
* @returns object with the user to be registered
|
|
142
|
-
*/
|
|
143
|
-
validateFields() {
|
|
144
|
-
|
|
145
|
-
// · copy object without reference
|
|
146
|
-
const user = JSON.parse(JSON.stringify(this.sign_up))
|
|
147
|
-
|
|
148
|
-
if (user.password_confirmation == "") {
|
|
149
|
-
user.password_confirmation = user.password
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return user
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
})
|
data/lib/vue/devise/sessions.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Lesli
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
5
|
-
|
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
|
7
|
-
it under the terms of the GNU General Public License as published by
|
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
(at your option) any later version.
|
|
10
|
-
|
|
11
|
-
This program is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU General Public License
|
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
|
|
19
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
20
|
-
|
|
21
|
-
Made with ♥ by https://www.lesli.tech
|
|
22
|
-
Building a better future, one line of code at a time.
|
|
23
|
-
|
|
24
|
-
@contact hello@lesli.tech
|
|
25
|
-
@website https://www.lesli.tech
|
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
27
|
-
|
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
29
|
-
// ·
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// ·
|
|
34
|
-
import application from "LesliVue/public"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// ·
|
|
38
|
-
application({
|
|
39
|
-
|
|
40
|
-
data(){
|
|
41
|
-
return {
|
|
42
|
-
loading: false,
|
|
43
|
-
sign_in: {
|
|
44
|
-
email: "",
|
|
45
|
-
password: ""
|
|
46
|
-
},
|
|
47
|
-
notification: {
|
|
48
|
-
message: "",
|
|
49
|
-
show: false,
|
|
50
|
-
type: "default"
|
|
51
|
-
},
|
|
52
|
-
errors: []
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
mounted() {
|
|
56
|
-
this.$refs?.email?.focus()
|
|
57
|
-
|
|
58
|
-
if (lesli_application_development) {
|
|
59
|
-
this.sign_in.email = "hello@lesli.tech"
|
|
60
|
-
this.sign_in.password = "Tardis2024$"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
methods: {
|
|
64
|
-
|
|
65
|
-
togglePasswordInput() {
|
|
66
|
-
if (this.$refs.password.type === "password") {
|
|
67
|
-
this.$refs.password.type = "text";
|
|
68
|
-
} else {
|
|
69
|
-
this.$refs.password.type = "password";
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
validateEmail() {
|
|
74
|
-
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(this.sign_in.email)) {
|
|
75
|
-
console.log("error")
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
build_redirect_url(default_path = null) {
|
|
80
|
-
|
|
81
|
-
// redirect to the root of the domain by default
|
|
82
|
-
let redirect_url = "/"
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
|
|
86
|
-
// search for a redirection route in the url params
|
|
87
|
-
redirect_url = Object.fromEntries(new URLSearchParams(window.location.search)).r
|
|
88
|
-
|
|
89
|
-
} catch (error) {
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// redirect to the default path if:
|
|
94
|
-
// - there is no query params with redirection
|
|
95
|
-
if (!redirect_url && default_path) {
|
|
96
|
-
redirect_url = default_path
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// redirect to the root if:
|
|
100
|
-
// - error parsing redirection route
|
|
101
|
-
// - there is no query params with redirection
|
|
102
|
-
if (!redirect_url) {
|
|
103
|
-
redirect_url = "/"
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return redirect_url
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
postLogin(event) {
|
|
111
|
-
|
|
112
|
-
this.loading = true
|
|
113
|
-
|
|
114
|
-
event.preventDefault();
|
|
115
|
-
|
|
116
|
-
this.notification.show = false
|
|
117
|
-
|
|
118
|
-
let data = {
|
|
119
|
-
user: {
|
|
120
|
-
email: this.sign_in.email.toLowerCase(),
|
|
121
|
-
password: this.sign_in.password
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
this.http.post("/login", data).then(response => {
|
|
126
|
-
this.url.go(this.build_redirect_url(response.default_path))
|
|
127
|
-
}).catch(error => {
|
|
128
|
-
this.showNotification(error.message)
|
|
129
|
-
}).finally(() => {
|
|
130
|
-
this.loading = false
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
typing() {
|
|
136
|
-
this.notification.message= ""
|
|
137
|
-
this.notification.show= false
|
|
138
|
-
this.notification.type= "default"
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
showNotification(message, type="danger"){
|
|
142
|
-
this.notification.message = message;
|
|
143
|
-
this.notification.type = type;
|
|
144
|
-
this.notification.show = true;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
})
|