-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #750 from Anil-kumar-Majji/ui-revamp-release
INJI new UI/UX release
- Loading branch information
Showing
127 changed files
with
6,619 additions
and
1,899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React, { useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Pressable } from 'react-native'; | ||
import { Modal } from './ui/Modal'; | ||
import { ScrollView } from 'react-native-gesture-handler'; | ||
import { MainRouteProps } from '../routes/main'; | ||
import { Column, Text } from './ui'; | ||
import { Theme } from './ui/styleUtils'; | ||
|
||
export const HelpScreen: React.FC<HelpScreenProps & MainRouteProps> = ( | ||
props | ||
) => { | ||
const { t } = useTranslation('HelpScreen'); | ||
|
||
const [showHelpPage, setShowHelpPage] = useState(false); | ||
|
||
return ( | ||
<React.Fragment> | ||
<Pressable | ||
onPress={() => { | ||
setShowHelpPage(!showHelpPage); | ||
}}> | ||
{props.triggerComponent} | ||
</Pressable> | ||
<Modal | ||
isVisible={showHelpPage} | ||
headerTitle={t('header')} | ||
headerElevation={2} | ||
onDismiss={() => { | ||
setShowHelpPage(!showHelpPage); | ||
}}> | ||
<ScrollView> | ||
<Column fill padding="10" align="space-between"> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('whatIsDigitalCredential?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-1')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('whatCanDoWithDigitalCredential?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-2')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('howToAddCard?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-3')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('howToRemoveCardFromWallet?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-4')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('canWeAddMultipleCards?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-5')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('howToShareCard?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-6')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('howToActivateCardForOnlineLogin?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-7')}</Text> | ||
<Text margin="7" style={Theme.TextStyles.header}> | ||
{t('howToViewActivity?')} | ||
</Text> | ||
<Text style={Theme.TextStyles.helpDetailes}>{t('detail-8')}</Text> | ||
</Column> | ||
</ScrollView> | ||
</Modal> | ||
</React.Fragment> | ||
); | ||
}; | ||
|
||
interface HelpScreenProps { | ||
triggerComponent: React.ReactElement; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import React from 'react'; | ||
import { BottomSheet, Icon, ListItem } from 'react-native-elements'; | ||
import { Theme } from '../components/ui/styleUtils'; | ||
import { Centered, Column, Row, Text } from '../components/ui'; | ||
import { WalletBinding } from '../screens/Home/MyVcs/WalletBinding'; | ||
import { Pressable } from 'react-native'; | ||
import { useKebabPopUp } from './KebabPopUpController'; | ||
import { ActorRefFrom } from 'xstate'; | ||
import { vcItemMachine } from '../machines/vcItem'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { HistoryTab } from '../screens/Home/MyVcs/HistoryTab'; | ||
import { RemoveVcWarningOverlay } from '../screens/Home/MyVcs/RemoveVcWarningOverlay'; | ||
|
||
export const KebabPopUp: React.FC<KebabPopUpProps> = (props) => { | ||
const controller = useKebabPopUp(props); | ||
const { t } = useTranslation('HomeScreenKebabPopUp'); | ||
return ( | ||
<Column> | ||
<Icon | ||
name={props.iconName} | ||
type={props.iconType} | ||
color={Theme.Colors.GrayIcon} | ||
/> | ||
<BottomSheet | ||
isVisible={props.isVisible} | ||
containerStyle={Theme.KebabPopUpStyles.kebabPopUp}> | ||
<Row style={Theme.KebabPopUpStyles.kebabHeaderStyle}> | ||
<Text weight="bold">{t('title')}</Text> | ||
<Icon | ||
name="close" | ||
onPress={props.onDismiss} | ||
color={Theme.Colors.Details} | ||
size={25} | ||
/> | ||
</Row> | ||
<Column> | ||
<ListItem bottomDivider> | ||
<ListItem.Content> | ||
<ListItem.Title> | ||
<Pressable onPress={controller.PIN_CARD}> | ||
<Text size="small" weight="bold"> | ||
{props.vcKey.split(':')[4] == 'true' | ||
? t('unPinCard') | ||
: t('pinCard')} | ||
</Text> | ||
</Pressable> | ||
</ListItem.Title> | ||
</ListItem.Content> | ||
</ListItem> | ||
|
||
<WalletBinding | ||
label={t('offlineAuthenticationDisabled!')} | ||
content={t('offlineAuthDisabledMessage')} | ||
service={props.service} | ||
/> | ||
|
||
<HistoryTab | ||
service={props.service} | ||
label={t('viewActivityLog')} | ||
vcKey={props.vcKey} | ||
/> | ||
|
||
<ListItem bottomDivider> | ||
<ListItem.Content> | ||
<ListItem.Title> | ||
<Pressable onPress={() => controller.REMOVE(props.vcKey)}> | ||
<Text size="small" weight="bold"> | ||
{t('removeFromWallet')} | ||
</Text> | ||
</Pressable> | ||
</ListItem.Title> | ||
</ListItem.Content> | ||
</ListItem> | ||
|
||
<RemoveVcWarningOverlay | ||
isVisible={controller.isRemoveWalletWarning} | ||
onConfirm={controller.CONFIRM} | ||
onCancel={controller.CANCEL} | ||
/> | ||
</Column> | ||
</BottomSheet> | ||
</Column> | ||
); | ||
}; | ||
|
||
export interface KebabPopUpProps { | ||
iconName: string; | ||
iconType?: string; | ||
vcKey: string; | ||
isVisible: boolean; | ||
onDismiss: () => void; | ||
service: ActorRefFrom<typeof vcItemMachine>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { useSelector } from '@xstate/react'; | ||
import { ActorRefFrom } from 'xstate'; | ||
import { | ||
selectKebabPopUpWalletBindingInProgress, | ||
selectKebabPopUp, | ||
selectKebabPopUpAcceptingBindingOtp, | ||
selectKebabPopUpBindingWarning, | ||
selectRemoveWalletWarning, | ||
selectEmptyWalletBindingId, | ||
selectIsPinned, | ||
selectOtpError, | ||
selectShowWalletBindingError, | ||
selectWalletBindingError, | ||
VcItemEvents, | ||
vcItemMachine, | ||
selectShowActivities, | ||
} from '../machines/vcItem'; | ||
import { selectActivities } from '../machines/activityLog'; | ||
import { GlobalContext } from '../shared/GlobalContext'; | ||
import { useContext } from 'react'; | ||
|
||
export function useKebabPopUp(props) { | ||
const service = props.service as ActorRefFrom<typeof vcItemMachine>; | ||
const PIN_CARD = () => service.send(VcItemEvents.PIN_CARD()); | ||
const KEBAB_POPUP = () => service.send(VcItemEvents.KEBAB_POPUP()); | ||
const ADD_WALLET_BINDING_ID = () => | ||
service.send(VcItemEvents.ADD_WALLET_BINDING_ID()); | ||
const CONFIRM = () => service.send(VcItemEvents.CONFIRM()); | ||
const REMOVE = (vcKey: string) => service.send(VcItemEvents.REMOVE(vcKey)); | ||
const DISMISS = () => service.send(VcItemEvents.DISMISS()); | ||
const CANCEL = () => service.send(VcItemEvents.CANCEL()); | ||
const SHOW_ACTIVITY = () => service.send(VcItemEvents.SHOW_ACTIVITY()); | ||
const INPUT_OTP = (otp: string) => service.send(VcItemEvents.INPUT_OTP(otp)); | ||
const isPinned = useSelector(service, selectIsPinned); | ||
const isBindingWarning = useSelector(service, selectKebabPopUpBindingWarning); | ||
const isRemoveWalletWarning = useSelector(service, selectRemoveWalletWarning); | ||
const isAcceptingOtpInput = useSelector( | ||
service, | ||
selectKebabPopUpAcceptingBindingOtp | ||
); | ||
const isWalletBindingError = useSelector( | ||
service, | ||
selectShowWalletBindingError | ||
); | ||
const otpError = useSelector(service, selectOtpError); | ||
const walletBindingError = useSelector(service, selectWalletBindingError); | ||
const WalletBindingInProgress = useSelector( | ||
service, | ||
selectKebabPopUpWalletBindingInProgress | ||
); | ||
const emptyWalletBindingId = useSelector(service, selectEmptyWalletBindingId); | ||
const isKebabPopUp = useSelector(service, selectKebabPopUp); | ||
const isShowActivities = useSelector(service, selectShowActivities); | ||
const { appService } = useContext(GlobalContext); | ||
const activityLogService = appService.children.get('activityLog'); | ||
|
||
return { | ||
isPinned, | ||
PIN_CARD, | ||
KEBAB_POPUP, | ||
ADD_WALLET_BINDING_ID, | ||
CONFIRM, | ||
DISMISS, | ||
REMOVE, | ||
CANCEL, | ||
INPUT_OTP, | ||
SHOW_ACTIVITY, | ||
isBindingWarning, | ||
isAcceptingOtpInput, | ||
isWalletBindingError, | ||
walletBindingError, | ||
otpError, | ||
WalletBindingInProgress, | ||
emptyWalletBindingId, | ||
isKebabPopUp, | ||
isShowActivities, | ||
isRemoveWalletWarning, | ||
activities: useSelector(activityLogService, selectActivities), | ||
}; | ||
} |
Oops, something went wrong.