@enso-ui/users 3.0.4 → 3.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.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/package.json +12 -26
- package/src/bulma/components/navbar/ProfileControl.vue +45 -14
- package/src/bulma/pages/users/Create.vue +2 -2
- package/src/bulma/pages/users/Edit.vue +13 -32
- package/src/bulma/pages/users/Index.vue +6 -31
- package/src/bulma/pages/users/Show.vue +1 -1
- package/src/bulma/pages/users/components/Avatar.vue +4 -2
- package/src/bulma/pages/users/components/Session.vue +23 -28
- package/src/bulma/pages/users/components/Sessions.vue +6 -7
- package/src/bulma/pages/users/components/Token.vue +8 -10
- package/src/bulma/pages/users/components/TokenForm.vue +1 -1
- package/src/bulma/pages/users/components/Tokens.vue +9 -9
- package/src/bulma/pages/users/components/Url.vue +5 -4
- package/src/bulma/pages/users/components/UserProfile.vue +35 -20
- package/src/bulma/register.js +3 -2
- package/src/bulma/routes/administration/users.js +1 -1
- package/src/bulma/routes/administration.js +1 -1
- package/src/core/components/navbar/ProfileControl.vue +9 -9
- package/src/utils/pinia.js +11 -0
- package/src/bulma/pages/users/components/DeleteModal.vue +0 -64
package/LICENSE
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/users",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Basic users package",
|
|
5
5
|
"main": "bulma/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
6
|
"repository": {
|
|
10
7
|
"type": "git",
|
|
11
8
|
"url": "git+https://github.com/enso-ui/users.git"
|
|
@@ -15,39 +12,28 @@
|
|
|
15
12
|
"vue"
|
|
16
13
|
],
|
|
17
14
|
"author": "Adrian Ocneanu <aocneanu@gmail.com>",
|
|
18
|
-
"license": "
|
|
15
|
+
"license": "MIT",
|
|
19
16
|
"bugs": {
|
|
20
17
|
"url": "https://github.com/enso-ui/users/issues"
|
|
21
18
|
},
|
|
22
19
|
"homepage": "https://github.com/enso-ui/users#readme",
|
|
23
20
|
"dependencies": {
|
|
24
21
|
"@enso-ui/accessories": "^4.0",
|
|
25
|
-
"@enso-ui/auth": "^3.0",
|
|
22
|
+
"@enso-ui/auth": "^3.1.0",
|
|
26
23
|
"@enso-ui/confirmation": "^2.0",
|
|
27
24
|
"@enso-ui/directives": "^2.0",
|
|
28
25
|
"@enso-ui/divider": "^2.0",
|
|
29
|
-
"@enso-ui/forms": "^
|
|
26
|
+
"@enso-ui/forms": "^4.0.0",
|
|
30
27
|
"@enso-ui/modal": "^3.0",
|
|
31
|
-
"@enso-ui/tables": "^
|
|
28
|
+
"@enso-ui/tables": "^4.0.0",
|
|
32
29
|
"@enso-ui/tabs": "^2.0",
|
|
33
|
-
"@enso-ui/ui": "^
|
|
30
|
+
"@enso-ui/ui": "^7.0.0",
|
|
34
31
|
"@enso-ui/uploader": "^2.0",
|
|
35
|
-
"@fortawesome/fontawesome-svg-core": "^
|
|
36
|
-
"@fortawesome/free-brands-svg-icons": "^
|
|
37
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
38
|
-
"@fortawesome/vue-fontawesome": "3.
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@vue/cli-plugin-babel": "5.0.0-beta.6",
|
|
44
|
-
"@vue/cli-plugin-eslint": "5.0.0-beta.6",
|
|
45
|
-
"@vue/eslint-config-airbnb": "^5.0.0",
|
|
46
|
-
"autoprefixer": "^9.6.1",
|
|
47
|
-
"babel-eslint": "^10.0.1",
|
|
48
|
-
"cross-env": "^6.0.0",
|
|
49
|
-
"eslint": "^7.0.0",
|
|
50
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
51
|
-
"eslint-plugin-vue": "^8.0.0"
|
|
32
|
+
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
33
|
+
"@fortawesome/free-brands-svg-icons": "^7.2.0",
|
|
34
|
+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
35
|
+
"@fortawesome/vue-fontawesome": "3.1.3",
|
|
36
|
+
"pinia": "^3.0.3",
|
|
37
|
+
"vue": "^3.0"
|
|
52
38
|
}
|
|
53
39
|
}
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
<a class="navbar-item"
|
|
5
5
|
@click="visitProfile()"
|
|
6
6
|
v-if="isTouch">
|
|
7
|
-
<avatar
|
|
8
|
-
:user="user"/>
|
|
7
|
+
<avatar :user="user"/>
|
|
9
8
|
</a>
|
|
10
9
|
<div :class="[
|
|
11
10
|
'navbar-item user-profile',
|
|
@@ -14,8 +13,7 @@
|
|
|
14
13
|
]" v-else>
|
|
15
14
|
<a class="navbar-link is-arrowless"
|
|
16
15
|
@click.stop="toggle()">
|
|
17
|
-
<avatar
|
|
18
|
-
:user="user"/>
|
|
16
|
+
<avatar :user="user"/>
|
|
19
17
|
<span class="ml-1">
|
|
20
18
|
{{ user.person.appellative || user.person.name }}
|
|
21
19
|
</span>
|
|
@@ -37,22 +35,22 @@
|
|
|
37
35
|
<nav class="level navbar-item">
|
|
38
36
|
<div class="level-left">
|
|
39
37
|
<div class="level-item">
|
|
40
|
-
<a class="button is-small
|
|
38
|
+
<a class="button is-small ml-1"
|
|
41
39
|
@click="visitProfile(); toggle()">
|
|
42
40
|
<span>{{ i18n('Profile') }}</span>
|
|
43
41
|
<span class="icon is-small">
|
|
44
|
-
<fa icon="
|
|
42
|
+
<fa :icon="faEye"/>
|
|
45
43
|
</span>
|
|
46
44
|
</a>
|
|
47
45
|
</div>
|
|
48
46
|
</div>
|
|
49
47
|
<div class="level-right">
|
|
50
48
|
<div class="level-item">
|
|
51
|
-
<a class="button is-small
|
|
49
|
+
<a class="button is-small ml-3"
|
|
52
50
|
@click="logout(); toggle()">
|
|
53
51
|
<span>{{ i18n('Logout') }}</span>
|
|
54
52
|
<span class="icon is-small">
|
|
55
|
-
<fa icon="
|
|
53
|
+
<fa :icon="faRightFromBracket"/>
|
|
56
54
|
</span>
|
|
57
55
|
</a>
|
|
58
56
|
</div>
|
|
@@ -65,15 +63,13 @@
|
|
|
65
63
|
</template>
|
|
66
64
|
|
|
67
65
|
<script>
|
|
68
|
-
import { mapActions } from 'vuex';
|
|
69
66
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
67
|
+
import { faEye, faRightFromBracket } from '@fortawesome/free-solid-svg-icons';
|
|
68
|
+
import { auth } from '@enso-ui/auth/src/pinia/auth';
|
|
72
69
|
import { clickOutside } from '@enso-ui/directives';
|
|
73
70
|
import CoreProfileControl from '../../../core/components/navbar/ProfileControl.vue';
|
|
74
71
|
import Avatar from '../../pages/users/components/Avatar.vue';
|
|
75
72
|
|
|
76
|
-
library.add(faEye, faSignOutAlt);
|
|
77
73
|
export default {
|
|
78
74
|
name: 'ProfileControl',
|
|
79
75
|
|
|
@@ -83,8 +79,15 @@ export default {
|
|
|
83
79
|
|
|
84
80
|
inject: ['i18n'],
|
|
85
81
|
|
|
82
|
+
data: () => ({
|
|
83
|
+
faEye,
|
|
84
|
+
faRightFromBracket,
|
|
85
|
+
}),
|
|
86
|
+
|
|
86
87
|
methods: {
|
|
87
|
-
|
|
88
|
+
logout() {
|
|
89
|
+
return auth().logout();
|
|
90
|
+
},
|
|
88
91
|
},
|
|
89
92
|
};
|
|
90
93
|
</script>
|
|
@@ -95,13 +98,41 @@ export default {
|
|
|
95
98
|
border-radius: 290486px;
|
|
96
99
|
}
|
|
97
100
|
|
|
101
|
+
.navbar-link {
|
|
102
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
103
|
+
|
|
104
|
+
.image.avatar {
|
|
105
|
+
img {
|
|
106
|
+
height: 30px;
|
|
107
|
+
max-height: 30px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.navbar-dropdown {
|
|
113
|
+
min-width: 18.5rem;
|
|
114
|
+
background-color: var(--bulma-navbar-dropdown-background-color);
|
|
115
|
+
border: 1px solid var(--bulma-border);
|
|
116
|
+
box-shadow: none;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
98
120
|
.user-panel {
|
|
99
|
-
width:
|
|
121
|
+
width: 100%;
|
|
122
|
+
background-color: var(--bulma-navbar-dropdown-background-color);
|
|
100
123
|
.image.avatar.is-96x96 {
|
|
101
124
|
img {
|
|
102
125
|
max-height: 96px;
|
|
103
126
|
}
|
|
104
127
|
}
|
|
105
128
|
}
|
|
129
|
+
|
|
130
|
+
.navbar-divider {
|
|
131
|
+
background-color: var(--bulma-border);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.level.navbar-item {
|
|
135
|
+
background-color: var(--bulma-scheme-main);
|
|
136
|
+
}
|
|
106
137
|
}
|
|
107
138
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="columns is-centered">
|
|
2
|
+
<div class="columns is-centered">
|
|
3
3
|
<div class="column is-four-fifths-desktop is-full-touch">
|
|
4
|
-
<enso-form class="box
|
|
4
|
+
<enso-form class="box">
|
|
5
5
|
<template #group_id="props">
|
|
6
6
|
<form-field v-bind="props"
|
|
7
7
|
@update:model-value="pivotParams.userGroups.id = $event"/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="columns is-centered">
|
|
3
3
|
<div class="column is-four-fifths-desktop is-full-touch">
|
|
4
|
-
<enso-form class="box
|
|
4
|
+
<enso-form class="box"
|
|
5
5
|
ref="form"
|
|
6
6
|
@ready="
|
|
7
7
|
ready = true;
|
|
@@ -33,20 +33,6 @@
|
|
|
33
33
|
v-if="!props.field.meta.hidden"/>
|
|
34
34
|
</template>
|
|
35
35
|
<template #actions-left>
|
|
36
|
-
<div class="level-item"
|
|
37
|
-
v-if="canAccess('administration.users.destroy')">
|
|
38
|
-
<a class="button is-danger"
|
|
39
|
-
@click="deletableUser = Number.parseInt($route.params.user, 10)"
|
|
40
|
-
v-if="ready">
|
|
41
|
-
<span class="is-hidden-mobile">
|
|
42
|
-
{{ i18n('Delete') }}
|
|
43
|
-
</span>
|
|
44
|
-
<span class="icon">
|
|
45
|
-
<fa icon="trash-alt"/>
|
|
46
|
-
</span>
|
|
47
|
-
<span class="is-hidden-mobile"/>
|
|
48
|
-
</a>
|
|
49
|
-
</div>
|
|
50
36
|
<div class="level-item">
|
|
51
37
|
<a class="button is-warning"
|
|
52
38
|
@click="$router.push({
|
|
@@ -58,7 +44,7 @@
|
|
|
58
44
|
{{ i18n('Edit Person') }}
|
|
59
45
|
</span>
|
|
60
46
|
<span class="icon">
|
|
61
|
-
<fa icon="
|
|
47
|
+
<fa :icon="faUserTie"/>
|
|
62
48
|
</span>
|
|
63
49
|
<span class="is-hidden-mobile"/>
|
|
64
50
|
</a>
|
|
@@ -72,7 +58,7 @@
|
|
|
72
58
|
{{ i18n('Reset Password') }}
|
|
73
59
|
</span>
|
|
74
60
|
<span class="icon">
|
|
75
|
-
<fa icon="
|
|
61
|
+
<fa :icon="faRotateRight"/>
|
|
76
62
|
</span>
|
|
77
63
|
<span class="is-hidden-mobile"/>
|
|
78
64
|
</a>
|
|
@@ -105,37 +91,28 @@
|
|
|
105
91
|
</tab>
|
|
106
92
|
</template>
|
|
107
93
|
</accessories>
|
|
108
|
-
<delete-modal :user-id="deletableUser"
|
|
109
|
-
@close="deletableUser = null"
|
|
110
|
-
@destroyed="navigateToIndex"
|
|
111
|
-
v-if="!!deletableUser"/>
|
|
112
94
|
</div>
|
|
113
95
|
</div>
|
|
114
96
|
</template>
|
|
115
97
|
|
|
116
98
|
<script>
|
|
117
99
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
118
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
119
100
|
import {
|
|
120
|
-
|
|
101
|
+
faRotateRight, faUserTie,
|
|
121
102
|
} from '@fortawesome/free-solid-svg-icons';
|
|
122
103
|
import { EnsoForm, FormField } from '@enso-ui/forms/bulma';
|
|
123
104
|
import Accessories from '@enso-ui/accessories/bulma';
|
|
124
105
|
import { Tab } from '@enso-ui/tabs/bulma';
|
|
125
|
-
import { mapState } from 'vuex';
|
|
126
106
|
import { PasswordStrength } from '@enso-ui/auth';
|
|
127
|
-
import
|
|
107
|
+
import { useStore } from '../../../utils/pinia';
|
|
128
108
|
import Tokens from './components/Tokens.vue';
|
|
129
109
|
import Sessions from './components/Sessions.vue';
|
|
130
110
|
|
|
131
|
-
library.add(faUserTie, faTrashAlt, faKey, faRedo);
|
|
132
|
-
|
|
133
111
|
export default {
|
|
134
112
|
name: 'Edit',
|
|
135
113
|
|
|
136
114
|
components: {
|
|
137
115
|
Accessories,
|
|
138
|
-
DeleteModal,
|
|
139
116
|
EnsoForm,
|
|
140
117
|
Fa,
|
|
141
118
|
FormField,
|
|
@@ -153,7 +130,8 @@ export default {
|
|
|
153
130
|
emits: ['update'],
|
|
154
131
|
|
|
155
132
|
data: () => ({
|
|
156
|
-
|
|
133
|
+
faRotateRight,
|
|
134
|
+
faUserTie,
|
|
157
135
|
ready: false,
|
|
158
136
|
pivotParams: { userGroups: { id: null } },
|
|
159
137
|
password: null,
|
|
@@ -161,7 +139,12 @@ export default {
|
|
|
161
139
|
}),
|
|
162
140
|
|
|
163
141
|
computed: {
|
|
164
|
-
|
|
142
|
+
enums() {
|
|
143
|
+
return useStore('enums').enums;
|
|
144
|
+
},
|
|
145
|
+
user() {
|
|
146
|
+
return useStore('app').user;
|
|
147
|
+
},
|
|
165
148
|
canAccessSessions() {
|
|
166
149
|
return this.canAccess('administration.users.sessions.index')
|
|
167
150
|
&& (`${this.user.role.id}` === this.enums.roles.Admin
|
|
@@ -174,8 +157,6 @@ export default {
|
|
|
174
157
|
|
|
175
158
|
methods: {
|
|
176
159
|
navigateToIndex() {
|
|
177
|
-
this.deletableUser = null;
|
|
178
|
-
|
|
179
160
|
this.$nextTick(() => this.$router
|
|
180
161
|
.push({ name: 'administration.users.index' })
|
|
181
162
|
.catch(this.routerErrorHandler));
|
|
@@ -1,46 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
3
|
+
<EnsoTable class="box p-0"
|
|
4
4
|
id="users"
|
|
5
5
|
ref="table">
|
|
6
6
|
<template #avatarId="{ row }">
|
|
7
7
|
<avatar class="is-24x24"
|
|
8
8
|
:user="row"/>
|
|
9
9
|
</template>
|
|
10
|
-
|
|
11
|
-
<a class="button is-small is-table-button ml-1"
|
|
12
|
-
:class="cssClass"
|
|
13
|
-
@click="deletableUser = row.id">
|
|
14
|
-
<span class="icon is-small">
|
|
15
|
-
<fa :icon="icon"/>
|
|
16
|
-
</span>
|
|
17
|
-
</a>
|
|
18
|
-
</template>
|
|
19
|
-
</enso-table>
|
|
20
|
-
<delete-modal :user-id="deletableUser"
|
|
21
|
-
@close="deletableUser = null"
|
|
22
|
-
@destroyed="deletableUser = null; $refs.table.fetch()"
|
|
23
|
-
v-if="!!deletableUser"/>
|
|
10
|
+
</EnsoTable>
|
|
24
11
|
</div>
|
|
25
12
|
</template>
|
|
26
13
|
|
|
27
|
-
<script>
|
|
28
|
-
import {
|
|
14
|
+
<script setup>
|
|
15
|
+
import { inject } from 'vue';
|
|
29
16
|
import { EnsoTable } from '@enso-ui/tables/bulma';
|
|
30
17
|
import Avatar from './components/Avatar.vue';
|
|
31
|
-
import DeleteModal from './components/DeleteModal.vue';
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
name: 'Index',
|
|
35
|
-
|
|
36
|
-
components: {
|
|
37
|
-
Avatar, DeleteModal, EnsoTable, Fa,
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
inject: ['canAccess', 'i18n'],
|
|
41
18
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}),
|
|
45
|
-
};
|
|
19
|
+
const canAccess = inject('canAccess');
|
|
20
|
+
const i18n = inject('i18n');
|
|
46
21
|
</script>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<script>
|
|
11
11
|
import 'v-tooltip/dist/v-tooltip.css';
|
|
12
12
|
import { VTooltip } from 'v-tooltip';
|
|
13
|
-
import {
|
|
13
|
+
import { useStore } from '../../../../utils/pinia';
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'Avatar',
|
|
@@ -31,7 +31,9 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
computed: {
|
|
34
|
-
|
|
34
|
+
avatarKey() {
|
|
35
|
+
return useStore('app').avatarKey;
|
|
36
|
+
},
|
|
35
37
|
label() {
|
|
36
38
|
return this.tooltip
|
|
37
39
|
? this.user.person?.appellative ?? this.user.person?.name
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="box p-1
|
|
2
|
+
<div class="box p-1 mb-2">
|
|
3
3
|
<div class="level">
|
|
4
4
|
<div class="level-left">
|
|
5
5
|
<div class="level-item">
|
|
6
6
|
<span class="icon is-small m-1"
|
|
7
7
|
v-tooltip="session.ipAddress">
|
|
8
|
-
<fa icon="
|
|
8
|
+
<fa :icon="faLink"/>
|
|
9
9
|
</span>
|
|
10
10
|
<span>{{ session.ipAddress }}</span>
|
|
11
11
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="level-item">
|
|
15
15
|
<span class="icon is-small mr-1"
|
|
16
16
|
v-tooltip="lastActivity(session)">
|
|
17
|
-
<fa icon="
|
|
17
|
+
<fa :icon="faCalendarDays"/>
|
|
18
18
|
</span>
|
|
19
19
|
<span class="icon is-small mr-1"
|
|
20
20
|
v-tooltip="`${session.OS} version: ${session.OSVersion}`">
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@confirm="$emit('delete')">
|
|
32
32
|
<a class="button is-naked is-small">
|
|
33
33
|
<span class="icon">
|
|
34
|
-
<fa icon="
|
|
34
|
+
<fa :icon="faTrashCan"/>
|
|
35
35
|
</span>
|
|
36
36
|
</a>
|
|
37
37
|
</confirmation>
|
|
@@ -44,9 +44,8 @@
|
|
|
44
44
|
|
|
45
45
|
<script>
|
|
46
46
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
47
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
48
47
|
import {
|
|
49
|
-
|
|
48
|
+
faTrashCan, faCalendarDays, faLink,
|
|
50
49
|
faQuestionCircle,
|
|
51
50
|
} from '@fortawesome/free-solid-svg-icons';
|
|
52
51
|
|
|
@@ -59,13 +58,6 @@ import {
|
|
|
59
58
|
import Confirmation from '@enso-ui/confirmation/bulma';
|
|
60
59
|
import formatDistance from '@enso-ui/ui/src/modules/plugins/date-fns/formatDistance';
|
|
61
60
|
|
|
62
|
-
library.add([
|
|
63
|
-
faCalendarAlt, faInfoCircle, faPencilAlt, faTrashAlt, faLink,
|
|
64
|
-
faQuestionCircle, faWindows, faLinux, faApple, faAndroid, faChrome,
|
|
65
|
-
faOpera, faInternetExplorer, faFirefoxBrowser, faEdge, faLinux, faUbuntu,
|
|
66
|
-
faFreebsd, faSafari,
|
|
67
|
-
]);
|
|
68
|
-
|
|
69
61
|
export default {
|
|
70
62
|
name: 'Session',
|
|
71
63
|
|
|
@@ -83,6 +75,9 @@ export default {
|
|
|
83
75
|
emits: ['delete'],
|
|
84
76
|
|
|
85
77
|
data: () => ({
|
|
78
|
+
faCalendarDays,
|
|
79
|
+
faLink,
|
|
80
|
+
faTrashCan,
|
|
86
81
|
confirmation: false,
|
|
87
82
|
}),
|
|
88
83
|
|
|
@@ -98,46 +93,46 @@ export default {
|
|
|
98
93
|
case 'Windows NT':
|
|
99
94
|
case 'WindowsPhoneOS':
|
|
100
95
|
case 'WindowsMobileOS':
|
|
101
|
-
return
|
|
96
|
+
return faWindows;
|
|
102
97
|
case 'OS X':
|
|
103
98
|
case 'iOS':
|
|
104
99
|
case 'iPadOS':
|
|
105
100
|
case 'Macintosh':
|
|
106
|
-
return
|
|
101
|
+
return faApple;
|
|
107
102
|
case 'Ubuntu':
|
|
108
|
-
return
|
|
103
|
+
return faUbuntu;
|
|
109
104
|
case 'OpenBSD':
|
|
110
|
-
return
|
|
105
|
+
return faFreebsd;
|
|
111
106
|
case 'Debian':
|
|
112
107
|
case 'Linux':
|
|
113
|
-
return
|
|
108
|
+
return faLinux;
|
|
114
109
|
case 'ChromeOS':
|
|
115
|
-
return
|
|
110
|
+
return faChrome;
|
|
116
111
|
case 'AndroidOS':
|
|
117
|
-
return
|
|
112
|
+
return faAndroid;
|
|
118
113
|
default:
|
|
119
|
-
return
|
|
114
|
+
return faQuestionCircle;
|
|
120
115
|
}
|
|
121
116
|
},
|
|
122
117
|
browser({ browser }) {
|
|
123
118
|
switch (browser) {
|
|
124
119
|
case 'Opera Mini':
|
|
125
120
|
case 'Opera':
|
|
126
|
-
return
|
|
121
|
+
return faOpera;
|
|
127
122
|
case 'Edge':
|
|
128
|
-
return
|
|
123
|
+
return faEdge;
|
|
129
124
|
case 'Chrome':
|
|
130
|
-
return
|
|
125
|
+
return faChrome;
|
|
131
126
|
case 'Mozilla':
|
|
132
127
|
case 'Firefox':
|
|
133
|
-
return
|
|
128
|
+
return faFirefoxBrowser;
|
|
134
129
|
case 'Safari':
|
|
135
|
-
return
|
|
130
|
+
return faSafari;
|
|
136
131
|
case 'IE':
|
|
137
|
-
return
|
|
132
|
+
return faInternetExplorer;
|
|
138
133
|
|
|
139
134
|
default:
|
|
140
|
-
return
|
|
135
|
+
return faQuestionCircle;
|
|
141
136
|
}
|
|
142
137
|
},
|
|
143
138
|
},
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
type="text"
|
|
8
8
|
:placeholder="i18n('Filter')">
|
|
9
9
|
<span class="icon is-small is-left">
|
|
10
|
-
<fa icon="
|
|
10
|
+
<fa :icon="faSearch"/>
|
|
11
11
|
</span>
|
|
12
12
|
<span class="icon is-small is-right clear-button"
|
|
13
13
|
@click="query = ''"
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
</span>
|
|
17
17
|
</p>
|
|
18
18
|
<p class="control">
|
|
19
|
-
<a class="button is-rounded is-small
|
|
19
|
+
<a class="button is-rounded is-small ml-2 has-text-weight-bold"
|
|
20
20
|
@click="fetch()">
|
|
21
21
|
<span>
|
|
22
22
|
{{ i18n('Reload') }}
|
|
23
23
|
</span>
|
|
24
24
|
<span class="icon">
|
|
25
|
-
<fa icon="
|
|
25
|
+
<fa :icon="faArrowsRotate"/>
|
|
26
26
|
</span>
|
|
27
27
|
</a>
|
|
28
28
|
</p>
|
|
@@ -40,12 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
42
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
43
|
-
import {
|
|
44
|
-
import { faPlus, faSync, faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
43
|
+
import { faArrowsRotate, faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
45
44
|
import Session from './Session.vue';
|
|
46
45
|
|
|
47
|
-
library.add(faPlus, faSync, faSearch);
|
|
48
|
-
|
|
49
46
|
export default {
|
|
50
47
|
name: 'Sessions',
|
|
51
48
|
|
|
@@ -63,6 +60,8 @@ export default {
|
|
|
63
60
|
emits: ['remove', 'update'],
|
|
64
61
|
|
|
65
62
|
data: () => ({
|
|
63
|
+
faArrowsRotate,
|
|
64
|
+
faSearch,
|
|
66
65
|
sessions: [],
|
|
67
66
|
query: '',
|
|
68
67
|
form: false,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="box p-1
|
|
2
|
+
<div class="box p-1 mb-2">
|
|
3
3
|
<div class="level">
|
|
4
4
|
<div class="level-left">
|
|
5
5
|
<div class="level-item">
|
|
6
6
|
<span class="icon is-small m-1"
|
|
7
7
|
v-tooltip="token.name">
|
|
8
|
-
<fa icon="
|
|
8
|
+
<fa :icon="faKey"/>
|
|
9
9
|
</span>
|
|
10
10
|
<span>
|
|
11
11
|
{{ token.name }}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<div class="level-item">
|
|
17
17
|
<span class="icon is-small"
|
|
18
18
|
v-tooltip="lastUsed(token)">
|
|
19
|
-
<fa icon="
|
|
19
|
+
<fa :icon="faCalendarDays"/>
|
|
20
20
|
</span>
|
|
21
21
|
<span class="is-pulled-right is-flex">
|
|
22
22
|
<confirmation placement="top"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@confirm="$emit('delete')">
|
|
26
26
|
<a class="button is-naked is-small">
|
|
27
27
|
<span class="icon">
|
|
28
|
-
<fa icon="
|
|
28
|
+
<fa :icon="faTrashCan"/>
|
|
29
29
|
</span>
|
|
30
30
|
</a>
|
|
31
31
|
</confirmation>
|
|
@@ -38,17 +38,12 @@
|
|
|
38
38
|
|
|
39
39
|
<script>
|
|
40
40
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
41
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
42
41
|
import {
|
|
43
|
-
|
|
42
|
+
faTrashCan, faCalendarDays, faKey,
|
|
44
43
|
} from '@fortawesome/free-solid-svg-icons';
|
|
45
44
|
import Confirmation from '@enso-ui/confirmation/bulma';
|
|
46
45
|
import formatDistance from '@enso-ui/ui/src/modules/plugins/date-fns/formatDistance';
|
|
47
46
|
|
|
48
|
-
library.add([
|
|
49
|
-
faCalendarAlt, faInfoCircle, faPencilAlt, faTrashAlt,
|
|
50
|
-
]);
|
|
51
|
-
|
|
52
47
|
export default {
|
|
53
48
|
name: 'Token',
|
|
54
49
|
|
|
@@ -66,6 +61,9 @@ export default {
|
|
|
66
61
|
emits: ['delete'],
|
|
67
62
|
|
|
68
63
|
data: () => ({
|
|
64
|
+
faCalendarDays,
|
|
65
|
+
faKey,
|
|
66
|
+
faTrashCan,
|
|
69
67
|
confirmation: false,
|
|
70
68
|
}),
|
|
71
69
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<div class="tokens-wrapper">
|
|
3
3
|
<div class="field is-grouped">
|
|
4
4
|
<p class="control">
|
|
5
|
-
<a class="button is-rounded is-small is-
|
|
5
|
+
<a class="button is-rounded is-small is-info has-text-weight-bold"
|
|
6
6
|
@click="form = true"
|
|
7
7
|
v-if="canAccess('administration.users.tokens.create')">
|
|
8
8
|
<span>
|
|
9
9
|
{{ i18n('New Token') }}
|
|
10
10
|
</span>
|
|
11
11
|
<span class="icon">
|
|
12
|
-
<fa icon="
|
|
12
|
+
<fa :icon="faPlus"/>
|
|
13
13
|
</span>
|
|
14
14
|
</a>
|
|
15
15
|
</p>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
type="text"
|
|
20
20
|
:placeholder="i18n('Filter')">
|
|
21
21
|
<span class="icon is-small is-left">
|
|
22
|
-
<fa icon="
|
|
22
|
+
<fa :icon="faSearch"/>
|
|
23
23
|
</span>
|
|
24
24
|
<span v-if="query"
|
|
25
25
|
class="icon is-small is-right clear-button"
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
</span>
|
|
29
29
|
</p>
|
|
30
30
|
<p class="control">
|
|
31
|
-
<a class="button is-rounded is-small
|
|
31
|
+
<a class="button is-rounded is-small ml-2 has-text-weight-bold"
|
|
32
32
|
@click="fetch()">
|
|
33
33
|
<span>
|
|
34
34
|
{{ i18n('Reload') }}
|
|
35
35
|
</span>
|
|
36
36
|
<span class="icon">
|
|
37
|
-
<fa icon="
|
|
37
|
+
<fa :icon="faArrowsRotate"/>
|
|
38
38
|
</span>
|
|
39
39
|
</a>
|
|
40
40
|
</p>
|
|
@@ -60,14 +60,11 @@
|
|
|
60
60
|
|
|
61
61
|
<script>
|
|
62
62
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
63
|
-
import {
|
|
64
|
-
import { faPlus, faSync, faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
63
|
+
import { faPlus, faArrowsRotate, faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
65
64
|
import Url from './Url.vue';
|
|
66
65
|
import Token from './Token.vue';
|
|
67
66
|
import TokenForm from './TokenForm.vue';
|
|
68
67
|
|
|
69
|
-
library.add(faPlus, faSync, faSearch);
|
|
70
|
-
|
|
71
68
|
export default {
|
|
72
69
|
name: 'Tokens',
|
|
73
70
|
|
|
@@ -90,6 +87,9 @@ export default {
|
|
|
90
87
|
emits: ['remove', 'update'],
|
|
91
88
|
|
|
92
89
|
data: () => ({
|
|
90
|
+
faArrowsRotate,
|
|
91
|
+
faPlus,
|
|
92
|
+
faSearch,
|
|
93
93
|
tokens: [],
|
|
94
94
|
query: '',
|
|
95
95
|
form: false,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<a class="button"
|
|
13
13
|
@click="copy">
|
|
14
14
|
<span class="icon is-small">
|
|
15
|
-
<fa icon="
|
|
15
|
+
<fa :icon="faCopy"/>
|
|
16
16
|
</span>
|
|
17
17
|
</a>
|
|
18
18
|
</div>
|
|
@@ -24,14 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
26
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
27
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
28
27
|
import { faCopy } from '@fortawesome/free-solid-svg-icons';
|
|
29
28
|
import { focus, selectOnFocus } from '@enso-ui/directives';
|
|
30
29
|
import { Modal } from '@enso-ui/modal/bulma';
|
|
31
30
|
import Clipboard from '@enso-ui/clipboard';
|
|
32
31
|
|
|
33
|
-
library.add(faCopy);
|
|
34
|
-
|
|
35
32
|
export default {
|
|
36
33
|
name: 'Url',
|
|
37
34
|
|
|
@@ -53,6 +50,10 @@ export default {
|
|
|
53
50
|
},
|
|
54
51
|
},
|
|
55
52
|
|
|
53
|
+
data: () => ({
|
|
54
|
+
faCopy,
|
|
55
|
+
}),
|
|
56
|
+
|
|
56
57
|
methods: {
|
|
57
58
|
copy() {
|
|
58
59
|
this.$refs.clipboard.copy(this.link);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="box
|
|
2
|
+
<div class="box p-5"
|
|
3
3
|
v-if="profile">
|
|
4
4
|
<h4 class="title is-4 has-text-centered">
|
|
5
5
|
<span class="icon">
|
|
6
|
-
<fa icon="
|
|
6
|
+
<fa :icon="faUser"
|
|
7
7
|
size="xs"/>
|
|
8
8
|
</span>
|
|
9
9
|
{{ profile.person.name }}
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
<div class="field is-grouped is-justify-content-center mt-3">
|
|
20
20
|
<p class="control"
|
|
21
21
|
v-if="isSelfVisiting">
|
|
22
|
-
<a class="button is-
|
|
22
|
+
<a class="button is-dark"
|
|
23
23
|
@click="generateAvatar">
|
|
24
24
|
<span class="icon">
|
|
25
|
-
<fa icon="
|
|
25
|
+
<fa :icon="faArrowsRotate"/>
|
|
26
26
|
</span>
|
|
27
27
|
<span>
|
|
28
28
|
{{ i18n('Avatar') }}
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
:url="route('core.avatars.store')"
|
|
36
36
|
file-key="avatar">
|
|
37
37
|
<template #control="{ controlEvents }">
|
|
38
|
-
<a class="button is-
|
|
38
|
+
<a class="button is-dark"
|
|
39
39
|
v-on="controlEvents">
|
|
40
40
|
<span class="icon">
|
|
41
|
-
<fa icon="
|
|
41
|
+
<fa :icon="faUpload"/>
|
|
42
42
|
</span>
|
|
43
43
|
<span>
|
|
44
44
|
{{ i18n('Avatar') }}
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
<p class="control"
|
|
51
51
|
v-if="canAccess('core.impersonate.start')
|
|
52
52
|
&& !isWebview && !isSelfVisiting && !impersonating">
|
|
53
|
-
<a class="button is-
|
|
53
|
+
<a class="button is-dark"
|
|
54
54
|
@click="startImpersonating">
|
|
55
55
|
<span class="icon">
|
|
56
|
-
<fa icon="
|
|
56
|
+
<fa :icon="faCircleUser"/>
|
|
57
57
|
</span>
|
|
58
58
|
<span>
|
|
59
59
|
{{ i18n('Impersonate') }}
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
</p>
|
|
63
63
|
<p class="control"
|
|
64
64
|
v-if="canAccess('administration.users.edit')">
|
|
65
|
-
<a class="button is-
|
|
65
|
+
<a class="button is-dark"
|
|
66
66
|
@click="$router.push({
|
|
67
67
|
name: 'administration.users.edit',
|
|
68
68
|
params: { user: profile.id },
|
|
69
69
|
}).catch(routerErrorHandler)">
|
|
70
70
|
<span class="icon">
|
|
71
|
-
<fa icon="
|
|
71
|
+
<fa :icon="faPen"/>
|
|
72
72
|
</span>
|
|
73
73
|
<span>
|
|
74
74
|
{{ i18n('Edit') }}
|
|
@@ -143,19 +143,16 @@
|
|
|
143
143
|
</template>
|
|
144
144
|
|
|
145
145
|
<script>
|
|
146
|
-
import { mapState, mapMutations, mapGetters } from 'vuex';
|
|
147
146
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
148
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
149
147
|
import {
|
|
150
|
-
|
|
148
|
+
faArrowsRotate, faUpload, faUser, faCircleUser, faPen,
|
|
151
149
|
} from '@fortawesome/free-solid-svg-icons';
|
|
152
150
|
import Avatar from '@enso-ui/users/src/bulma/pages/users/components/Avatar.vue';
|
|
153
151
|
import { EnsoUploader } from '@enso-ui/uploader/bulma';
|
|
154
152
|
import eventBus from '@enso-ui/ui/src/core/services/eventBus';
|
|
155
153
|
import Divider from '@enso-ui/divider';
|
|
156
154
|
import format from '@enso-ui/ui/src/modules/plugins/date-fns/format';
|
|
157
|
-
|
|
158
|
-
library.add(faUser, faUserCircle, faSyncAlt, faUpload, faPencilAlt);
|
|
155
|
+
import { useStore } from '../../../../utils/pinia';
|
|
159
156
|
|
|
160
157
|
export default {
|
|
161
158
|
name: 'UserProfile',
|
|
@@ -170,14 +167,30 @@ export default {
|
|
|
170
167
|
emits: ['start-impersonating'],
|
|
171
168
|
|
|
172
169
|
data: () => ({
|
|
170
|
+
faArrowsRotate,
|
|
171
|
+
faCircleUser,
|
|
172
|
+
faPen,
|
|
173
|
+
faUpload,
|
|
174
|
+
faUser,
|
|
173
175
|
profile: null,
|
|
174
176
|
}),
|
|
175
177
|
|
|
176
178
|
computed: {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
user() {
|
|
180
|
+
return useStore('app').user;
|
|
181
|
+
},
|
|
182
|
+
meta() {
|
|
183
|
+
return useStore('app').meta;
|
|
184
|
+
},
|
|
185
|
+
impersonating() {
|
|
186
|
+
return useStore('app').impersonating;
|
|
187
|
+
},
|
|
188
|
+
isAuth() {
|
|
189
|
+
return useStore('auth').isAuth;
|
|
190
|
+
},
|
|
191
|
+
isWebview() {
|
|
192
|
+
return useStore('app').isWebview;
|
|
193
|
+
},
|
|
181
194
|
isSelfVisiting() {
|
|
182
195
|
return this.user.id === this.profile.id;
|
|
183
196
|
},
|
|
@@ -190,7 +203,9 @@ export default {
|
|
|
190
203
|
},
|
|
191
204
|
|
|
192
205
|
methods: {
|
|
193
|
-
|
|
206
|
+
updateAvatar() {
|
|
207
|
+
useStore('app').updateAvatar();
|
|
208
|
+
},
|
|
194
209
|
dateFormat(date) {
|
|
195
210
|
return date
|
|
196
211
|
? format(date, this.meta.dateFormat)
|
package/src/bulma/register.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import App from '@enso-ui/ui/src/core/app';
|
|
2
1
|
import ProfileController from './components/navbar/ProfileControl.vue';
|
|
3
2
|
|
|
4
|
-
App
|
|
3
|
+
export default App => {
|
|
4
|
+
App.registerNavbarItem('profile-controller', ProfileController, 400);
|
|
5
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import routeImporter from '@enso-ui/ui/src/modules/importers/routeImporter';
|
|
2
2
|
|
|
3
|
-
const routes = routeImporter(
|
|
3
|
+
const routes = routeImporter.fromGlob(import.meta.glob('./users/*.js', { eager: true }));
|
|
4
4
|
const Router = () => import('@enso-ui/ui/src/bulma/pages/Router.vue');
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import routeImporter from '@enso-ui/ui/src/modules/importers/routeImporter';
|
|
2
2
|
|
|
3
|
-
const routes = routeImporter(
|
|
3
|
+
const routes = routeImporter.fromGlob(import.meta.glob('./administration/*.js', { eager: true }));
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
path: '/administration',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
2
|
+
import { useStore } from '../../../utils/pinia';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
name: 'CoreProfileControl',
|
|
@@ -10,11 +10,6 @@ export default {
|
|
|
10
10
|
visible: false,
|
|
11
11
|
}),
|
|
12
12
|
|
|
13
|
-
computed: {
|
|
14
|
-
...mapState(['user']),
|
|
15
|
-
...mapState('layout', ['isTouch']),
|
|
16
|
-
},
|
|
17
|
-
|
|
18
13
|
methods: {
|
|
19
14
|
hide() {
|
|
20
15
|
this.visible = false;
|
|
@@ -23,17 +18,22 @@ export default {
|
|
|
23
18
|
this.visible = !this.visible;
|
|
24
19
|
},
|
|
25
20
|
visitProfile() {
|
|
21
|
+
const app = useStore('app');
|
|
22
|
+
|
|
26
23
|
this.$router.push({
|
|
27
24
|
name: 'administration.users.show',
|
|
28
|
-
params: { user:
|
|
25
|
+
params: { user: app.user.id },
|
|
29
26
|
}).catch(this.routerErrorHandler);
|
|
30
27
|
},
|
|
31
28
|
},
|
|
32
29
|
|
|
33
30
|
render() {
|
|
31
|
+
const app = useStore('app');
|
|
32
|
+
const layout = useStore('layout');
|
|
33
|
+
|
|
34
34
|
return this.$slots.default({
|
|
35
|
-
user:
|
|
36
|
-
isTouch:
|
|
35
|
+
user: app.user,
|
|
36
|
+
isTouch: layout.isTouch,
|
|
37
37
|
visitProfile: this.visitProfile,
|
|
38
38
|
hide: this.hide,
|
|
39
39
|
toggle: this.toggle,
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<modal>
|
|
3
|
-
<div class="box">
|
|
4
|
-
<h5 class="subtitle is-5">
|
|
5
|
-
{{ i18n("The selected user is about to be deleted. Are you sure?") }}
|
|
6
|
-
</h5>
|
|
7
|
-
<hr>
|
|
8
|
-
<div class="level">
|
|
9
|
-
<div class="level-left"/>
|
|
10
|
-
<div class="level-right">
|
|
11
|
-
<div class="level-item">
|
|
12
|
-
<button class="button is-outlined"
|
|
13
|
-
@click="$emit('close')">
|
|
14
|
-
{{ i18n("Cancel") }}
|
|
15
|
-
</button>
|
|
16
|
-
<button class="button is-danger ml-1"
|
|
17
|
-
v-focus
|
|
18
|
-
@click="destroy()">
|
|
19
|
-
{{ i18n("Delete User") }}
|
|
20
|
-
</button>
|
|
21
|
-
<button class="button is-danger ml-1"
|
|
22
|
-
v-focus
|
|
23
|
-
@click="destroy(true)">
|
|
24
|
-
{{ i18n("Delete User and Person") }}
|
|
25
|
-
</button>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</modal>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
import { focus } from '@enso-ui/directives';
|
|
35
|
-
import { Modal } from '@enso-ui/modal/bulma';
|
|
36
|
-
|
|
37
|
-
export default {
|
|
38
|
-
name: 'DeleteModal',
|
|
39
|
-
|
|
40
|
-
components: { Modal },
|
|
41
|
-
|
|
42
|
-
directives: { focus },
|
|
43
|
-
|
|
44
|
-
inject: ['http', 'i18n', 'errorHandler', 'route'],
|
|
45
|
-
|
|
46
|
-
props: {
|
|
47
|
-
userId: {
|
|
48
|
-
type: Number,
|
|
49
|
-
required: true,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
emits: ['close', 'destroyed'],
|
|
54
|
-
|
|
55
|
-
methods: {
|
|
56
|
-
destroy(person = false) {
|
|
57
|
-
this.http.delete(this.route('administration.users.destroy', this.userId),
|
|
58
|
-
{ params: { person: !!person } })
|
|
59
|
-
.then(({ data }) => this.$emit('destroyed', data))
|
|
60
|
-
.catch(this.errorHandler);
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
</script>
|