message-verify 1.0.1-beta.8 → 1.0.1-beta.9
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 +3 -0
- package/dist/locales/en.js +4 -1
- package/dist/locales/id.d.ts +3 -0
- package/dist/locales/id.js +4 -1
- package/dist/locales/zh.d.ts +3 -0
- package/dist/locales/zh.js +4 -1
- package/dist/main.js +1 -0
- package/dist/relogin-modal.js +7 -7
- package/dist/utils/type.d.ts +2 -1
- package/package.json +1 -1
- package/src/locales/en.ts +4 -1
- package/src/locales/id.ts +4 -1
- package/src/locales/zh.ts +4 -1
- package/src/main.tsx +1 -0
- package/src/relogin-modal.tsx +8 -8
- package/src/utils/type.ts +2 -1
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/en.js
CHANGED
@@ -6,5 +6,8 @@ export default {
|
|
6
6
|
sendSuccess: 'Successfully sent',
|
7
7
|
sendFailed: 'Send failed',
|
8
8
|
reSend: 'Resend',
|
9
|
-
countDownSecound: '{countdown} seconds'
|
9
|
+
countDownSecound: '{countdown} seconds',
|
10
|
+
accountAlert: 'Account Security Alert',
|
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'
|
10
13
|
};
|
package/dist/locales/id.d.ts
CHANGED
package/dist/locales/id.js
CHANGED
@@ -6,5 +6,8 @@ export default {
|
|
6
6
|
sendSuccess: 'Berhasil dikirim',
|
7
7
|
sendFailed: 'Gagal mengirim',
|
8
8
|
reSend: 'Kirim Ulang',
|
9
|
-
countDownSecound: '{countdown} detik'
|
9
|
+
countDownSecound: '{countdown} detik',
|
10
|
+
accountAlert: 'Peringatan Keamanan Akun',
|
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'
|
10
13
|
};
|
package/dist/locales/zh.d.ts
CHANGED
package/dist/locales/zh.js
CHANGED
package/dist/main.js
CHANGED
package/dist/relogin-modal.js
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { useState } from 'react';
|
3
3
|
import { Modal, Button } from './compoments/index.js';
|
4
|
+
import t from './utils/i18n.js';
|
4
5
|
const ReLoginModal = ({ props }) => {
|
5
|
-
const { goLogin } = props || {};
|
6
|
+
const { goLogin, lang } = props || {};
|
6
7
|
const [visible, setVisible] = useState(true);
|
7
8
|
const onClose = () => {
|
8
9
|
setVisible(false);
|
9
10
|
goLogin();
|
10
11
|
};
|
11
|
-
return (_jsxs(Modal, { visible: visible, onClose: onClose, width: 420, children: [_jsx("div", { style: { fontWeight: 500, fontSize: 20, marginBottom: 24 }, children:
|
12
|
+
return (_jsxs(Modal, { visible: visible, onClose: onClose, width: 420, children: [_jsx("div", { style: { fontWeight: 500, fontSize: 20, marginBottom: 24 }, children: t('accountAlert', lang) }), _jsx("div", { style: { color: '#222', fontSize: 16, marginBottom: 40, lineHeight: '24px' }, children: t('alertContent', lang) }), _jsx("div", { style: { display: 'flex', justifyContent: 'center' }, children: _jsx(Button, { style: {
|
12
13
|
background: '#1677ff',
|
13
14
|
color: '#fff',
|
14
15
|
border: 'none',
|
15
|
-
width:
|
16
|
-
height:
|
17
|
-
fontSize:
|
18
|
-
fontWeight: 500,
|
16
|
+
width: 80,
|
17
|
+
height: 36,
|
18
|
+
fontSize: 14,
|
19
19
|
borderRadius: 8,
|
20
20
|
boxShadow: '0 2px 8px rgba(22,119,255,0.08)',
|
21
|
-
}, onClick: onClose, children:
|
21
|
+
}, onClick: onClose, children: t('ok', lang) }) })] }));
|
22
22
|
};
|
23
23
|
export default ReLoginModal;
|
package/dist/utils/type.d.ts
CHANGED
@@ -7,7 +7,7 @@ export type ModalConfig = {
|
|
7
7
|
};
|
8
8
|
[key: string]: unknown;
|
9
9
|
};
|
10
|
-
lang
|
10
|
+
lang?: 'zh' | 'en' | 'id';
|
11
11
|
http: {
|
12
12
|
(params: object): Promise<unknown>;
|
13
13
|
defaults: {
|
@@ -23,4 +23,5 @@ export type ModalConfig = {
|
|
23
23
|
};
|
24
24
|
export type LoginModalConfig = {
|
25
25
|
goLogin: () => void;
|
26
|
+
lang?: 'zh' | 'en' | 'id';
|
26
27
|
};
|
package/package.json
CHANGED
package/src/locales/en.ts
CHANGED
@@ -6,5 +6,8 @@ export default {
|
|
6
6
|
sendSuccess: 'Successfully sent',
|
7
7
|
sendFailed: 'Send failed',
|
8
8
|
reSend: 'Resend',
|
9
|
-
countDownSecound: '{countdown} seconds'
|
9
|
+
countDownSecound: '{countdown} seconds',
|
10
|
+
accountAlert: 'Account Security Alert',
|
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'
|
10
13
|
};
|
package/src/locales/id.ts
CHANGED
@@ -6,5 +6,8 @@ export default {
|
|
6
6
|
sendSuccess: 'Berhasil dikirim',
|
7
7
|
sendFailed: 'Gagal mengirim',
|
8
8
|
reSend: 'Kirim Ulang',
|
9
|
-
countDownSecound: '{countdown} detik'
|
9
|
+
countDownSecound: '{countdown} detik',
|
10
|
+
accountAlert: 'Peringatan Keamanan Akun',
|
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'
|
10
13
|
};
|
package/src/locales/zh.ts
CHANGED
package/src/main.tsx
CHANGED
package/src/relogin-modal.tsx
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import { useState } from 'react'
|
2
2
|
import { Modal, Button } from './compoments/index.js'
|
3
3
|
import { LoginModalConfig } from './utils/type.js';
|
4
|
+
import t from './utils/i18n.js'
|
4
5
|
|
5
6
|
const ReLoginModal = ({ props }: { props: LoginModalConfig }) => {
|
6
|
-
const { goLogin } = props || {};
|
7
|
+
const { goLogin, lang } = props || {};
|
7
8
|
const [visible, setVisible] = useState(true);
|
8
9
|
const onClose = () => {
|
9
10
|
setVisible(false);
|
@@ -12,10 +13,10 @@ const ReLoginModal = ({ props }: { props: LoginModalConfig }) => {
|
|
12
13
|
return (
|
13
14
|
<Modal visible={visible} onClose={onClose} width={420}>
|
14
15
|
<div style={{ fontWeight: 500, fontSize: 20, marginBottom: 24 }}>
|
15
|
-
|
16
|
+
{t('accountAlert', lang)}
|
16
17
|
</div>
|
17
18
|
<div style={{ color: '#222', fontSize: 16, marginBottom: 40, lineHeight: '24px' }}>
|
18
|
-
|
19
|
+
{t('alertContent', lang)}
|
19
20
|
</div>
|
20
21
|
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
21
22
|
<Button
|
@@ -23,16 +24,15 @@ const ReLoginModal = ({ props }: { props: LoginModalConfig }) => {
|
|
23
24
|
background: '#1677ff',
|
24
25
|
color: '#fff',
|
25
26
|
border: 'none',
|
26
|
-
width:
|
27
|
-
height:
|
28
|
-
fontSize:
|
29
|
-
fontWeight: 500,
|
27
|
+
width: 80,
|
28
|
+
height: 36,
|
29
|
+
fontSize: 14,
|
30
30
|
borderRadius: 8,
|
31
31
|
boxShadow: '0 2px 8px rgba(22,119,255,0.08)',
|
32
32
|
}}
|
33
33
|
onClick={onClose}
|
34
34
|
>
|
35
|
-
|
35
|
+
{t('ok', lang)}
|
36
36
|
</Button>
|
37
37
|
</div>
|
38
38
|
</Modal>
|
package/src/utils/type.ts
CHANGED
@@ -8,7 +8,7 @@ export type ModalConfig = {
|
|
8
8
|
};
|
9
9
|
[key: string]: unknown;
|
10
10
|
};
|
11
|
-
lang
|
11
|
+
lang?: 'zh' | 'en' | 'id';
|
12
12
|
http: {
|
13
13
|
(params: object): Promise<unknown>;
|
14
14
|
defaults: {
|
@@ -25,4 +25,5 @@ export type ModalConfig = {
|
|
25
25
|
|
26
26
|
export type LoginModalConfig = {
|
27
27
|
goLogin: () => void;
|
28
|
+
lang?: 'zh' | 'en' | 'id';
|
28
29
|
}
|