@antscorp/antsomi-ui 2.0.102 → 2.0.103

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.
@@ -18,18 +18,9 @@ export const BasicLogin = props => {
18
18
  const selectedNetworkRef = useRef(null);
19
19
  const authenInfoRef = useRef(null);
20
20
  const loginRef = useRef(null);
21
- const errorCodeSend = get(loginData, 'errorCode', '');
22
- const retryAfter = get(loginData, 'retryAfter');
23
21
  const setAuthenInfo = (info) => (authenInfoRef.current = info);
24
22
  const handleLoginSuccess = (data = null) => {
25
- if (data && data.isCheckG2FA && data.G2FA_user === 0) {
26
- setLoginData(data);
27
- if (isFunction(onLoginSuccess)) {
28
- onLoginSuccess(data);
29
- }
30
- setStep(STEPS.STEP_CHOOSE_METHOD);
31
- }
32
- else if (data && data.G2FA === 1) {
23
+ if (data && data.isCheckG2FA && data.G2FA === 1) {
33
24
  setLoginData(data);
34
25
  if (isFunction(onLoginSuccess)) {
35
26
  onLoginSuccess(data);
@@ -17,7 +17,7 @@ export const AuthenticateResult = props => {
17
17
  backLogin();
18
18
  }
19
19
  };
20
- return (_jsx(WidgetLayout, { header: null, isShowLogo: false, title: _jsx("div", { style: { marginBottom: 100 } }), gapContent: 100, content: _jsx(Flex, { vertical: true, gap: 50, style: { marginTop: 20 }, children: _jsxs(Flex, { vertical: true, gap: 20, align: "center", children: [_jsx("img", { src: authenSuccessImg, alt: "" }), _jsx(Title, { isMobile: isMobile, children: "Authenticated!" }), _jsxs(Text, { isMobile: isMobile, children: ["Sign in in as ", get(loginData, 'personal.full_name')] })] }) }), footer: _jsx(Flex, { justify: "center", children: _jsx(Button, { type: "text", onClick: handleBack, style: {
20
+ return (_jsx(WidgetLayout, { header: null, isShowLogo: false, title: _jsx("div", { style: { marginBottom: 100 } }), gapContent: 40, content: _jsx(Flex, { vertical: true, gap: 50, style: { marginTop: 20 }, children: _jsxs(Flex, { vertical: true, gap: 20, align: "center", children: [_jsx("img", { src: authenSuccessImg, alt: "" }), _jsx(Title, { isMobile: isMobile, children: "Authenticated!" }), _jsxs(Text, { isMobile: isMobile, children: ["Sign in as ", get(loginData, 'personal.full_name')] })] }) }), footer: _jsx(Flex, { justify: "center", children: _jsx(Button, { type: "text", onClick: handleBack, style: {
21
21
  fontSize: isMobile ? '16px' : '14px',
22
22
  }, children: "Sign in with a different account" }) }) }));
23
23
  };
@@ -5,9 +5,9 @@ export const LoginMain = styled(Flex) `
5
5
  max-height: 100%;
6
6
 
7
7
  width: 400px;
8
+ min-width: 400px;
8
9
 
9
10
  overflow: hidden;
10
- border-radius: 10px;
11
11
  border-right: 1px solid #e5e5e5;
12
12
  `;
13
13
  export const WrapperLogin = styled(Flex) `
@@ -175,11 +175,7 @@ export const Login = props => {
175
175
  if (data && data.isCheckSkip) {
176
176
  setLoadingSkip(true);
177
177
  }
178
- if (data && data.isCheckG2FA && data.G2FA_user === 0) {
179
- setLoginData(data);
180
- setStep(STEPS.STEP_CHOOSE_METHOD);
181
- }
182
- else if (data && data.G2FA === 1) {
178
+ if (data && data.isCheckG2FA && data.G2FA === 1) {
183
179
  setLoginData(data);
184
180
  setStep(STEPS.STEP_CHOOSE_METHOD);
185
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "2.0.102",
3
+ "version": "2.0.103",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",