@fishawack/lab-velocity 2.0.0-beta.5 → 2.0.0-beta.50
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/README.md +467 -36
- package/_Build/js/libs/build-id.js +14 -0
- package/_Build/js/libs/filters.js +36 -0
- package/_Build/js/libs/globals.js +7 -0
- package/_Build/js/libs/router.js +22 -0
- package/_Build/js/libs/routes.js +29 -0
- package/_Build/js/libs/store.js +21 -0
- package/_Build/js/libs/utility.js +161 -0
- package/_Build/vue/components/basic/Button.vue +1 -1
- package/_Build/vue/components/form/Avatar.vue +90 -0
- package/_Build/vue/components/form/Checkbox.vue +10 -0
- package/_Build/vue/components/form/InputNumber.vue +1 -1
- package/_Build/vue/components/form/Select.vue +223 -33
- package/_Build/vue/components/form/Spinner.vue +5 -0
- package/_Build/vue/components/layout/Alert.vue +5 -5
- package/_Build/vue/components/layout/Audit.vue +143 -0
- package/_Build/vue/{modules/AuthModule/components/VBreadcrumbs.vue → components/layout/Breadcrumbs.vue} +4 -4
- package/_Build/vue/{modules/AuthModule/components → components/layout}/Chips.vue +2 -2
- package/_Build/vue/components/layout/Footer.vue +11 -10
- package/_Build/vue/{modules/AuthModule/components/VFormFooter.vue → components/layout/FormFooter.vue} +13 -7
- package/_Build/vue/{modules/AuthModule/components → components/layout}/FormRole.vue +10 -8
- package/_Build/vue/components/layout/Layout.vue +94 -0
- package/_Build/vue/components/layout/Navigation.vue +77 -0
- package/_Build/vue/{modules/AuthModule/components/VPageHeader.vue → components/layout/PageHeader.vue} +14 -8
- package/_Build/vue/components/layout/SideBar.vue +26 -0
- package/_Build/vue/{modules/AuthModule/components/VTable.vue → components/layout/Table.vue} +37 -16
- package/_Build/vue/{modules/AuthModule/components/VTableSorter.vue → components/layout/TableSorter.vue} +108 -52
- package/_Build/vue/components/layout/TokenDisplay.vue +52 -0
- package/_Build/vue/components/layout/pageTitle.vue +1 -1
- package/_Build/vue/components/navigation/MenuItem.vue +7 -2
- package/_Build/vue/components/navigation/MenuItemGroup.vue +7 -2
- package/_Build/vue/modules/AuthModule/js/axios.js +21 -1
- package/_Build/vue/modules/AuthModule/js/guest-request.js +32 -0
- package/_Build/vue/modules/AuthModule/js/impersonation-banner.js +102 -0
- package/_Build/vue/modules/AuthModule/js/router.js +91 -114
- package/_Build/vue/modules/AuthModule/js/store.js +23 -6
- package/_Build/vue/modules/AuthModule/routes/PCompanies/columns.js +268 -0
- package/_Build/vue/modules/AuthModule/routes/PCompanies/resource.js +213 -0
- package/_Build/vue/modules/AuthModule/routes/PIntegrations/columns.js +58 -0
- package/_Build/vue/modules/AuthModule/routes/PIntegrations/resource.js +79 -0
- package/_Build/vue/modules/AuthModule/routes/PTeams/columns.js +78 -0
- package/_Build/vue/modules/AuthModule/routes/PTeams/resource.js +251 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/SetPasswordAction.vue +51 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/SetPasswordDialog.vue +138 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/columns.js +349 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/resource.js +239 -0
- package/_Build/vue/modules/AuthModule/routes/account-exists.vue +2 -2
- package/_Build/vue/modules/AuthModule/routes/change-password.vue +28 -32
- package/_Build/vue/modules/AuthModule/routes/container.vue +2 -11
- package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +4 -4
- package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +10 -9
- package/_Build/vue/modules/AuthModule/routes/force-reset.vue +44 -58
- package/_Build/vue/modules/AuthModule/routes/forgot.vue +10 -5
- package/_Build/vue/modules/AuthModule/routes/login.vue +12 -19
- package/_Build/vue/modules/AuthModule/routes/logincallback.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/loginsso.vue +14 -10
- package/_Build/vue/modules/AuthModule/routes/logout.vue +17 -5
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/register.vue +24 -28
- package/_Build/vue/modules/AuthModule/routes/reset.vue +20 -14
- package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +14 -8
- package/_Build/vue/modules/AuthModule/routes/success-reset.vue +2 -2
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/verify.vue +11 -14
- package/_Build/vue/modules/resource/Children/create.vue +81 -0
- package/_Build/vue/modules/resource/Children/edit.vue +106 -0
- package/_Build/vue/modules/resource/Children/index.vue +42 -0
- package/_Build/vue/modules/resource/Children/partials/form.vue +111 -0
- package/_Build/vue/modules/resource/Children/show.vue +166 -0
- package/_Build/vue/modules/resource/index.js +561 -0
- package/_Build/vue/modules/resource/parent.vue +63 -0
- package/_Build/vue/modules/resource/trashable.js +104 -0
- package/_base.scss +0 -1
- package/_defaults.scss +2 -13
- package/_variables.scss +9 -4
- package/{modules/_AuthModule.scss → components/_auth.scss} +19 -68
- package/components/_datepicker.scss +1 -0
- package/components/_descriptions.scss +2 -0
- package/components/_footer.scss +1 -0
- package/components/_form.scss +18 -0
- package/components/_header.scss +3 -27
- package/components/_layout.scss +56 -0
- package/components/_menu.scss +0 -5
- package/components/_sidebar.scss +12 -27
- package/components/_table.scss +3 -0
- package/components/_token-display.scss +41 -0
- package/general.scss +1 -0
- package/index.js +31 -1
- package/package.json +7 -4
- package/vendor.scss +0 -1
- package/_Build/vue/components/layout/sideBar.vue +0 -25
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +0 -251
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +0 -62
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +0 -98
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/index.vue +0 -90
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +0 -173
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +0 -262
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +0 -36
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +0 -103
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +0 -169
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +0 -120
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +0 -36
- package/components/_input.scss +0 -0
- package/modules/_AuthVariables.scss +0 -7
- /package/_Build/vue/{modules/AuthModule/components → components/layout}/AuthModal.vue +0 -0
- /package/_Build/vue/{modules/AuthModule/components → components/layout}/Chip.vue +0 -0
- /package/_Build/vue/{modules/AuthModule/components/VPasswordValidation.vue → components/layout/PasswordValidation.vue} +0 -0
- /package/_Build/vue/{modules/AuthModule/components/VRoleLegend.vue → components/layout/RoleLegend.vue} +0 -0
- /package/{modules → components}/_modal.scss +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { merge } from "lodash";
|
|
2
|
+
import { h } from "vue";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import { ElMessageBox, ElNotification } from "element-plus";
|
|
5
|
+
|
|
6
|
+
import { columns, defaultResource } from "../../../resource/index.js";
|
|
7
|
+
import usersColumns, { detectedCompany } from "./columns.js";
|
|
8
|
+
|
|
9
|
+
import VelFormRole from "../../../../components/layout/FormRole.vue";
|
|
10
|
+
import VelButton from "../../../../components/basic/Button.vue";
|
|
11
|
+
import VelRoleLegend from "../../../../components/layout/RoleLegend.vue";
|
|
12
|
+
import SetPasswordAction from "./SetPasswordAction.vue";
|
|
13
|
+
|
|
14
|
+
function generatePassword(
|
|
15
|
+
length = 20,
|
|
16
|
+
characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@-#$",
|
|
17
|
+
) {
|
|
18
|
+
return (
|
|
19
|
+
Array.from(crypto.getRandomValues(new Uint32Array(length)))
|
|
20
|
+
.map((x) => characters[x % characters.length])
|
|
21
|
+
.join("") + Math.floor(Math.random() * 10)
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default [
|
|
26
|
+
"users",
|
|
27
|
+
{
|
|
28
|
+
api: {
|
|
29
|
+
params: {
|
|
30
|
+
index: () => ({
|
|
31
|
+
include: "company",
|
|
32
|
+
}),
|
|
33
|
+
show: () => ({ include: "company" }),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
searchable: {
|
|
37
|
+
value: "email",
|
|
38
|
+
},
|
|
39
|
+
auditable: true,
|
|
40
|
+
trashable: true,
|
|
41
|
+
permissions: {
|
|
42
|
+
create: ({ $store }) => $store.getters.can("write users"),
|
|
43
|
+
edit: ({ $store }) => $store.getters.can("write users"),
|
|
44
|
+
delete: ({ $store }) => $store.getters.can("delete users"),
|
|
45
|
+
},
|
|
46
|
+
...merge(columns(usersColumns), {
|
|
47
|
+
form: {
|
|
48
|
+
fields: ({ model, method }) => ({
|
|
49
|
+
...columns(usersColumns).form.fields({ model }),
|
|
50
|
+
...(method === "post"
|
|
51
|
+
? {
|
|
52
|
+
notify_user: true,
|
|
53
|
+
force_password_change: true,
|
|
54
|
+
set_password: true,
|
|
55
|
+
password: null,
|
|
56
|
+
password_confirmation: null,
|
|
57
|
+
}
|
|
58
|
+
: {}),
|
|
59
|
+
}),
|
|
60
|
+
async submit(props) {
|
|
61
|
+
const { model, form, $router, $store, method, resource } =
|
|
62
|
+
props;
|
|
63
|
+
|
|
64
|
+
const hold = form.data();
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
form.populate(resource.form.preparation(props));
|
|
68
|
+
|
|
69
|
+
if (method === "post") {
|
|
70
|
+
const isSSOCompany =
|
|
71
|
+
!!detectedCompany.value?.sso_enabled;
|
|
72
|
+
|
|
73
|
+
if (!isSSOCompany && form.set_password) {
|
|
74
|
+
const password = generatePassword();
|
|
75
|
+
form.password = password;
|
|
76
|
+
form.password_confirmation = password;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let res = await form.post(`/api/users`);
|
|
80
|
+
|
|
81
|
+
if (
|
|
82
|
+
!isSSOCompany &&
|
|
83
|
+
form.set_password &&
|
|
84
|
+
!form.notify_user
|
|
85
|
+
) {
|
|
86
|
+
ElMessageBox.alert(
|
|
87
|
+
`<p>The password below will not be shown again. Ensure you've taken a copy if you plan to send manually. <br><br><strong>Email</strong>: ${form.email}<br> <strong>Password</strong>: ${form.password}</p>`,
|
|
88
|
+
"User Created",
|
|
89
|
+
{
|
|
90
|
+
confirmButtonText: "Ok",
|
|
91
|
+
dangerouslyUseHTMLString: true,
|
|
92
|
+
},
|
|
93
|
+
)
|
|
94
|
+
.then(() => {
|
|
95
|
+
$router.replace({
|
|
96
|
+
name: "users.show",
|
|
97
|
+
params: {
|
|
98
|
+
[resource.id]: res.data.id,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
})
|
|
102
|
+
.catch(() => {});
|
|
103
|
+
} else {
|
|
104
|
+
ElNotification({
|
|
105
|
+
title: "Success",
|
|
106
|
+
message: isSSOCompany
|
|
107
|
+
? "SSO user pre-provisioned successfully"
|
|
108
|
+
: "User created a notified of their new account",
|
|
109
|
+
type: "success",
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
$router.replace({
|
|
113
|
+
name: "users.show",
|
|
114
|
+
params: {
|
|
115
|
+
[resource.id]: res.data.id,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
let res = await form.post(`/api/users/${model.id}`);
|
|
121
|
+
|
|
122
|
+
if (res.data.id === $store.state.auth.user.id) {
|
|
123
|
+
await $store.dispatch("getUser");
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
$router.replace({
|
|
127
|
+
name: "users.show",
|
|
128
|
+
params: {
|
|
129
|
+
[resource.id]: res.data.id,
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
} catch (e) {
|
|
134
|
+
console.log(e);
|
|
135
|
+
} finally {
|
|
136
|
+
if (
|
|
137
|
+
!form.successful ||
|
|
138
|
+
!form.__options.resetOnSuccess
|
|
139
|
+
) {
|
|
140
|
+
form.populate(hold);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
index: {
|
|
146
|
+
layout: [
|
|
147
|
+
...defaultResource.index.layout,
|
|
148
|
+
() =>
|
|
149
|
+
h(VelRoleLegend, {
|
|
150
|
+
class: "mt-5",
|
|
151
|
+
}),
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
show: {
|
|
155
|
+
actions: [
|
|
156
|
+
({ model, $store }) =>
|
|
157
|
+
$store.getters.can("write users") &&
|
|
158
|
+
!model.email_verified_at &&
|
|
159
|
+
h(
|
|
160
|
+
VelButton,
|
|
161
|
+
{
|
|
162
|
+
async onClick() {
|
|
163
|
+
try {
|
|
164
|
+
const res = await axios.post(
|
|
165
|
+
`/api/users/${model.id}/verify`,
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
Object.assign(model, res.data.data);
|
|
169
|
+
|
|
170
|
+
ElNotification({
|
|
171
|
+
title: "Success",
|
|
172
|
+
message: "User marked as verified",
|
|
173
|
+
type: "success",
|
|
174
|
+
});
|
|
175
|
+
} catch (e) {
|
|
176
|
+
console.log(e);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
"Mark as Verified",
|
|
181
|
+
),
|
|
182
|
+
({ model, $store }) => {
|
|
183
|
+
if (!$store.getters.can("write users")) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return h(SetPasswordAction, {
|
|
188
|
+
userId: model.id,
|
|
189
|
+
model,
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
({ model, $store, $root }) =>
|
|
193
|
+
$store.getters.can("impersonate users") &&
|
|
194
|
+
h(
|
|
195
|
+
VelButton,
|
|
196
|
+
{
|
|
197
|
+
type: "danger",
|
|
198
|
+
async onClick() {
|
|
199
|
+
try {
|
|
200
|
+
const user = (
|
|
201
|
+
await axios.post(
|
|
202
|
+
`/api/users/impersonate`,
|
|
203
|
+
{
|
|
204
|
+
user_id: model.id,
|
|
205
|
+
},
|
|
206
|
+
)
|
|
207
|
+
).data.data;
|
|
208
|
+
|
|
209
|
+
$store.commit("setUser", user);
|
|
210
|
+
|
|
211
|
+
if (!$store.getters.can("view admin")) {
|
|
212
|
+
window.location = `${$root.spaUrl}?authenticated=1`;
|
|
213
|
+
}
|
|
214
|
+
} catch (e) {
|
|
215
|
+
console.log(e);
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
"Impersonate",
|
|
220
|
+
),
|
|
221
|
+
...defaultResource.show.actions,
|
|
222
|
+
],
|
|
223
|
+
tabs: [
|
|
224
|
+
...defaultResource.show.tabs,
|
|
225
|
+
({ model }) => ({
|
|
226
|
+
label: "Access control",
|
|
227
|
+
component: h(VelFormRole, {
|
|
228
|
+
overrides: model.overrides_roles_and_permissions,
|
|
229
|
+
form: {
|
|
230
|
+
roles: model.roles.map((d) => d.id),
|
|
231
|
+
},
|
|
232
|
+
readonly: true,
|
|
233
|
+
}),
|
|
234
|
+
}),
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
}),
|
|
238
|
+
},
|
|
239
|
+
];
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<section id="resetPasswordForm">
|
|
4
4
|
<h1 class="h2">Account already exists</h1>
|
|
5
5
|
|
|
6
|
-
<p class="mt
|
|
6
|
+
<p class="mt mb-0 color-21">
|
|
7
7
|
<strong class="">Company: {{ $route.query.company }}</strong>
|
|
8
8
|
</p>
|
|
9
|
-
<p class="
|
|
9
|
+
<p class="mt-0.5">Your company already has an active account.</p>
|
|
10
10
|
|
|
11
11
|
<elButton
|
|
12
12
|
tag="router-link"
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
/>
|
|
8
8
|
<form class="form" @submit.prevent="submit">
|
|
9
9
|
<div v-if="!form.successful">
|
|
10
|
-
<p class="
|
|
10
|
+
<p class="mt-2 mb-0">
|
|
11
11
|
Please complete the fields below to change your
|
|
12
12
|
password.
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<el-input
|
|
16
|
-
class="
|
|
16
|
+
class="mt-3"
|
|
17
17
|
label="Current password"
|
|
18
18
|
placeholder="Enter your current password"
|
|
19
19
|
name="current_password"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
/>
|
|
26
26
|
<el-input
|
|
27
27
|
v-model="form.password"
|
|
28
|
-
class="
|
|
28
|
+
class="mt-2 mb-2"
|
|
29
29
|
label="New Password"
|
|
30
30
|
placeholder="Enter your new password"
|
|
31
31
|
name="password"
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
:password="true"
|
|
37
37
|
/>
|
|
38
38
|
|
|
39
|
-
<
|
|
39
|
+
<VelPasswordValidation
|
|
40
40
|
:password="form.password"
|
|
41
41
|
@passwordValid="updatePasswordValidity"
|
|
42
42
|
/>
|
|
43
|
-
<div class="flex
|
|
43
|
+
<div class="flex mt-3">
|
|
44
44
|
<elButton
|
|
45
45
|
native-type="submit"
|
|
46
46
|
class=""
|
|
@@ -66,7 +66,11 @@
|
|
|
66
66
|
>Email: {{ $store.state.auth?.user?.email }}</strong
|
|
67
67
|
>
|
|
68
68
|
<p v-text="`Your password has been updated.`" />
|
|
69
|
-
<elButton
|
|
69
|
+
<elButton
|
|
70
|
+
tag="router-link"
|
|
71
|
+
type="primary"
|
|
72
|
+
:to="{ name: $store.state.auth.redirect }"
|
|
73
|
+
>
|
|
70
74
|
<span v-text="'Continue'" />
|
|
71
75
|
</elButton>
|
|
72
76
|
</div>
|
|
@@ -77,8 +81,17 @@
|
|
|
77
81
|
|
|
78
82
|
<script>
|
|
79
83
|
import Form from "form-backend-validation";
|
|
84
|
+
import { guestRequest } from "../js/guest-request";
|
|
80
85
|
|
|
81
86
|
export default {
|
|
87
|
+
components: {
|
|
88
|
+
VelPasswordValidation:
|
|
89
|
+
require("../../../components/layout/PasswordValidation.vue")
|
|
90
|
+
.default,
|
|
91
|
+
elInput: require("../../../components/form/basic.vue").default,
|
|
92
|
+
elButton: require("../../../components/basic/Button.vue").default,
|
|
93
|
+
},
|
|
94
|
+
|
|
82
95
|
data() {
|
|
83
96
|
return {
|
|
84
97
|
form: new Form(
|
|
@@ -94,9 +107,7 @@ export default {
|
|
|
94
107
|
},
|
|
95
108
|
|
|
96
109
|
mounted() {
|
|
97
|
-
this.$store.dispatch("getUser"
|
|
98
|
-
errors: this.$root.errors,
|
|
99
|
-
});
|
|
110
|
+
this.$store.dispatch("getUser");
|
|
100
111
|
},
|
|
101
112
|
|
|
102
113
|
methods: {
|
|
@@ -107,7 +118,7 @@ export default {
|
|
|
107
118
|
await this.form.put("/user/password");
|
|
108
119
|
await this.login();
|
|
109
120
|
} catch (e) {
|
|
110
|
-
|
|
121
|
+
console.log(e);
|
|
111
122
|
} finally {
|
|
112
123
|
this.loading = false;
|
|
113
124
|
}
|
|
@@ -116,19 +127,13 @@ export default {
|
|
|
116
127
|
this.loading = true;
|
|
117
128
|
|
|
118
129
|
try {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
// errors: this.$root.errors,
|
|
125
|
-
});
|
|
126
|
-
} catch (e) {}
|
|
127
|
-
|
|
128
|
-
await this.form.post("/login");
|
|
129
|
-
}
|
|
130
|
+
await guestRequest({
|
|
131
|
+
form: this.form,
|
|
132
|
+
url: "/login",
|
|
133
|
+
store: this.$store,
|
|
134
|
+
});
|
|
130
135
|
} catch (e) {
|
|
131
|
-
|
|
136
|
+
console.log(e);
|
|
132
137
|
} finally {
|
|
133
138
|
this.loading = false;
|
|
134
139
|
this.postLogin();
|
|
@@ -143,9 +148,7 @@ export default {
|
|
|
143
148
|
},
|
|
144
149
|
|
|
145
150
|
async postLogin() {
|
|
146
|
-
const { data: user } = await this.$store.dispatch("getUser"
|
|
147
|
-
errors: this.$root.errors,
|
|
148
|
-
});
|
|
151
|
+
const { data: user } = await this.$store.dispatch("getUser");
|
|
149
152
|
},
|
|
150
153
|
},
|
|
151
154
|
|
|
@@ -154,12 +157,5 @@ export default {
|
|
|
154
157
|
title: "Reset Password",
|
|
155
158
|
};
|
|
156
159
|
},
|
|
157
|
-
|
|
158
|
-
components: {
|
|
159
|
-
VPasswordValidation: require("./../components/VPasswordValidation.vue")
|
|
160
|
-
.default,
|
|
161
|
-
elInput: require("../../../components/form/basic.vue").default,
|
|
162
|
-
elButton: require("../../../components/basic/Button.vue").default,
|
|
163
|
-
},
|
|
164
160
|
};
|
|
165
161
|
</script>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<router-link to="/" class="logo" aria-label="Go to home page">
|
|
6
6
|
<GSvg
|
|
7
7
|
class="AuthModule__logo"
|
|
8
|
-
:name="
|
|
8
|
+
:name="$store.state.auth.logo"
|
|
9
9
|
embed
|
|
10
10
|
asis
|
|
11
11
|
role="presentation"
|
|
@@ -21,14 +21,5 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
|
-
export default {
|
|
25
|
-
mounted() {},
|
|
26
|
-
data() {
|
|
27
|
-
return {
|
|
28
|
-
logoName: process.env.HYDRATE_LOGO,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
components: {},
|
|
33
|
-
};
|
|
24
|
+
export default {};
|
|
34
25
|
</script>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<h1 class="h2 h2--small">Sorry, your password reset has expired</h1>
|
|
3
3
|
|
|
4
|
-
<p class="
|
|
4
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
5
5
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
6
6
|
</p>
|
|
7
|
-
<p class="
|
|
7
|
+
<p class="mt-0.5">
|
|
8
8
|
For security, password reset requests are only
|
|
9
9
|
<strong>active for 1 hour</strong>. If you still want to reset your
|
|
10
10
|
password, please request a new password reset-link.
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
Request new reset-link
|
|
32
32
|
</elButton>
|
|
33
33
|
|
|
34
|
-
<p class="disclaimer
|
|
34
|
+
<p class="disclaimer mt-3">
|
|
35
35
|
<router-link class="color-1 underline" :to="{ name: 'auth.login' }">
|
|
36
36
|
Back to Sign in
|
|
37
37
|
</router-link>
|
|
@@ -66,7 +66,7 @@ export default {
|
|
|
66
66
|
query: { email: this.form.email },
|
|
67
67
|
});
|
|
68
68
|
} catch (e) {
|
|
69
|
-
|
|
69
|
+
console.log(e);
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
},
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
<h1 class="h2 h2--small">Verification link expired</h1>
|
|
3
3
|
|
|
4
4
|
<form class="form" @submit.prevent="submit">
|
|
5
|
-
<p class="
|
|
5
|
+
<p class="mt-2 mb-0 color-highlight">
|
|
6
6
|
<strong class="">Email: {{ form?.email }}</strong>
|
|
7
7
|
</p>
|
|
8
|
-
<p class="
|
|
8
|
+
<p class="mt-0.5">
|
|
9
9
|
This email verification link has expired. Not to worry, we can email
|
|
10
10
|
you a new one.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<el-input
|
|
14
|
-
class="
|
|
14
|
+
class="mt-2 mb-2.5 hidden"
|
|
15
15
|
v-model="form.email"
|
|
16
16
|
label="Email address"
|
|
17
17
|
name="email"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</elButton>
|
|
33
33
|
</form>
|
|
34
34
|
|
|
35
|
-
<p class="disclaimer
|
|
35
|
+
<p class="disclaimer mt-3">
|
|
36
36
|
Having trouble singing in?
|
|
37
37
|
<a :href="$store.state.auth.contact" class="underline">Contact us</a>
|
|
38
38
|
</p>
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
42
|
import Form from "form-backend-validation";
|
|
43
|
+
import { ElNotification } from "element-plus";
|
|
43
44
|
|
|
44
45
|
export default {
|
|
45
46
|
components: {
|
|
@@ -64,30 +65,30 @@ export default {
|
|
|
64
65
|
this.notification = null;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
await this.form.post("/email/verification
|
|
68
|
+
await this.form.post("/email/resend-verification");
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
ElNotification.success({
|
|
70
71
|
message: "Email has been re-sent",
|
|
71
72
|
duration: 10000,
|
|
72
73
|
class: "el-notification--success el-notification--right-override",
|
|
73
74
|
});
|
|
74
75
|
} catch (e) {
|
|
75
76
|
if (e.response && e.response.status === 429) {
|
|
76
|
-
this.notification =
|
|
77
|
+
this.notification = ElNotification({
|
|
77
78
|
type: "warning",
|
|
78
79
|
message: "Please allow 10 minutes before re-requesting",
|
|
79
80
|
duration: 0,
|
|
80
81
|
class: "el-notification--warning el-notification--right-override",
|
|
81
82
|
});
|
|
82
83
|
} else if (e.response && e.response.status === 422) {
|
|
83
|
-
this.notification =
|
|
84
|
+
this.notification = ElNotification({
|
|
84
85
|
type: "error",
|
|
85
86
|
message: e.response.data.message,
|
|
86
87
|
duration: 0,
|
|
87
88
|
class: "el-notification--error el-notification--right-override",
|
|
88
89
|
});
|
|
89
90
|
} else {
|
|
90
|
-
|
|
91
|
+
console.log(e);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
},
|