@enso-ui/auth 2.0.7 → 2.0.11
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/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<div class="
|
|
5
|
-
<
|
|
2
|
+
<section class="hero is-fullheight is-primary is-bold">
|
|
3
|
+
<div class="hero-body">
|
|
4
|
+
<div class="container">
|
|
5
|
+
<core-auth v-slot="{ guestState }">
|
|
6
6
|
<router v-if="guestState"/>
|
|
7
|
-
</
|
|
7
|
+
</core-auth>
|
|
8
8
|
</div>
|
|
9
|
-
</
|
|
10
|
-
</
|
|
9
|
+
</div>
|
|
10
|
+
</section>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
@@ -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,8 @@ export default {
|
|
|
29
30
|
|
|
30
31
|
inject: ['routerErrorHandler'],
|
|
31
32
|
|
|
33
|
+
inheritAttrs: false,
|
|
34
|
+
|
|
32
35
|
data: () => ({
|
|
33
36
|
errors: new Errors(),
|
|
34
37
|
state: {
|
|
@@ -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);
|
package/src/store/auth.js
CHANGED