Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into inji-499
Browse files Browse the repository at this point in the history
  • Loading branch information
swatigoel committed Oct 23, 2023
2 parents 64d9f3c + 4e64313 commit 56022a0
Show file tree
Hide file tree
Showing 34 changed files with 795 additions and 418 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ jobs:
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
APPLICATION_THEME: ${{ github.event.inputs.theme }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ github.event.inputs.internal-testers }}
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ github.event.inputs.buildDescription }}

Expand Down
11 changes: 8 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
fileignoreconfig:
- filename: package.json
checksum: 30e3a548809705ba38385a1c286b312629ac5dd7dea0d6e26ffb9daf8def312d
- filename: package-lock.json
checksum: a4c1fe2521067e1a279610f079446c600e8b7d5cf1553934dc419c3c476b4844
- filename: components/PasscodeVerify.tsx
Expand Down Expand Up @@ -52,4 +50,11 @@ fileignoreconfig:
- filename: machines/store.ts
checksum: 0695d833df9ec1e1f6ae2bd81631630bb1039dec387718acb153bcb843c952cd
- filename: shared/cryptoutil/cryptoUtil.ts
checksum: b785ff3f01ab9530119072c4d38195048bfeee6155c54ea7dd031559acb722f3
checksum: b785ff3f01ab9530119072c4d38195048bfeee6155c54ea7dd031559acb722f3
- filename: package.json
checksum: 1a9d02d94424c1266503d58038cae2318ab71261ab50cf930c5f98e07c0f3ccd
- filename: machines/store.typegen.ts
checksum: 6d22bc5c77398316b943c512c208ce0846a9fff674c1ccac79e07f21962acd5f
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.typegen.ts
checksum: 10889302ca05646a283386be1bbe7a5fb510c02bb62a308ee45f3c2a872ae64e
version: ""
1 change: 0 additions & 1 deletion components/VC/MosipVCItem/MosipVCItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const MosipVCItem: React.FC<
vcMetadata={props.vcMetadata}
verifiableCredential={verifiableCredential}
emptyWalletBindingId={emptyWalletBindingId}
onPress={() => props.onPress(service)}
showOnlyBindedVc={props.showOnlyBindedVc}
/>
<View style={Theme.Styles.verticalLine} />
Expand Down
7 changes: 0 additions & 7 deletions components/VC/MosipVCItem/MosipVCItemActivationStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react';
import {useTranslation} from 'react-i18next';
import {Dimensions} from 'react-native';
import {Icon} from 'react-native-elements';
import {ActorRefFrom} from 'xstate';
import {ExistingMosipVCItemMachine} from '../../../machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine';
import {VerifiableCredential} from '../../../types/VC/ExistingMosipVC/vc';
import {Row, Text} from '../../ui';
import {Theme} from '../../ui/styleUtils';
Expand Down Expand Up @@ -108,13 +106,11 @@ export const MosipVCItemActivationStatus: React.FC<
{props.emptyWalletBindingId ? (
<WalletUnverifiedActivationDetails
verifiableCredential={props.verifiableCredential}
onPress={props.onPress}
/>
) : (
<WalletVerifiedActivationDetails
verifiableCredential={props.verifiableCredential}
showOnlyBindedVc={props.showOnlyBindedVc}
onPress={props.onPress}
/>
)}
</Row>
Expand All @@ -123,18 +119,15 @@ export const MosipVCItemActivationStatus: React.FC<

interface ExistingMosipVCItemActivationStatusProps {
showOnlyBindedVc: boolean;
onPress: (vcRef?: ActorRefFrom<typeof ExistingMosipVCItemMachine>) => void;
verifiableCredential: VerifiableCredential;
emptyWalletBindingId: boolean;
}

interface WalletVerifiedDetailsProps {
showOnlyBindedVc: boolean;
onPress: (vcRef?: ActorRefFrom<typeof ExistingMosipVCItemMachine>) => void;
verifiableCredential: VerifiableCredential;
}

