mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 21:48:04 -05:00
* fix(INJI-223): show the camera in scan screen while sharing the VC and click on scan icon Issue Link https://mosip.atlassian.net/browse/INJI-223 * chore: update pod deps' to match development team of 1st project * feat[#211]:[Pooja] fix turncated passcode and confirm password button * feat[#211]:[Pooja] fix truncated histroy title text in iOS * feat[#211]:[Pooja] fix multiple error being displayed when the vc binding fails * fix(INJI-223): disconnect the device while sharing the VC and click on tab icons except scan icon Issue Link https://mosip.atlassian.net/browse/INJI-223 * feat[#211]:[Pooja] fix download card button styles * version code for beta build in pipeline * feat[#211]:[Pooja] add error message when VC activation fails in kebab pop up * chore(INJI-216): bump up tuvali version to v0.4.3 * feat[#225]:[Pooja] fix about inji url in about page * refactor(INJI-223): get the scan string from route config to keep it consistent Issue Link https://mosip.atlassian.net/browse/INJI-223 * feat[mosip#211]:[Pooja] refactor onCancel Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> * feat(INJI-222): add popup for error in decryption * feat(INJI-222): wrap app init component & popups * feat(INJI-222): propagate event from _store to app state machine Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> * chore(INJI-222): move error msg text to errors obj * Implemented Receive Card & Received Cards options in Settings * Fixed all the locals * [Pooja] add quality gate check for critical open bugs in sonar --------- Co-authored-by: PuBHARGAVI <46226958+PuBHARGAVI@users.noreply.github.com> Co-authored-by: vijay151096 <94220135+vijay151096@users.noreply.github.com> Co-authored-by: Harsh Vardhan <harsh59v@gmail.com> Co-authored-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> Co-authored-by: adityankannan-tw <adityan.kannan@thoughtworks.com> Co-authored-by: Alka <prasadalka1998@gmail.com> Co-authored-by: anil_majji <majjianilkumar050@gmail.com> Co-authored-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
130 lines
4.0 KiB
TypeScript
130 lines
4.0 KiB
TypeScript
import React, { useEffect, useState } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import { Linking, Pressable, TouchableOpacity } from 'react-native';
|
|
import { Modal } from '../../components/ui/Modal';
|
|
import { Column, Row, Text } from '../../components/ui';
|
|
import { Theme } from '../../components/ui/styleUtils';
|
|
import { Icon, ListItem } from 'react-native-elements';
|
|
import getAllConfigurations from '../../shared/commonprops/commonProps';
|
|
import { getVersion } from 'react-native-device-info';
|
|
import { CopyButton } from '../../components/CopyButton';
|
|
|
|
export const AboutInji: React.FC<AboutInjiProps> = ({ appId }) => {
|
|
const { t } = useTranslation('AboutInji');
|
|
|
|
const [showAboutInji, setShowAboutInji] = useState(false);
|
|
const [aboutInjiUrl, setAboutInjiUrl] = useState('');
|
|
|
|
useEffect(() => {
|
|
getAllConfigurations().then((response) => {
|
|
setAboutInjiUrl(response.aboutInjiUrl);
|
|
});
|
|
}, []);
|
|
|
|
const dependencies = require('../../package-lock.json').dependencies;
|
|
let packageVersion, packageCommitId;
|
|
|
|
Object.keys(dependencies).forEach((dependencyName) => {
|
|
const dependencyData = dependencies[dependencyName];
|
|
|
|
if (dependencyName == 'react-native-tuvali') {
|
|
packageVersion = dependencyData.from
|
|
? dependencyData.from.split('#')[1]
|
|
: 'unknown';
|
|
if (packageVersion != 'unknown') {
|
|
packageCommitId = dependencyData.version.split('#')[1].substring(0, 7);
|
|
}
|
|
}
|
|
});
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<Pressable
|
|
onPress={() => {
|
|
setShowAboutInji(!showAboutInji);
|
|
}}>
|
|
<ListItem topDivider bottomDivider>
|
|
<Icon
|
|
type={'feather'}
|
|
name={'file'}
|
|
color={Theme.Colors.Icon}
|
|
size={25}
|
|
style={{ marginRight: 15 }}
|
|
/>
|
|
<ListItem.Content>
|
|
<ListItem.Title>
|
|
<Text weight="semibold" color={Theme.Colors.profileLabel}>
|
|
{t('aboutInji')}
|
|
</Text>
|
|
</ListItem.Title>
|
|
</ListItem.Content>
|
|
</ListItem>
|
|
</Pressable>
|
|
<Modal
|
|
isVisible={showAboutInji}
|
|
headerTitle={t('header')}
|
|
headerElevation={2}
|
|
headerRight={<Icon name={''} />}
|
|
onDismiss={() => {
|
|
setShowAboutInji(!showAboutInji);
|
|
}}>
|
|
<Row style={Theme.Styles.primaryRow}>
|
|
<Text style={Theme.TextStyles.semibold}>
|
|
{t('appID')} : {appId}
|
|
</Text>
|
|
<CopyButton content={appId} />
|
|
</Row>
|
|
<Column fill padding="12" align="space-between">
|
|
<Column>
|
|
<Text style={Theme.TextStyles.aboutDetailes}>
|
|
{t('aboutDetailes')}
|
|
</Text>
|
|
<Row crossAlign="center">
|
|
<Text style={Theme.TextStyles.aboutDetailes}>
|
|
{t('forMoreDetailes')}
|
|
</Text>
|
|
<TouchableOpacity
|
|
activeOpacity={1}
|
|
onPress={() => {
|
|
aboutInjiUrl && Linking.openURL(aboutInjiUrl);
|
|
}}>
|
|
<Text color={Theme.Colors.AddIdBtnBg} weight="bold">
|
|
{t('clickHere')}
|
|
</Text>
|
|
</TouchableOpacity>
|
|
</Row>
|
|
</Column>
|
|
|
|
<Column
|
|
pY={25}
|
|
align="space-between"
|
|
crossAlign="center"
|
|
style={Theme.Styles.versionContainer}>
|
|
<Text
|
|
style={Theme.TextStyles.bold}
|
|
color={Theme.Colors.aboutVersion}>
|
|
{t('version')}: {getVersion()}
|
|
</Text>
|
|
{packageVersion != 'unknown' && (
|
|
<Text
|
|
weight="semibold"
|
|
margin="32 0 5 0"
|
|
align="center"
|
|
size="small"
|
|
color={Theme.Colors.aboutVersion}>
|
|
{t('tuvaliVersion')}: {packageVersion + '-' + packageCommitId}
|
|
</Text>
|
|
)}
|
|
</Column>
|
|
</Column>
|
|
</Modal>
|
|
</React.Fragment>
|
|
);
|
|
};
|
|
|
|
interface AboutInjiProps {
|
|
isVisible?: boolean;
|
|
appId?: string;
|
|
}
|