@bytexbyte/berifyme-react-sdk 1.0.6 → 1.0.8
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.
|
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
import React from "react";
|
|
49
49
|
import AuthIDComponent from "@authid/react-component";
|
|
50
|
-
import { Box, CircularProgress, Stack, Typography } from "@mui/material";
|
|
50
|
+
import { Box, CircularProgress, IconButton, Stack, Typography } from "@mui/material";
|
|
51
51
|
import { useEffect, useRef, useState } from "react";
|
|
52
52
|
import berifymeApi, { ActionType } from "../../../api/api";
|
|
53
53
|
import { useSpeedTest } from "../../speedTest/SpeedProvider";
|
|
@@ -55,6 +55,7 @@ import { createAuthenticationLog, updateAuthenticationLog } from "../../Authenti
|
|
|
55
55
|
import { createDeveloperLog } from "../../createDeveloperLog";
|
|
56
56
|
import AuthIdSelectType from "./authIdSelectType";
|
|
57
57
|
import theme from "../../../theme";
|
|
58
|
+
import CloseIcon from "@mui/icons-material/Close";
|
|
58
59
|
var AuthID = function (_a) {
|
|
59
60
|
var goToAllSet = _a.goToAllSet, setError = _a.setError, userId = _a.userId, setUser = _a.setUser, selectedIdType = _a.selectedIdType, setSelectedIdType = _a.setSelectedIdType, token = _a.token, setPageStatus = _a.setPageStatus;
|
|
60
61
|
var _b = useState(''), operationId = _b[0], setOperationId = _b[1];
|
|
@@ -326,6 +327,10 @@ var AuthID = function (_a) {
|
|
|
326
327
|
useEffect(function () {
|
|
327
328
|
console.log('error count: ', docErrorCount.current);
|
|
328
329
|
}, [docErrorCount.current]);
|
|
330
|
+
var handleClose = function () {
|
|
331
|
+
docErrorCount.current = 0;
|
|
332
|
+
setShowIdOrPassport(false);
|
|
333
|
+
};
|
|
329
334
|
return (React.createElement(React.Fragment, null,
|
|
330
335
|
url ?
|
|
331
336
|
React.createElement(AuthIDComponent, { url: url, webauth: true })
|
|
@@ -345,8 +350,19 @@ var AuthID = function (_a) {
|
|
|
345
350
|
background: '#fff', textAlign: 'center',
|
|
346
351
|
padding: '16px', zIndex: 1000, // 确保覆盖其他内容
|
|
347
352
|
} },
|
|
348
|
-
React.createElement(Stack, { spacing: 3, height: 1, justifyContent:
|
|
349
|
-
React.createElement(
|
|
353
|
+
React.createElement(Stack, { spacing: 3, height: 1, justifyContent: "center" },
|
|
354
|
+
React.createElement(Box, { sx: {
|
|
355
|
+
display: 'flex',
|
|
356
|
+
justifyContent: 'center', // 讓內容(包括文字和按鈕)水平居中
|
|
357
|
+
alignItems: 'center', // 讓文字垂直居中
|
|
358
|
+
position: 'relative', // 讓右側的 X 按鈕能絕對定位
|
|
359
|
+
} },
|
|
360
|
+
React.createElement(Typography, { variant: "body1", sx: { fontWeight: 'bold' }, color: theme.palette.text.secondary }, "Having trouble?"),
|
|
361
|
+
React.createElement(IconButton, { sx: {
|
|
362
|
+
position: 'absolute', // 將 X 按鈕放在右側
|
|
363
|
+
right: 0,
|
|
364
|
+
}, onClick: handleClose },
|
|
365
|
+
React.createElement(CloseIcon, null))),
|
|
350
366
|
React.createElement(AuthIdSelectType, { setSelectedIdType: setSelectedIdType, setError: setError, setPageStatus: setPageStatus })))));
|
|
351
367
|
};
|
|
352
368
|
export default AuthID;
|
|
@@ -48,6 +48,7 @@ import { createDeveloperLog } from '../createDeveloperLog';
|
|
|
48
48
|
import Footer from '../Footer';
|
|
49
49
|
import { processPhoneNumber } from '../phoneNumberProcesser';
|
|
50
50
|
import webauthn from '../../lib/webauthb';
|
|
51
|
+
import LegalLinks from './legalLinks';
|
|
51
52
|
var SendSns = function (_a) {
|
|
52
53
|
var token = _a.token, inputValue = _a.inputValue, setInputValue = _a.setInputValue, setError = _a.setError, setPageStatus = _a.setPageStatus, setProcessedPhoneNumber = _a.setProcessedPhoneNumber, setModalHeight = _a.setModalHeight, setUser = _a.setUser, environment = _a.environment;
|
|
53
54
|
var _b = useState(true), isValid = _b[0], setIsValid = _b[1];
|
|
@@ -330,7 +331,7 @@ var SendSns = function (_a) {
|
|
|
330
331
|
React.createElement(PhoneInput, { country: 'us', value: inputValue, onChange: handleChange, containerStyle: { width: '100%', height: '50px', border: 'none' }, inputStyle: { width: '100%', height: '50px', fontSize: '18px', borderRadius: '12px', backgroundColor: '#F0F0F0' }, buttonStyle: { borderRadius: '12px 0 0 12px', backgroundColor: '#F0F0F0' }, countryCodeEditable: false }),
|
|
331
332
|
React.createElement(Stack, null,
|
|
332
333
|
React.createElement(Typography, { variant: 'body2', color: theme.palette.error.main, alignSelf: 'end' }, errorMessage),
|
|
333
|
-
React.createElement(
|
|
334
|
+
React.createElement(LegalLinks, null)))),
|
|
334
335
|
React.createElement(Stack, { direction: 'row', pb: 4 },
|
|
335
336
|
React.createElement(Box, null,
|
|
336
337
|
React.createElement(Button, { fullWidth: true, variant: 'contained', size: 'large', sx: { minWidth: 170, borderRadius: 4 }, type: "submit", disabled: (!inputValue || loading) }, loading ?
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Typography } from '@mui/material';
|
|
3
|
+
import theme from "../theme";
|
|
4
|
+
var LegalLinks = function () {
|
|
5
|
+
return (React.createElement(React.Fragment, null,
|
|
6
|
+
React.createElement(Typography, { variant: 'body2', color: theme.palette.info.light },
|
|
7
|
+
"By continuing you agree to Berify's",
|
|
8
|
+
' ',
|
|
9
|
+
React.createElement("a", { href: "https://berify.me/terms-conditions/", target: "_blank", rel: "noopener noreferrer", style: { textDecoration: 'underline', color: theme.palette.info.light } }, "Terms & Conditions"),
|
|
10
|
+
' ',
|
|
11
|
+
"and",
|
|
12
|
+
' ',
|
|
13
|
+
React.createElement("a", { href: "https://berify.me/privacy-policy/", target: "_blank", rel: "noopener noreferrer", style: { textDecoration: 'underline', color: theme.palette.info.light } }, "Privacy Policy"),
|
|
14
|
+
".")));
|
|
15
|
+
};
|
|
16
|
+
export default LegalLinks;
|