interface WalletUnVerifiedDetailsProps {
onPress: (vcRef?: ActorRefFrom<typeof ExistingMosipVCItemMachine>) => void;
verifiableCredential: VerifiableCredential;
}
10 changes: 3 additions & 7 deletions components/VC/MosipVCItem/MosipVCItemContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import VerifiedIcon from '../../VerifiedIcon';
import {Column, Row, Text} from '../../ui';
import {Theme} from '../../ui/styleUtils';
import {CheckBox, Icon} from 'react-native-elements';
import testIDProps from '../../../shared/commonUtil';
import testIDProps, {getMaskedText} from '../../../shared/commonUtil';
import {logoType} from '../../../machines/issuersMachine';

const getDetails = (arg1, arg2, verifiableCredential) => {
Expand Down Expand Up @@ -84,10 +84,6 @@ const getDetails = (arg1, arg2, verifiableCredential) => {
}
};

function getIdNumber(id: string) {
return '*'.repeat(id.length - 4) + id.slice(-4);
}

const getIssuerLogo = (isOpenId4VCI: boolean, issuerLogo: logoType) => {
if (isOpenId4VCI) {
return (
Expand Down Expand Up @@ -243,7 +239,7 @@ export const MosipVCItemContent: React.FC<
weight="semibold"
size="extraSmall"
color={Theme.Colors.statusLabel}>
{getIdNumber(uin)}
{getMaskedText(uin)}
</Text>
</Column>
) : null}
Expand All @@ -262,7 +258,7 @@ export const MosipVCItemContent: React.FC<
weight="semibold"
size="extraSmall"
color={Theme.Colors.Details}>
{getIdNumber(vid)}
{getMaskedText(vid)}
</Text>
</Column>
) : null}
Expand Down
18 changes: 13 additions & 5 deletions components/ui/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import React, {Fragment} from 'react';
import React, {Fragment, useEffect} from 'react';
import {useTranslation} from 'react-i18next';
import {Image, SafeAreaView, View} from 'react-native';
import {BackHandler, Image, SafeAreaView, View} from 'react-native';
import Spinner from 'react-native-spinkit';
import {Button, Centered, Column, Row, Text} from '../../components/ui';
import {Theme} from '../../components/ui/styleUtils';
import {Theme} from './styleUtils';
import testIDProps from '../../shared/commonUtil';

