mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
* refactor(INJI-569): changing png to svg images from setup to home screen Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * Refactor(INJI-569): changing png to svg images settings screen Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * [INJI-569] changing png to svg image Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569]: Adjusted all the alignment in settings screen Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * [INJI-569] fix SuccessLogo size and and alignment Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] refactor theme files and removing unused QrLoginWarning component Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] changing the naming convention of svg images Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] fix Typo mistake and remove unused imports Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569] fix Typo mistake, misssing imports and remove unused elements Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> * [INJI-569]: Adjusted all the alignment of icons with tag name in settings screen Signed-off-by: anil_majji <majjianilkumar050@gmail.com> * [INJI-569] renaming the files Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> --------- Signed-off-by: Sri Kanth Kola <srikanthsri7447@gmail.com> Signed-off-by: anil_majji <majjianilkumar050@gmail.com> Co-authored-by: anil_majji <majjianilkumar050@gmail.com>
85 lines
2.5 KiB
TypeScript
85 lines
2.5 KiB
TypeScript
import React from 'react';
|
|
import {useTranslation} from 'react-i18next';
|
|
import {MessageOverlay} from '../components/MessageOverlay';
|
|
import {Button, Column, Text} from '../components/ui';
|
|
import {Theme} from '../components/ui/styleUtils';
|
|
import {RootRouteProps} from '../routes';
|
|
import {useAuthScreen} from './AuthScreenController';
|
|
import {
|
|
getStartEventData,
|
|
getInteractEventData,
|
|
sendInteractEvent,
|
|
sendStartEvent,
|
|
} from '../shared/telemetry/TelemetryUtils';
|
|
import {TelemetryConstants} from '../shared/telemetry/TelemetryConstants';
|
|
import {Icon} from 'react-native-elements';
|
|
|
|
export const AuthScreen: React.FC<RootRouteProps> = props => {
|
|
const {t} = useTranslation('AuthScreen');
|
|
const controller = useAuthScreen(props);
|
|
|
|
const handleUsePasscodeButtonPress = () => {
|
|
sendStartEvent(
|
|
getStartEventData(TelemetryConstants.FlowType.appOnboarding),
|
|
);
|
|
sendInteractEvent(
|
|
getInteractEventData(
|
|
TelemetryConstants.FlowType.appOnboarding,
|
|
TelemetryConstants.InteractEventSubtype.click,
|
|
'Use Passcode Button',
|
|
),
|
|
);
|
|
controller.usePasscode();
|
|
};
|
|
return (
|
|
<Column
|
|
fill
|
|
padding={[32, 25, 32, 32]}
|
|
backgroundColor={Theme.Colors.whiteBackgroundColor}
|
|
align="space-between">
|
|
<MessageOverlay
|
|
isVisible={controller.alertMsg != ''}
|
|
onBackdropPress={controller.hideAlert}
|
|
title={controller.alertMsg}
|
|
/>
|
|
<Column crossAlign="center">
|
|
<Icon name="fingerprint" size={80} color={Theme.Colors.Icon} />
|
|
<Column margin="30 0 0 0">
|
|
<Text
|
|
testID="selectAppUnlockMethod"
|
|
style={{paddingTop: 3}}
|
|
align="center"
|
|
style={Theme.TextStyles.header}>
|
|
{t('header')}
|
|
</Text>
|
|
<Text
|
|
align="center"
|
|
style={{paddingTop: 3}}
|
|
weight="semibold"
|
|
color={Theme.Colors.GrayText}
|
|
margin="6 0">
|
|
{t('Description')}
|
|
</Text>
|
|
</Column>
|
|
</Column>
|
|
|
|
<Column>
|
|
<Button
|
|
testID="useBiometrics"
|
|
title={t('useBiometrics')}
|
|
type="gradient"
|
|
margin="0 0 8 0"
|
|
disabled={!controller.isBiometricsAvailable}
|
|
onPress={controller.useBiometrics}
|
|
/>
|
|
<Button
|
|
testID="usePasscode"
|
|
type="clear"
|
|
title={t('usePasscode')}
|
|
onPress={() => handleUsePasscodeButtonPress()}
|
|
/>
|
|
</Column>
|
|
</Column>
|
|
);
|
|
};
|