@enso-ui/auth 2.0.9 → 2.0.13
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.
- package/package.json +2 -2
- package/src/bulma/layouts/Auth.vue +1 -1
- package/src/bulma/pages/auth/Login.vue +2 -6
- package/src/bulma/pages/auth/components/AuthForm.vue +11 -8
- package/src/bulma/pages/auth/components/Submit.vue +2 -2
- package/src/bulma/pages/auth/password/Reset.vue +4 -2
- package/src/store/auth.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/auth",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "UI auth package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@enso-ui/laravel-validation": "^2.0",
|
|
27
27
|
"@enso-ui/ui": "^5.0",
|
|
28
28
|
"@fortawesome/fontawesome-svg-core": "^1.2.2",
|
|
29
|
-
"@fortawesome/free-solid-svg-icons": "^5.2
|
|
29
|
+
"@fortawesome/free-solid-svg-icons": "^5.11.2",
|
|
30
30
|
"@fortawesome/vue-fontawesome": "3.0.0-5",
|
|
31
31
|
"vue": "^3.0",
|
|
32
32
|
"vuex": "^4.0.0",
|
|
@@ -52,14 +52,10 @@ export default {
|
|
|
52
52
|
methods: {
|
|
53
53
|
...mapMutations('auth', ['login']),
|
|
54
54
|
...mapMutations('layout', ['home']),
|
|
55
|
-
...mapMutations(['setShowQuote'
|
|
56
|
-
init(
|
|
55
|
+
...mapMutations(['setShowQuote']),
|
|
56
|
+
init() {
|
|
57
57
|
this.setShowQuote(this.meta.showQuote);
|
|
58
58
|
|
|
59
|
-
if (data.csrfToken) {
|
|
60
|
-
this.setCsrfToken(data.csrfToken);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
59
|
setTimeout(() => {
|
|
64
60
|
this.login();
|
|
65
61
|
this.home(true);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="login"
|
|
2
|
+
<div class="login"
|
|
3
|
+
:class="$attrs.class">
|
|
3
4
|
<div class="box p-3">
|
|
4
5
|
<div class="logo mb-3 is-flex">
|
|
5
6
|
<figure class="image is-48x48 is-clickable is-flex"
|
|
@@ -29,6 +30,15 @@ export default {
|
|
|
29
30
|
|
|
30
31
|
inject: ['routerErrorHandler'],
|
|
31
32
|
|
|
33
|
+
provide() {
|
|
34
|
+
return {
|
|
35
|
+
state: this.state,
|
|
36
|
+
errors: this.errors,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
inheritAttrs: false,
|
|
41
|
+
|
|
32
42
|
data: () => ({
|
|
33
43
|
errors: new Errors(),
|
|
34
44
|
state: {
|
|
@@ -39,13 +49,6 @@ export default {
|
|
|
39
49
|
computed: {
|
|
40
50
|
...mapState(['meta']),
|
|
41
51
|
},
|
|
42
|
-
|
|
43
|
-
provide() {
|
|
44
|
-
return {
|
|
45
|
-
state: this.state,
|
|
46
|
-
errors: this.errors,
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
52
|
};
|
|
50
53
|
</script>
|
|
51
54
|
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
|
|
24
24
|
components: { Fa },
|
|
25
25
|
|
|
26
|
-
inject: ['errors', 'i18n', 'route', 'state', 'toastr'],
|
|
26
|
+
inject: ['errors', 'http', 'i18n', 'route', 'state', 'toastr'],
|
|
27
27
|
|
|
28
28
|
props: {
|
|
29
29
|
action: {
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
this.state.successful = false;
|
|
66
66
|
this.$emit('submitting');
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
this.http.post(this.route(this.endpoint), this.payload, this.config)
|
|
69
69
|
.then(({ data }) => {
|
|
70
70
|
this.state.successful = true;
|
|
71
71
|
this.$emit('success', data);
|
|
@@ -30,11 +30,13 @@ import Confirmation from '../components/fields/Confirmation.vue';
|
|
|
30
30
|
export default {
|
|
31
31
|
name: 'Reset',
|
|
32
32
|
|
|
33
|
-
components: {
|
|
33
|
+
components: {
|
|
34
|
+
AuthForm, Email, PasswordStrength, Password, Confirmation,
|
|
35
|
+
},
|
|
34
36
|
|
|
35
37
|
inject: ['routerErrorHandler'],
|
|
36
38
|
|
|
37
|
-
data:
|
|
39
|
+
data: v => ({
|
|
38
40
|
payload: {
|
|
39
41
|
email: '',
|
|
40
42
|
password: '',
|
package/src/store/auth.js
CHANGED