message-verify 1.0.1-beta.54 → 1.0.1-beta.55
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/locales/en.d.ts +1 -0
- package/dist/locales/en.js +2 -1
- package/dist/locales/id.d.ts +1 -0
- package/dist/locales/id.js +2 -1
- package/dist/locales/zh.d.ts +1 -0
- package/dist/locales/zh.js +2 -1
- package/dist/modal/verify-modal.js +3 -10
- package/package.json +1 -1
- package/src/locales/en.ts +2 -1
- package/src/locales/id.ts +2 -1
- package/src/locales/zh.ts +2 -1
- package/src/modal/verify-modal.tsx +3 -10
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/en.js
CHANGED
@@ -10,5 +10,6 @@ export default {
|
|
10
10
|
accountAlert: 'Account Security Alert',
|
11
11
|
alertContent: 'Changes have been detected in your login environment or network information.To ensure account security, please log in again to verify your identity.',
|
12
12
|
ok: 'OK',
|
13
|
-
chidoriOpenPro: 'Chidori has activated security protection for you'
|
13
|
+
chidoriOpenPro: 'Chidori has activated security protection for you',
|
14
|
+
verifyFail: 'Validation failed'
|
14
15
|
};
|
package/dist/locales/id.d.ts
CHANGED
package/dist/locales/id.js
CHANGED
@@ -10,5 +10,6 @@ export default {
|
|
10
10
|
accountAlert: 'Peringatan Keamanan Akun',
|
11
11
|
alertContent: 'Terdeteksi perubahan pada lingkungan login atau informasi jaringan Anda.Untuk menjaga keamanan akun, silakan login kembali untuk memverifikasi identitas Anda.',
|
12
12
|
ok: 'Baiklah',
|
13
|
-
chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda'
|
13
|
+
chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda',
|
14
|
+
verifyFail: 'Autentikasi gagal'
|
14
15
|
};
|
package/dist/locales/zh.d.ts
CHANGED
package/dist/locales/zh.js
CHANGED
@@ -68,15 +68,13 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
68
68
|
onClose?.();
|
69
69
|
}, children: [_jsx("div", { style: { fontSize: 14, color: '#666' }, children: t('alreadySend', lang, { phone: mobile }) }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 12 }, children: [_jsx(Input.OTP, { length: 6, value: otp, onChange: async (val) => {
|
70
70
|
setOtp(val);
|
71
|
-
console.log('val', val);
|
72
71
|
if (val.length === 6) {
|
73
|
-
console.log('val2===>');
|
74
72
|
try {
|
75
73
|
const res = await Promise.race([
|
76
74
|
new Promise((resolve, reject) => {
|
77
75
|
setTimeout(() => {
|
78
76
|
reject(new Error('Timeout'));
|
79
|
-
},
|
77
|
+
}, 1000);
|
80
78
|
}),
|
81
79
|
new Promise((resolve, reject) => {
|
82
80
|
http({
|
@@ -88,29 +86,24 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
88
86
|
'Content-Type': config.headers['Content-Type'],
|
89
87
|
}
|
90
88
|
}).then(res => {
|
91
|
-
console.log('res', res);
|
92
89
|
resolve(res);
|
93
90
|
}).catch(err => {
|
94
|
-
console.log('err', err);
|
95
91
|
reject(err);
|
96
92
|
});
|
97
93
|
})
|
98
94
|
]);
|
99
|
-
console.log('res', res);
|
100
95
|
if (res?.data?.status?.code === 0) {
|
101
|
-
console.log('code', res?.data?.status?.code);
|
102
96
|
apiResolve(res);
|
103
97
|
setVisible(false);
|
104
98
|
}
|
105
99
|
else {
|
106
|
-
|
107
|
-
message.error('验证失败');
|
100
|
+
message.error(t('verifyFail', lang));
|
108
101
|
setOtp('');
|
109
102
|
}
|
110
103
|
}
|
111
104
|
catch (error) {
|
112
105
|
console.warn('catch=>error', error);
|
113
|
-
message.error('
|
106
|
+
message.error(t('verifyFail', lang));
|
114
107
|
setOtp('');
|
115
108
|
}
|
116
109
|
}
|
package/package.json
CHANGED
package/src/locales/en.ts
CHANGED
@@ -10,5 +10,6 @@ export default {
|
|
10
10
|
accountAlert: 'Account Security Alert',
|
11
11
|
alertContent: 'Changes have been detected in your login environment or network information.To ensure account security, please log in again to verify your identity.',
|
12
12
|
ok: 'OK',
|
13
|
-
chidoriOpenPro: 'Chidori has activated security protection for you'
|
13
|
+
chidoriOpenPro: 'Chidori has activated security protection for you',
|
14
|
+
verifyFail: 'Validation failed'
|
14
15
|
};
|
package/src/locales/id.ts
CHANGED
@@ -10,5 +10,6 @@ export default {
|
|
10
10
|
accountAlert: 'Peringatan Keamanan Akun',
|
11
11
|
alertContent: 'Terdeteksi perubahan pada lingkungan login atau informasi jaringan Anda.Untuk menjaga keamanan akun, silakan login kembali untuk memverifikasi identitas Anda.',
|
12
12
|
ok: 'Baiklah',
|
13
|
-
chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda'
|
13
|
+
chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda',
|
14
|
+
verifyFail: 'Autentikasi gagal'
|
14
15
|
};
|
package/src/locales/zh.ts
CHANGED
@@ -84,15 +84,13 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
|
|
84
84
|
value={otp}
|
85
85
|
onChange={async (val) => {
|
86
86
|
setOtp(val);
|
87
|
-
console.log('val', val);
|
88
87
|
if (val.length === 6) {
|
89
|
-
console.log('val2===>');
|
90
88
|
try {
|
91
89
|
const res = await Promise.race([
|
92
90
|
new Promise((resolve, reject) => {
|
93
91
|
setTimeout(() => {
|
94
92
|
reject(new Error('Timeout'));
|
95
|
-
},
|
93
|
+
}, 1000);
|
96
94
|
}),
|
97
95
|
new Promise((resolve, reject) => {
|
98
96
|
http({
|
@@ -104,27 +102,22 @@ const CreateMessageVerifyModal = ({ props }: { props: VerifyModalConfig }) => {
|
|
104
102
|
'Content-Type': config.headers['Content-Type'],
|
105
103
|
}
|
106
104
|
}).then(res => {
|
107
|
-
console.log('res', res);
|
108
105
|
resolve(res);
|
109
106
|
}).catch(err => {
|
110
|
-
console.log('err', err);
|
111
107
|
reject(err);
|
112
108
|
})
|
113
109
|
})
|
114
110
|
]) as any;
|
115
|
-
console.log('res', res);
|
116
111
|
if (res?.data?.status?.code === 0) {
|
117
|
-
console.log('code', res?.data?.status?.code);
|
118
112
|
apiResolve(res);
|
119
113
|
setVisible(false);
|
120
114
|
} else {
|
121
|
-
|
122
|
-
message.error('验证失败');
|
115
|
+
message.error(t('verifyFail', lang));
|
123
116
|
setOtp('');
|
124
117
|
}
|
125
118
|
} catch (error) {
|
126
119
|
console.warn('catch=>error', error);
|
127
|
-
message.error('
|
120
|
+
message.error(t('verifyFail', lang));
|
128
121
|
setOtp('');
|
129
122
|
}
|
130
123
|
}
|