mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
* [INJIMOB-3513] add sd jwt vp support Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3513] add bridge logic and sd-jwt signing for ovp Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3532] add: support of OVP share in iOS Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3532] add sd-jwt ovp ui Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3532] refactor: optimize wallet_metadata creation logic Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3532] refactor: fixed alignement issues and crash bug Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> --------- Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> Co-authored-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
92 lines
3.9 KiB
TypeScript
92 lines
3.9 KiB
TypeScript
import React from 'react';
|
|
import { Modal, View, Text, Image, ScrollView } from 'react-native';
|
|
import { Button } from './ui';
|
|
import { Theme } from './ui/styleUtils';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
export const TrustModal = ({
|
|
isVisible,
|
|
logo,
|
|
name,
|
|
onConfirm,
|
|
onCancel,
|
|
flowType = 'issuer',
|
|
}: {
|
|
isVisible: boolean;
|
|
logo: any;
|
|
name: string;
|
|
onConfirm: () => void;
|
|
onCancel: () => void;
|
|
flowType?: 'issuer' | 'verifier';
|
|
}) => {
|
|
const { t } = useTranslation('trustScreen');
|
|
return (
|
|
<Modal transparent={true} visible={isVisible} animationType="fade">
|
|
<View style={Theme.TrustIssuerScreenStyle.modalOverlay}>
|
|
<View style={Theme.TrustIssuerScreenStyle.modalContainer}>
|
|
{(logo || name) && (
|
|
<View style={Theme.TrustIssuerScreenStyle.issuerHeader}>
|
|
{logo && (
|
|
<Image
|
|
source={{ uri: logo }}
|
|
style={Theme.TrustIssuerScreenStyle.issuerLogo}
|
|
/>
|
|
)}
|
|
{name && (
|
|
<Text style={Theme.TrustIssuerScreenStyle.issuerName}>
|
|
{name}
|
|
</Text>
|
|
)}
|
|
</View>
|
|
)}
|
|
<ScrollView
|
|
style={{ flex: 1, width: '100%' }}
|
|
contentContainerStyle={{ alignItems: 'center', paddingBottom: 10 }}
|
|
showsVerticalScrollIndicator={true}>
|
|
<Text style={Theme.TrustIssuerScreenStyle.description}>
|
|
{t(flowType == 'issuer' ? 'description' : 'verifierDescription')}
|
|
</Text>
|
|
|
|
<View style={Theme.TrustIssuerScreenStyle.infoContainer}>
|
|
{t(flowType == 'issuer' ? 'infoPoints' : 'verifierInfoPoints', { returnObjects: true }).map((point, index) => (
|
|
<View key={index} style={Theme.TrustIssuerScreenStyle.infoItem}>
|
|
<Text style={Theme.TrustIssuerScreenStyle.info}>•</Text>
|
|
<Text style={Theme.TrustIssuerScreenStyle.infoText}>
|
|
{point}
|
|
</Text>
|
|
</View>
|
|
))}
|
|
</View>
|
|
</ScrollView>
|
|
|
|
<View style={{ width: '100%', paddingTop: 10, paddingBottom: 5 }}>
|
|
<Button
|
|
styles={{
|
|
marginBottom: 3,
|
|
minHeight: 50,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
}}
|
|
type="gradient"
|
|
title={t(flowType == 'issuer' ? 'confirm' : 'verifierConfirm')}
|
|
onPress={onConfirm}
|
|
/>
|
|
<Button
|
|
styles={{
|
|
marginBottom: -10,
|
|
paddingBottom: 20,
|
|
minHeight: 60,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
maxWidth: '100%',
|
|
}}
|
|
type="clear"
|
|
title={t('cancel')}
|
|
onPress={onCancel}
|
|
/>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</Modal>
|
|
);
|
|
}; |