@enso-ui/users 2.0.11 → 2.0.15
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 +1 -1
- package/src/bulma/pages/users/Create.vue +1 -1
- package/src/bulma/pages/users/Edit.vue +9 -6
- package/src/bulma/pages/users/components/DeleteModal.vue +2 -2
- package/src/bulma/pages/users/components/Sessions.vue +3 -3
- package/src/bulma/pages/users/components/TokenForm.vue +1 -1
- package/src/bulma/pages/users/components/Tokens.vue +4 -4
- package/src/bulma/pages/users/components/UserProfile.vue +6 -3
- package/src/bulma/register.js +1 -3
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<enso-form class="box has-background-light raises-on-hover">
|
|
5
5
|
<template #group_id="props">
|
|
6
6
|
<form-field v-bind="props"
|
|
7
|
-
@
|
|
7
|
+
@update:modelValue="pivotParams.userGroups.id = $event"/>
|
|
8
8
|
</template>
|
|
9
9
|
<template #role_id="props">
|
|
10
10
|
<form-field v-bind="props"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
">
|
|
10
10
|
<template #group_id="props">
|
|
11
11
|
<form-field v-bind="props"
|
|
12
|
-
@
|
|
12
|
+
@update:modelValue="pivotParams.userGroups.id = $event"/>
|
|
13
13
|
</template>
|
|
14
14
|
<template #role_id="props">
|
|
15
15
|
<form-field v-bind="props"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<form-field v-bind="props"
|
|
20
20
|
@focus="props.field.meta.readonly = false"
|
|
21
21
|
@blur="props.field.meta.readonly = true"
|
|
22
|
-
@
|
|
22
|
+
@update:modelValue="password = $event.target.value"
|
|
23
23
|
v-if="!props.field.meta.hidden"/>
|
|
24
24
|
<password-strength class="mt-1"
|
|
25
25
|
:password="props.field.value"/>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<form-field v-bind="props"
|
|
29
29
|
@focus="props.field.meta.readonly = false"
|
|
30
30
|
@blur="props.field.meta.readonly = true"
|
|
31
|
-
@
|
|
31
|
+
@update:modelValue="passwordConfirmation = $event.target.value"
|
|
32
32
|
@keydown="$emit('update');"
|
|
33
33
|
v-if="!props.field.meta.hidden"/>
|
|
34
34
|
</template>
|
|
@@ -123,7 +123,7 @@ import { EnsoForm, FormField } from '@enso-ui/forms/bulma';
|
|
|
123
123
|
import Accessories from '@enso-ui/accessories/bulma';
|
|
124
124
|
import { Tab } from '@enso-ui/tabs/bulma';
|
|
125
125
|
import { mapState } from 'vuex';
|
|
126
|
-
import PasswordStrength from '@enso-ui/auth
|
|
126
|
+
import { PasswordStrength } from '@enso-ui/auth';
|
|
127
127
|
import DeleteModal from './components/DeleteModal.vue';
|
|
128
128
|
import Tokens from './components/Tokens.vue';
|
|
129
129
|
import Sessions from './components/Sessions.vue';
|
|
@@ -145,7 +145,10 @@ export default {
|
|
|
145
145
|
Tokens,
|
|
146
146
|
},
|
|
147
147
|
|
|
148
|
-
inject: [
|
|
148
|
+
inject: [
|
|
149
|
+
'http', 'i18n', 'canAccess', 'errorHandler', 'route',
|
|
150
|
+
'routerErrorHandler', 'toastr'
|
|
151
|
+
],
|
|
149
152
|
|
|
150
153
|
emits: ['update'],
|
|
151
154
|
|
|
@@ -178,7 +181,7 @@ export default {
|
|
|
178
181
|
.catch(this.routerErrorHandler));
|
|
179
182
|
},
|
|
180
183
|
resetPassword() {
|
|
181
|
-
|
|
184
|
+
this.http.post(this.route('administration.users.resetPassword', this.$route.params))
|
|
182
185
|
.then(({ data }) => this.toastr.success(data.message))
|
|
183
186
|
.catch(this.errorHandler);
|
|
184
187
|
},
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
|
|
42
42
|
directives: { focus },
|
|
43
43
|
|
|
44
|
-
inject: ['i18n', 'errorHandler', 'route'],
|
|
44
|
+
inject: ['http', 'i18n', 'errorHandler', 'route'],
|
|
45
45
|
|
|
46
46
|
props: {
|
|
47
47
|
userId: {
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
|
|
55
55
|
methods: {
|
|
56
56
|
destroy(person = false) {
|
|
57
|
-
|
|
57
|
+
this.http.delete(this.route('administration.users.destroy', this.userId),
|
|
58
58
|
{ params: { person: !!person } })
|
|
59
59
|
.then(({ data }) => this.$emit('destroyed', data))
|
|
60
60
|
.catch(this.errorHandler);
|
|
@@ -49,7 +49,7 @@ library.add(faPlus, faSync, faSearch);
|
|
|
49
49
|
export default {
|
|
50
50
|
name: 'Sessions',
|
|
51
51
|
|
|
52
|
-
inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
|
|
52
|
+
inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
|
|
53
53
|
|
|
54
54
|
components: { Fa, Session },
|
|
55
55
|
|
|
@@ -89,14 +89,14 @@ export default {
|
|
|
89
89
|
|
|
90
90
|
methods: {
|
|
91
91
|
fetch() {
|
|
92
|
-
|
|
92
|
+
this.http.get(this.route('administration.users.sessions.index', this.$route.params))
|
|
93
93
|
.then(({ data }) => {
|
|
94
94
|
this.sessions = data;
|
|
95
95
|
this.$emit('update');
|
|
96
96
|
}).catch(this.errorHandler);
|
|
97
97
|
},
|
|
98
98
|
destroy({ id }, index) {
|
|
99
|
-
|
|
99
|
+
this.http.delete(
|
|
100
100
|
this.route('administration.users.sessions.destroy', this.$route.params),
|
|
101
101
|
{ params: { id } },
|
|
102
102
|
).then(({ data }) => {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
63
63
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
64
64
|
import { faPlus, faSync, faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
65
|
-
import Url from '@enso-ui/files
|
|
65
|
+
import { Url } from '@enso-ui/files'; // TODO:: refactor to a package
|
|
66
66
|
import Token from './Token.vue';
|
|
67
67
|
import TokenForm from './TokenForm.vue';
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ library.add(faPlus, faSync, faSearch);
|
|
|
71
71
|
export default {
|
|
72
72
|
name: 'Tokens',
|
|
73
73
|
|
|
74
|
-
inject: ['canAccess', 'errorHandler', 'i18n', 'route', 'toastr'],
|
|
74
|
+
inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
|
|
75
75
|
|
|
76
76
|
components: {
|
|
77
77
|
Fa,
|
|
@@ -121,14 +121,14 @@ export default {
|
|
|
121
121
|
|
|
122
122
|
methods: {
|
|
123
123
|
fetch() {
|
|
124
|
-
|
|
124
|
+
this.http.get(this.route('administration.users.tokens.index', this.$route.params))
|
|
125
125
|
.then(({ data }) => {
|
|
126
126
|
this.tokens = data;
|
|
127
127
|
this.$emit('update');
|
|
128
128
|
}).catch(this.errorHandler);
|
|
129
129
|
},
|
|
130
130
|
destroy({ id }, index) {
|
|
131
|
-
|
|
131
|
+
this.http.delete(
|
|
132
132
|
this.route('administration.users.tokens.destroy', this.$route.params),
|
|
133
133
|
{ params: { id } },
|
|
134
134
|
).then(({ data }) => {
|
|
@@ -169,7 +169,10 @@ export default {
|
|
|
169
169
|
|
|
170
170
|
components: { Divider, Fa, Uploader },
|
|
171
171
|
|
|
172
|
-
inject: [
|
|
172
|
+
inject: [
|
|
173
|
+
'canAccess', 'errorHandler', 'http', 'i18n',
|
|
174
|
+
'route', 'routerErrorHandler'
|
|
175
|
+
],
|
|
173
176
|
|
|
174
177
|
emits: ['start-impersonating'],
|
|
175
178
|
|
|
@@ -206,7 +209,7 @@ export default {
|
|
|
206
209
|
: null;
|
|
207
210
|
},
|
|
208
211
|
fetch() {
|
|
209
|
-
|
|
212
|
+
this.http.get(this.route(this.$route.name, this.$route.params.user))
|
|
210
213
|
.then(response => (this.profile = response.data.user))
|
|
211
214
|
.catch(this.errorHandler);
|
|
212
215
|
},
|
|
@@ -214,7 +217,7 @@ export default {
|
|
|
214
217
|
eventBus.$emit('start-impersonating', this.profile.id);
|
|
215
218
|
},
|
|
216
219
|
updateAvatar() {
|
|
217
|
-
|
|
220
|
+
this.http.patch(this.route('core.avatars.update', this.user.avatar.id))
|
|
218
221
|
.then(({ data }) => this.setUserAvatar(data.avatarId))
|
|
219
222
|
.catch(this.errorHandler);
|
|
220
223
|
},
|
package/src/bulma/register.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
1
|
import App from '@enso-ui/ui/src/core/app';
|
|
3
2
|
import ProfileController from './components/navbar/ProfileControl.vue';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
App.registerNavbarItem('navbar-profile-controller', 400);
|
|
4
|
+
App.registerNavbarItem('navbar-profile-controller', ProfileController, 400);
|