mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 21:48:04 -05:00
* Revert "[INJIMOB-3622] Fix alignment in history screen (#2140)" This reverts commita0b08914e5. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Revert "Injimob [3622] [3627] - BANNER ISSUE AND BRANDING CHANGES ISSUES (#2130)" This reverts commit522104811c. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Revert "[INJIMOB-3633][INJIMOB-3636] fix icon bg color across app (#2134)" This reverts commitd8d718693d. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Revert "[INJIMOB-3633] fix search bar clear icon not apperaing (#2133)" This reverts commit6a202b11af. Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * Injimob-3651: revert all the old branding changes and add new changes #2150 Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> * [INJIMOB-3651]: Update all the test snapshots Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com> --------- Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>
157 lines
5.1 KiB
TypeScript
157 lines
5.1 KiB
TypeScript
import React, {useEffect, useState} from 'react';
|
|
import {useTranslation} from 'react-i18next';
|
|
import {
|
|
Dimensions,
|
|
Linking,
|
|
Pressable,
|
|
TouchableOpacity,
|
|
I18nManager,
|
|
View,
|
|
} from 'react-native';
|
|
import {Modal} from '../../components/ui/Modal';
|
|
import {Column, Row, Text} from '../../components/ui';
|
|
import {Theme} from '../../components/ui/styleUtils';
|
|
import {ListItem} from 'react-native-elements';
|
|
import getAllConfigurations from '../../shared/api';
|
|
import {CopyButton} from '../../components/CopyButton';
|
|
import testIDProps from '../../shared/commonUtil';
|
|
import {__InjiVersion} from '../../shared/GlobalVariables';
|
|
import {BannerNotificationContainer} from '../../components/BannerNotificationContainer';
|
|
import {SvgImage} from '../../components/ui/svg';
|
|
import LinearGradient from 'react-native-linear-gradient';
|
|
|
|
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);
|
|
});
|
|
}, []);
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<Pressable
|
|
onPress={() => {
|
|
setShowAboutInji(!showAboutInji);
|
|
}}>
|
|
<ListItem {...testIDProps('aboutInji')} topDivider bottomDivider>
|
|
{SvgImage.abotInjiIcon()}
|
|
<ListItem.Content>
|
|
<ListItem.Title
|
|
{...testIDProps('aboutInjiTitle')}
|
|
style={Theme.AboutInjiScreenStyle.titleStyle}>
|
|
<Text weight="semibold" color={Theme.Colors.settingsLabel}>
|
|
{t('aboutInji')}
|
|
</Text>
|
|
</ListItem.Title>
|
|
</ListItem.Content>
|
|
</ListItem>
|
|
</Pressable>
|
|
<Modal
|
|
testID="aboutInji"
|
|
isVisible={showAboutInji}
|
|
headerTitle={t('header')}
|
|
headerElevation={2}
|
|
arrowLeft={true}
|
|
onDismiss={() => {
|
|
setShowAboutInji(!showAboutInji);
|
|
}}>
|
|
<BannerNotificationContainer />
|
|
<LinearGradient
|
|
colors={Theme.Colors.GradientColorsLight}
|
|
start={Theme.LinearGradientDirection.start}
|
|
end={Theme.LinearGradientDirection.end}>
|
|
<Row
|
|
testID="appID"
|
|
crossAlign="flex-start"
|
|
style={Theme.Styles.primaryRow}>
|
|
<Row>
|
|
<Text
|
|
weight="semibold"
|
|
style={Theme.AboutInjiScreenStyle.appIdTitleStyle}>
|
|
{t('appID')}
|
|
</Text>
|
|
<Text
|
|
weight="semibold"
|
|
style={Theme.AboutInjiScreenStyle.appIdTextStyle}>
|
|
{I18nManager.isRTL ? appId : ' : ' + appId}
|
|
</Text>
|
|
</Row>
|
|
<CopyButton content={appId} />
|
|
</Row>
|
|
</LinearGradient>
|
|
<Column
|
|
align="space-between"
|
|
style={Theme.AboutInjiScreenStyle.containerStyle}>
|
|
<Column>
|
|
<Text
|
|
testID="aboutDetails"
|
|
style={Theme.AboutInjiScreenStyle.aboutDetailstextStyle}>
|
|
{t('aboutDetails')}
|
|
</Text>
|
|
<Row
|
|
align="space-between"
|
|
crossAlign="center"
|
|
style={Theme.AboutInjiScreenStyle.innerContainerStyle}>
|
|
<Text style={Theme.AboutInjiScreenStyle.moreDetailstextStyle}>
|
|
{t('forMoreDetails')}
|
|
</Text>
|
|
<TouchableOpacity
|
|
activeOpacity={1}
|
|
onPress={() => {
|
|
aboutInjiUrl && Linking.openURL(aboutInjiUrl);
|
|
}}>
|
|
<Text
|
|
testID="clickHere"
|
|
color={Theme.Colors.AddIdBtnBg}
|
|
style={Theme.AboutInjiScreenStyle.clickHereTextStyle}
|
|
weight="bold">
|
|
{t('clickHere')}
|
|
</Text>
|
|
</TouchableOpacity>
|
|
</Row>
|
|
</Column>
|
|
|
|
<Column
|
|
pY={25}
|
|
align="space-between"
|
|
crossAlign="center"
|
|
style={Theme.Styles.versionContainer}>
|
|
<Row style={Theme.AboutInjiScreenStyle.injiVersionContainerStyle}>
|
|
<Text
|
|
testID="tuvaliVersion"
|
|
weight="semibold"
|
|
style={Theme.AboutInjiScreenStyle.injiVersionTitle}
|
|
color={Theme.Colors.aboutVersion}>
|
|
{t('version') + ' : '}
|
|
</Text>
|
|
<Text
|
|
weight="semibold"
|
|
style={Theme.AboutInjiScreenStyle.injiVersionText}
|
|
color={Theme.Colors.aboutVersion}>
|
|
{__InjiVersion.getValue()}
|
|
</Text>
|
|
</Row>
|
|
<View style={Theme.AboutInjiScreenStyle.horizontalLineStyle} />
|
|
<Text
|
|
weight="semibold"
|
|
style={Theme.AboutInjiScreenStyle.poweredByTextStyle}
|
|
color="black">
|
|
{t('poweredBy')}
|
|
</Text>
|
|
</Column>
|
|
</Column>
|
|
</Modal>
|
|
</React.Fragment>
|
|
);
|
|
};
|
|
|
|
interface AboutInjiProps {
|
|
isVisible?: boolean;
|
|
appId?: string;
|
|
}
|