message-verify 1.0.1-beta.33 → 1.0.1-beta.35
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/main.js +2 -0
- package/dist/utils/type.d.ts +1 -0
- package/dist/verify-modal.js +3 -3
- 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/main.tsx +2 -0
- package/src/utils/type.ts +1 -0
- package/src/verify-modal.tsx +3 -2
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/en.js
CHANGED
@@ -9,5 +9,6 @@ export default {
|
|
9
9
|
countDownSecound: '{countdown} seconds',
|
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
|
-
ok: 'OK'
|
12
|
+
ok: 'OK',
|
13
|
+
chidoriOpenPro: 'Chidori has activated security protection for you'
|
13
14
|
};
|
package/dist/locales/id.d.ts
CHANGED
package/dist/locales/id.js
CHANGED
@@ -9,5 +9,6 @@ export default {
|
|
9
9
|
countDownSecound: '{countdown} detik',
|
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
|
-
ok: 'Baiklah'
|
12
|
+
ok: 'Baiklah',
|
13
|
+
chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda'
|
13
14
|
};
|
package/dist/locales/zh.d.ts
CHANGED
package/dist/locales/zh.js
CHANGED
package/dist/main.js
CHANGED
@@ -44,6 +44,8 @@ createRoot(document.getElementById('root')).render(_jsxs(_Fragment, { children:
|
|
44
44
|
apiReject: () => {
|
45
45
|
},
|
46
46
|
apiResolve: () => {
|
47
|
+
},
|
48
|
+
apiPromiseToEmpty: () => {
|
47
49
|
}
|
48
50
|
}), children: "Show verify Modal" }), _jsx("button", { onClick: () => createReLoginModal({
|
49
51
|
goLogin: () => {
|
package/dist/utils/type.d.ts
CHANGED
package/dist/verify-modal.js
CHANGED
@@ -11,7 +11,7 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
11
11
|
const [captchaImage, setCaptchaImage] = useState('');
|
12
12
|
const [captchCode, setCaptchCode] = useState('');
|
13
13
|
const [captchaKey, setCaptchaKey] = useState('');
|
14
|
-
const { data, http, lang, api = '/admin/sms/send', config, apiResolve,
|
14
|
+
const { data, http, lang, api = '/admin/sms/send', config, apiResolve, apiPromiseToEmpty } = props || {};
|
15
15
|
const dataObj = JSON.parse(data || '{}');
|
16
16
|
const { mobile, verifyCodeKey } = dataObj || {};
|
17
17
|
const getKey = async () => {
|
@@ -64,7 +64,7 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
64
64
|
};
|
65
65
|
return (_jsxs(Modal, { width: 420, visible: visible, onClose: () => {
|
66
66
|
setVisible(false);
|
67
|
-
|
67
|
+
apiPromiseToEmpty();
|
68
68
|
props.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);
|
@@ -110,6 +110,6 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
110
110
|
} }), _jsx(Button, { disabled: countdown > 0 || !captchCode, onClick: handleResend, style: { padding: '8px' }, children: countdown > 0 ? t('countDownSecound', lang, { countdown }) : t('reSend', lang) })] }), countdown > 0 ? null :
|
111
111
|
_jsxs("div", { style: { marginTop: 12, display: 'flex', alignItems: 'center' }, children: [_jsx(Input, { placeholder: t('pleaseEnterPicVerifyCode', lang), onChange: (e) => {
|
112
112
|
setCaptchCode(e);
|
113
|
-
}, style: { width: 300 } }), captchaImage && _jsx("img", { src: captchaImage, alt: t('verifyCode', lang), style: { width: 100, height: 30, marginLeft: 8 }, onClick: getKey })] }), (countdown > 0 || captchCode) ? null : _jsx("div", { style: { fontSize: 14, color: 'red' }, children: t('pleaseEnterAndSend', lang) })] }));
|
113
|
+
}, style: { width: 300 } }), captchaImage && _jsx("img", { src: captchaImage, alt: t('verifyCode', lang), style: { width: 100, height: 30, marginLeft: 8 }, onClick: getKey })] }), (countdown > 0 || captchCode) ? null : _jsx("div", { style: { fontSize: 14, color: 'red' }, children: t('pleaseEnterAndSend', lang) }), _jsx("div", { style: { fontSize: 14, color: '#666', marginTop: 12 }, children: t('chidoriOpenPro', lang) })] }));
|
114
114
|
};
|
115
115
|
export default CreateMessageVerifyModal;
|
package/package.json
CHANGED
package/src/locales/en.ts
CHANGED
@@ -9,5 +9,6 @@ export default {
|
|
9
9
|
countDownSecound: '{countdown} seconds',
|
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
|
-
ok: 'OK'
|
12
|
+
ok: 'OK',
|
13
|
+
chidoriOpenPro: 'Chidori has activated security protection for you'
|
13
14
|
};
|
package/src/locales/id.ts
CHANGED
@@ -9,5 +9,6 @@ export default {
|
|
9
9
|
countDownSecound: '{countdown} detik',
|
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
|
-
ok: 'Baiklah'
|
12
|
+
ok: 'Baiklah',
|
13
|
+
chidoriOpenPro: 'chidori telah mengaktifkan keamanan untuk Anda'
|
13
14
|
};
|
package/src/locales/zh.ts
CHANGED
package/src/main.tsx
CHANGED
package/src/utils/type.ts
CHANGED
package/src/verify-modal.tsx
CHANGED
@@ -12,7 +12,7 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
|
|
12
12
|
const [captchaImage, setCaptchaImage] = useState<string>('');
|
13
13
|
const [captchCode, setCaptchCode] = useState<string>('');
|
14
14
|
const [captchaKey, setCaptchaKey] = useState<string>('');
|
15
|
-
const { data, http, lang, api = '/admin/sms/send', config, apiResolve,
|
15
|
+
const { data, http, lang, api = '/admin/sms/send', config, apiResolve, apiPromiseToEmpty } = props || {};
|
16
16
|
const dataObj = JSON.parse(data || '{}');
|
17
17
|
const { mobile, verifyCodeKey } = dataObj || {};
|
18
18
|
|
@@ -72,7 +72,7 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
|
|
72
72
|
visible={visible}
|
73
73
|
onClose={() => {
|
74
74
|
setVisible(false);
|
75
|
-
|
75
|
+
apiPromiseToEmpty();
|
76
76
|
props.onClose?.();
|
77
77
|
}}
|
78
78
|
>
|
@@ -143,6 +143,7 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
|
|
143
143
|
{captchaImage && <img src={captchaImage} alt={t('verifyCode', lang)} style={{ width: 100, height: 30, marginLeft: 8 }} onClick={getKey} />}
|
144
144
|
</div>}
|
145
145
|
{(countdown > 0 || captchCode) ? null : <div style={{ fontSize: 14, color: 'red' }}>{t('pleaseEnterAndSend', lang)}</div>}
|
146
|
+
<div style={{ fontSize: 14, color: '#666', marginTop: 12 }}>{t('chidoriOpenPro', lang)}</div>
|
146
147
|
</Modal>
|
147
148
|
);
|
148
149
|
};
|