pukaad-ui-lib 1.273.0 → 1.274.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/dist/module.json +1 -1
- package/dist/runtime/components/modal/modal-password-verify.d.vue.ts +2 -0
- package/dist/runtime/components/modal/modal-password-verify.vue +1 -1
- package/dist/runtime/components/modal/modal-password-verify.vue.d.ts +2 -0
- package/dist/runtime/components/modal/modal-secure.vue +7 -1
- package/package.json +1 -1
- /package/dist/runtime/assets/svg/socials/{Whatsapp.svg → WhatsApp.svg} +0 -0
package/dist/module.json
CHANGED
|
@@ -18,12 +18,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
18
18
|
"update:modelValue": (value: boolean) => any;
|
|
19
19
|
complete: (data: {
|
|
20
20
|
secId: string;
|
|
21
|
+
resetToken?: string;
|
|
21
22
|
}) => any;
|
|
22
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
24
|
onClose?: (() => any) | undefined;
|
|
24
25
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
26
|
onComplete?: ((data: {
|
|
26
27
|
secId: string;
|
|
28
|
+
resetToken?: string;
|
|
27
29
|
}) => any) | undefined;
|
|
28
30
|
}>, {
|
|
29
31
|
title: string;
|
|
@@ -51,7 +51,7 @@ const handleSubmit = async () => {
|
|
|
51
51
|
body: { password: password.value }
|
|
52
52
|
});
|
|
53
53
|
if (res.message?.title !== "\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08") throw "\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07";
|
|
54
|
-
emit("complete", { secId: "" });
|
|
54
|
+
emit("complete", { secId: "", resetToken: res.data?.reset_token });
|
|
55
55
|
isOpen.value = false;
|
|
56
56
|
} else {
|
|
57
57
|
if (!props.loginToken) {
|
|
@@ -18,12 +18,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
18
18
|
"update:modelValue": (value: boolean) => any;
|
|
19
19
|
complete: (data: {
|
|
20
20
|
secId: string;
|
|
21
|
+
resetToken?: string;
|
|
21
22
|
}) => any;
|
|
22
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
24
|
onClose?: (() => any) | undefined;
|
|
24
25
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
26
|
onComplete?: ((data: {
|
|
26
27
|
secId: string;
|
|
28
|
+
resetToken?: string;
|
|
27
29
|
}) => any) | undefined;
|
|
28
30
|
}>, {
|
|
29
31
|
title: string;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
mode="secure" @complete="(data) => handleComplete(modal.key, data)"
|
|
4
4
|
:confirmed-text="isLastStep ? '\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19' : '\u0E16\u0E31\u0E14\u0E44\u0E1B'" @close="isOpen = false" v-model="modalStates[modal.key]"
|
|
5
5
|
:request-path="modal.key === 'phoneOTP' ? '/otp/phone-request' : void 0"
|
|
6
|
-
:verify-path="modal.key === 'phoneOTP' ? '/otp/phone-verify' : void 0"
|
|
6
|
+
:verify-path="modal.key === 'phoneOTP' ? '/otp/phone-verify' : void 0"
|
|
7
|
+
:reset-token="resetTokenState" />
|
|
7
8
|
</template>
|
|
8
9
|
|
|
9
10
|
<script setup>
|
|
@@ -29,6 +30,7 @@ const isOpen = defineModel({ type: Boolean, ...{
|
|
|
29
30
|
default: false
|
|
30
31
|
} });
|
|
31
32
|
const isLastStep = ref(false);
|
|
33
|
+
const resetTokenState = ref("");
|
|
32
34
|
const modals = [
|
|
33
35
|
{ key: "password", component: ModalPasswordVerify },
|
|
34
36
|
{ key: "passwordNew", component: ModalPasswordNew },
|
|
@@ -42,6 +44,9 @@ const modalStates = reactive(
|
|
|
42
44
|
);
|
|
43
45
|
const handleComplete = (key, data) => {
|
|
44
46
|
modalStates[key] = false;
|
|
47
|
+
if (data?.resetToken || data?.reset_token) {
|
|
48
|
+
resetTokenState.value = data.resetToken || data.reset_token;
|
|
49
|
+
}
|
|
45
50
|
if (props.state === "add-phone") {
|
|
46
51
|
if (key === "password") {
|
|
47
52
|
if (props.twoFaEnabled) {
|
|
@@ -167,6 +172,7 @@ const onDisabled2FA = async () => {
|
|
|
167
172
|
};
|
|
168
173
|
watch(isOpen, (v) => {
|
|
169
174
|
if (!v) return;
|
|
175
|
+
resetTokenState.value = "";
|
|
170
176
|
modalStates.password = true;
|
|
171
177
|
if (["delete-phone", "delete-email"].includes(props.state)) {
|
|
172
178
|
isLastStep.value = !props.twoFaEnabled;
|
package/package.json
CHANGED
|
File without changes
|