export const Loader: React.FC<LoaderProps> = props => {
const {t} = useTranslation('ScanScreen');

useEffect(() => {
const backHandler = BackHandler.addEventListener(
'hardwareBackPress',
() => true,
);
return () => backHandler.remove();
}, []);

return (
<Fragment>
<Row style={{backgroundColor: Theme.Colors.whiteBackgroundColor}}>
Expand All @@ -17,7 +25,7 @@ export const Loader: React.FC<LoaderProps> = props => {
fill
align={'flex-start'}
style={Theme.LoaderStyles.titleContainer}>
<View style={Theme.issuersScreenStyles.loaderHeadingText}>
<View style={Theme.LoaderStyles.heading}>
<Text
style={Theme.TextStyles.semiBoldHeader}
testID="loaderTitle">
Expand Down Expand Up @@ -81,7 +89,7 @@ export const Loader: React.FC<LoaderProps> = props => {

export interface LoaderProps {
isVisible: boolean;
title?: string;
title: string;
subTitle?: string;
label?: string;
hint?: string;
Expand Down
30 changes: 23 additions & 7 deletions components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import {Dimensions, Platform, StyleSheet, ViewStyle} from 'react-native';
import {Dimensions, StyleSheet, ViewStyle} from 'react-native';
import {Spacing} from '../styleUtils';
import {isIOS} from '../../../shared/constants';

Expand Down Expand Up @@ -524,19 +524,33 @@ export const DefaultTheme = {
borderBottomColor: Colors.platinumGrey,
borderBottomWidth: 1.3,
},
downloadFabIcon: {
downloadFabIconContainer: {
height: 70,
width: 70,
borderRadius: 200,
padding: 10,
backgroundColor: Colors.Orange,
shadowColor: '#000',
shadowOpacity: 0.4,
elevation: 5,
position: 'absolute',
bottom: Dimensions.get('window').width * 0.1,
right: Dimensions.get('window').width * 0.1,
},
downloadFabIconNormal: {
borderRadius: 200,
height: 70,
width: 70,
justifyContent: 'center',
position: 'absolute',
},
downloadFabIconPressed: {
borderRadius: 200,
height: 70,
width: 70,
backgroundColor: Colors.Orange,
justifyContent: 'center',
position: 'absolute',
},
boxShadow: generateBoxShadowStyle(),
}),
QrCodeStyles: StyleSheet.create({
Expand Down Expand Up @@ -730,6 +744,10 @@ export const DefaultTheme = {
marginBottom: 17,
marginTop: 22,
},
heading: {
flex: 1,
flexDirection: 'column',
},
}),
ButtonStyles: StyleSheet.create({
fill: {
Expand Down Expand Up @@ -1175,13 +1193,15 @@ export const DefaultTheme = {
lineHeight: 17,
paddingHorizontal: 3,
paddingBottom: 4,
paddingTop: 1.7,
},
issuerDescription: {
fontSize: 11,
lineHeight: 14,
color: Colors.ShadeOfGrey,
paddingVertical: 5,
paddingHorizontal: 3,
paddingTop: 1.4,
},
issuerIcon: {
resizeMode: 'contain',
Expand All @@ -1191,10 +1211,6 @@ export const DefaultTheme = {
marginTop: 8,
marginLeft: 2.5,
},
loaderHeadingText: {
flex: 1,
flexDirection: 'column',
},
}),
ErrorStyles: StyleSheet.create({
image: {marginTop: -60, paddingBottom: 26},
Expand Down
30 changes: 23 additions & 7 deletions components/ui/themes/PurpleTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import {Dimensions, Platform, StyleSheet, ViewStyle} from 'react-native';
import {Dimensions, StyleSheet, ViewStyle} from 'react-native';
import {Spacing} from '../styleUtils';
import {isIOS} from '../../../shared/constants';

Expand Down Expand Up @@ -526,19 +526,33 @@ export const PurpleTheme = {
borderBottomColor: Colors.platinumGrey,
borderBottomWidth: 1.3,
},
downloadFabIcon: {
downloadFabIconContainer: {
height: 70,
width: 70,
borderRadius: 200,
padding: 10,
backgroundColor: Colors.Purple,
shadowColor: '#000',
shadowOpacity: 0.4,
elevation: 5,
position: 'absolute',
bottom: Dimensions.get('window').width * 0.1,
right: Dimensions.get('window').width * 0.1,
},
downloadFabIconNormal: {
borderRadius: 200,
height: 70,
width: 70,
justifyContent: 'center',
position: 'absolute',
},
downloadFabIconPressed: {
borderRadius: 200,
height: 70,
width: 70,
backgroundColor: Colors.Purple,
justifyContent: 'center',
position: 'absolute',
},
boxShadow: generateBoxShadowStyle(),
}),
QrCodeStyles: StyleSheet.create({
Expand Down Expand Up @@ -732,6 +746,10 @@ export const PurpleTheme = {
marginBottom: 17,
marginTop: 22,
},
heading: {
flex: 1,
flexDirection: 'column',
},
}),
ButtonStyles: StyleSheet.create({
fill: {
Expand Down Expand Up @@ -1175,11 +1193,13 @@ export const PurpleTheme = {
fontFamily: 'Inter_600SemiBold',
fontSize: 14,
lineHeight: 17,
paddingTop: 1.7,
},
issuerDescription: {
fontSize: 11,
lineHeight: 14,
color: Colors.ShadeOfGrey,
paddingTop: 1.4,
},
issuerIcon: {
resizeMode: 'contain',
Expand All @@ -1189,10 +1209,6 @@ export const PurpleTheme = {
marginTop: 8,
marginLeft: 2.5,
},
loaderHeadingText: {
flex: 1,
flexDirection: 'column',
},
}),
ErrorStyles: StyleSheet.create({
image: {marginTop: -60, paddingBottom: 26},
Expand Down
2 changes: 1 addition & 1 deletion ios/Inji.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -557,4 +557,4 @@
/* End XCConfigurationList section */
};
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
}
}
10 changes: 6 additions & 4 deletions locales/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,15 @@
},
"IssuersScreen": {
"title": "أضف بطاقة جديدة",
"header": "يرجى تحديد الطريقة المفضلة من الأسفل لإضافة بطاقة جديدة",
"header": "يرجى اختيار جهة الإصدار المفضلة لديك من الخيارات أدناه لإضافة بطاقة جديدة.",
"itemHeading": "التنزيل عبر {{issuer}}",
"itemSubHeading": "أدخل رقم الهوية الوطنية الخاص بك لتنزيل بطاقتك.",
"loaders": {
"loading": "جار التحميل...",
"subTitle": {
"displayIssuers": "Fetching Issuers",
"settingUp": "Setting up",
"downloadingCredentials": "Downloading Credentials",
"displayIssuers": "جلب جهات الإصدار",
"settingUp": "اعداد",
"downloadingCredentials": "تنزيل بيانات الاعتماد"
}
},
"errors":{
Expand Down
8 changes: 2 additions & 6 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,9 @@
},
"IssuersScreen": {
"title": "Add new card",
"header": "Please select a preferred method from below to add a new card",
"header": "Please choose your preferred issuer from the options below to add a new card.",
"itemHeading": "Download via {{issuer}}",
"itemSubHeading": "Enter the mentioned ID and get your card",
"modal": {
"title": "In Progress",
"hint": "downloading your credential from issuer"
},
"itemSubHeading": "Enter your national ID to download your card.",
"loaders": {
"loading": "Loading...",
"subTitle": {
Expand Down
10 changes: 6 additions & 4 deletions locales/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@
},
"IssuersScreen": {
"title": "Magdagdag ng bagong card",
"header": "Mangyaring pumili ng gustong paraan mula sa ibaba upang magdagdag ng bagong card",
"header": "Mangyaring piliin ang iyong gustong tagabigay mula sa mga opsyon sa ibaba upang magdagdag ng bagong card.",
"itemHeading": "I-download sa pamamagitan ng {{issuer}}",
"itemSubHeading": "Ilagay ang iyong national ID para i-download ang iyong card.",
"loaders": {
"loading": "Naglo-load...",
"subTitle": {
"displayIssuers": "Fetching Issuers",
"settingUp": "Setting up",
"downloadingCredentials": "Downloading Credentials",
"displayIssuers": "Kinukuha ang mga Isyu",
"settingUp": "Inaayos",
"downloadingCredentials": "Nagda-download ng Mga Kredensyal"
}
},
"errors": {
Expand Down
5 changes: 3 additions & 2 deletions locales/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@
},
"IssuersScreen": {
"title": "नया कार्ड जोड़ें",
"header": "नया कार्ड जोड़ने के लिए कृपया नीचे से कोई पसंदीदा विधि चुनें",

"header": "नया कार्ड जोड़ने के लिए कृपया नीचे दिए गए विकल्पों में से अपना पसंदीदा जारीकर्ता चुनें।",
"itemHeading": "{{issuer}} के माध्यम से डाउनलोड करें",
"itemSubHeading": "अपना कार्ड डाउनलोड करने के लिए अपनी राष्ट्रीय आईडी दर्ज करें।",
"loaders": {
"loading": "लोड हो रहा है...",
"subTitle": {
Expand Down
Loading

0 comments on commit 56022a0

Please sign in to comment.