mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
* [INJIMOB-1240] Resolve conflicts Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-1240] Refactor scan machine and QrLogin machine Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-1240] Refactor scan machine and QrLogin machine Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-1240] Refactor scan machine and QrLogin machine Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-1240]: Fix.Share with selfie pop up bug Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-1240]: Refactor. scanMachine and qrLoginMachine Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-1240]: Refactor. scanMachine and qrLoginMachine Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> --------- Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
97 lines
2.8 KiB
TypeScript
97 lines
2.8 KiB
TypeScript
import React, {useState} from 'react';
|
|
import {useTranslation} from 'react-i18next';
|
|
import {Dimensions, View} from 'react-native';
|
|
import {Overlay, CheckBox} from 'react-native-elements';
|
|
import {Button, Column, Text, Row} from '../../components/ui';
|
|
import {Theme} from '../../components/ui/styleUtils';
|
|
import {SvgImage} from '../../components/ui/svg';
|
|
// import CheckBox from 'expo-checkbox';
|
|
|
|
export const FaceVerificationAlertOverlay: React.FC<
|
|
FaceVerificationAlertProps
|
|
> = props => {
|
|
const {t} = useTranslation('ScanScreen');
|
|
|
|
const [isConsentGiven, setIsConsentGiven] = useState(false);
|
|
|
|
return (
|
|
<Overlay
|
|
isVisible={props.isVisible}
|
|
onBackdropPress={props.close}
|
|
overlayStyle={Theme.BindingVcWarningOverlay.overlay}>
|
|
<Column
|
|
align="space-between"
|
|
crossAlign="center"
|
|
padding={'10'}
|
|
width={Dimensions.get('screen').width * 0.8}
|
|
height={Dimensions.get('screen').height * 0}>
|
|
<Row align="center" crossAlign="center" margin={'30 0 20 0'}>
|
|
{SvgImage.ShareWithSelfie()}
|
|
</Row>
|
|
|
|
<Column crossAlign="center" margin="10 0 15 0" padding="0">
|
|
<Text
|
|
testID="shareWithSelfieAlert"
|
|
weight="bold"
|
|
size="large"
|
|
color="#000000"
|
|
style={{padding: 3}}>
|
|
{props.isQrLogin
|
|
? t('shareWithSelfieQrLogin')
|
|
: t('shareWithSelfie')}
|
|
</Text>
|
|
|
|
<Text
|
|
testID="shareWithSelfieConsentMsg"
|
|
align="center"
|
|
size="mediumSmall"
|
|
weight="regular"
|
|
margin="10 0 0 0"
|
|
color="#5D5D5D">
|
|
{props.isQrLogin
|
|
? t('shareWithSelfieMessageQrLogin')
|
|
: t('shareWithSelfieMessage')}
|
|
</Text>
|
|
</Column>
|
|
|
|
<Button
|
|
testID="iUnderstand"
|
|
margin={'10 0 0 0'}
|
|
type="gradient"
|
|
title={t('ConfirmButton')}
|
|
onPress={() => props.onConfirm(isConsentGiven)}
|
|
/>
|
|
|
|
<Row
|
|
style={{
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
marginLeft: -25,
|
|
marginTop: 5,
|
|
}}>
|
|
<CheckBox
|
|
checked={isConsentGiven}
|
|
checkedIcon={SvgImage.CheckedIcon()}
|
|
uncheckedIcon={SvgImage.UnCheckedIcon()}
|
|
onPress={() => setIsConsentGiven(!isConsentGiven)}
|
|
/>
|
|
<Text
|
|
testID="doNotAskMsg"
|
|
size="small"
|
|
weight="semibold"
|
|
style={{color: '#9B9B9B', alignSelf: 'center', marginLeft: -15}}>
|
|
{t('doNotAskMessage')}
|
|
</Text>
|
|
</Row>
|
|
</Column>
|
|
</Overlay>
|
|
);
|
|
};
|
|
|
|
interface FaceVerificationAlertProps {
|
|
isVisible: boolean;
|
|
onConfirm: (isDoNotAskAgainChecked: boolean) => void;
|
|
close: () => void;
|
|
isQrLogin?: boolean;
|
|
}
|