@vc-shell/framework 1.0.74 → 1.0.75
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Login.vue.d.ts","sourceRoot":"","sources":["../../../../../../shared/pages/LoginPage/components/login/Login.vue.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;;
|
|
1
|
+
{"version":3,"file":"Login.vue.d.ts","sourceRoot":"","sources":["../../../../../../shared/pages/LoginPage/components/login/Login.vue.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;;AAugBD,wBAAkD;AAElD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.75",
|
|
4
4
|
"main": "./dist/framework.mjs",
|
|
5
5
|
"module": "./dist/framework.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"whatwg-fetch": "^3.6.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
60
|
-
"@vc-shell/config-generator": "^1.0.
|
|
59
|
+
"@vc-shell/api-client-generator": "^1.0.75",
|
|
60
|
+
"@vc-shell/config-generator": "^1.0.75",
|
|
61
61
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
62
62
|
"sass": "^1.62.1",
|
|
63
63
|
"typescript": "~5.0.4",
|
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
/>
|
|
50
50
|
</Field>
|
|
51
51
|
|
|
52
|
-
<div
|
|
52
|
+
<div
|
|
53
|
+
v-if="forgotPassword"
|
|
54
|
+
class="tw-flex tw-justify-end tw-items-center tw-pt-2"
|
|
55
|
+
>
|
|
53
56
|
<VcButton
|
|
54
57
|
text
|
|
55
58
|
type="button"
|
|
@@ -125,7 +128,7 @@
|
|
|
125
128
|
{{ $t("LOGIN.BACK_BUTTON") }}
|
|
126
129
|
</vc-button>
|
|
127
130
|
<vc-button
|
|
128
|
-
:disabled="loading || isDisabled"
|
|
131
|
+
:disabled="loading || isDisabled || loadingForgotPassword"
|
|
129
132
|
@click="forgot"
|
|
130
133
|
>
|
|
131
134
|
{{ $t("LOGIN.FORGOT_BUTTON") }}
|
|
@@ -192,17 +195,27 @@ const router = useRouter();
|
|
|
192
195
|
|
|
193
196
|
useForm({ validateOnMount: false });
|
|
194
197
|
const { getUiCustomizationSettings, uiSettings } = useSettings();
|
|
195
|
-
|
|
198
|
+
let useLogin;
|
|
199
|
+
const injected = inject<CommonPageComposables>("commonPageComposables");
|
|
200
|
+
if (injected) {
|
|
201
|
+
useLogin = injected?.useLogin;
|
|
202
|
+
}
|
|
196
203
|
|
|
197
204
|
const signInResult = ref<SignInResults>({ succeeded: true });
|
|
198
205
|
const requestPassResult = ref<RequestPasswordResult>({ succeeded: true });
|
|
199
206
|
const forgotPasswordRequestSent = ref(false);
|
|
200
207
|
const { signIn, loading, loadUser, externalSignIn, isAzureAdAuthAvailable, getAzureAdAuthCaption } = useUser();
|
|
201
|
-
|
|
208
|
+
let forgotPassword;
|
|
209
|
+
if (useLogin) {
|
|
210
|
+
const { forgotPassword: forgot } = useLogin();
|
|
211
|
+
forgotPassword = forgot;
|
|
212
|
+
}
|
|
213
|
+
|
|
202
214
|
const isLogin = ref(true);
|
|
203
215
|
const isValid = useIsFormValid();
|
|
204
216
|
const isDirty = useIsFormDirty();
|
|
205
217
|
const customizationLoading = ref(false);
|
|
218
|
+
const loadingForgotPassword = ref(false);
|
|
206
219
|
|
|
207
220
|
onMounted(async () => {
|
|
208
221
|
try {
|
|
@@ -252,9 +265,14 @@ const login = async () => {
|
|
|
252
265
|
};
|
|
253
266
|
|
|
254
267
|
const forgot = async () => {
|
|
255
|
-
if (isValid.value) {
|
|
256
|
-
|
|
257
|
-
|
|
268
|
+
if (isValid.value && forgotPassword) {
|
|
269
|
+
try {
|
|
270
|
+
loadingForgotPassword.value = true;
|
|
271
|
+
await forgotPassword({ loginOrEmail: forgotPasswordForm.loginOrEmail });
|
|
272
|
+
forgotPasswordRequestSent.value = true;
|
|
273
|
+
} finally {
|
|
274
|
+
loadingForgotPassword.value = false;
|
|
275
|
+
}
|
|
258
276
|
}
|
|
259
277
|
};
|
|
260
278
|
|