diff --git a/.env b/.env index 0615df933..cffb653fd 100644 --- a/.env +++ b/.env @@ -9,3 +9,6 @@ APPLICATION_THEME=orange #environment can be changed if it is toggled CREDENTIAL_REGISTRY_EDIT=true + +#supported languages( en, fil, ar, hi, kn, ta) +APPLICATION_LANGUAGE=en \ No newline at end of file diff --git a/.github/workflows/clear_artifacts.yml b/.github/workflows/clear_artifacts.yml index 0af8038ec..d880e16c8 100644 --- a/.github/workflows/clear_artifacts.yml +++ b/.github/workflows/clear_artifacts.yml @@ -1,4 +1,7 @@ name: 'Delete old artifacts' +on: + workflow_dispatch: +name: 'Delete old artifacts' on: workflow_dispatch: @@ -8,5 +11,5 @@ jobs: steps: - uses: kolpav/purge-artifacts-action@v1 with: - token: ${{ secrets. access_token }} + token: ${{ secrets.ACTION_PAT }} expire-in: 2days # Setting this to 0 will delete all artifacts \ No newline at end of file diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml index 85f04e2e5..2934dbe7b 100644 --- a/android/app/src/main/res/values/colors.xml +++ b/android/app/src/main/res/values/colors.xml @@ -1,6 +1,6 @@ - #ffffff + #F59B4B #FFFFFF #023c69 #ffffff diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 69e98b68e..ff10a980a 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -4,6 +4,6 @@ MOSIP Resident App - Mosip/Inji MOSIP Resident App - Newlogic MOSIP Resident App - PH - contain + cover false \ No newline at end of file diff --git a/app.config.ts b/app.config.ts index f2b8a0061..92da0424b 100644 --- a/app.config.ts +++ b/app.config.ts @@ -6,7 +6,7 @@ export default { icon: './assets/icon.png', splash: { image: './assets/splash.png', - resizeMode: 'contain', + resizeMode: 'cover', backgroundColor: '#ffffff', }, updates: { diff --git a/assets/Secure-Sharing.png b/assets/Secure-Sharing.png new file mode 100644 index 000000000..f635f8da4 Binary files /dev/null and b/assets/Secure-Sharing.png differ diff --git a/assets/Secure-Sharing2.png b/assets/Secure-Sharing2.png new file mode 100644 index 000000000..ae2d449d4 Binary files /dev/null and b/assets/Secure-Sharing2.png differ diff --git a/assets/biometric-unlock-icon.png b/assets/biometric-unlock-icon.png new file mode 100644 index 000000000..1a6f10771 Binary files /dev/null and b/assets/biometric-unlock-icon.png differ diff --git a/assets/digital-identity-icon.png b/assets/digital-identity-icon.png new file mode 100644 index 000000000..5a678a4df Binary files /dev/null and b/assets/digital-identity-icon.png differ diff --git a/assets/features-walkaround-icon.png b/assets/features-walkaround-icon.png new file mode 100644 index 000000000..b6a363102 Binary files /dev/null and b/assets/features-walkaround-icon.png differ diff --git a/assets/help-icon.png b/assets/help-icon.png new file mode 100644 index 000000000..3346d8fcc Binary files /dev/null and b/assets/help-icon.png differ diff --git a/assets/inji-home-logo.png b/assets/inji-home-logo.png new file mode 100644 index 000000000..f8c595958 Binary files /dev/null and b/assets/inji-home-logo.png differ diff --git a/assets/inji-logo-white.png b/assets/inji-logo-white.png new file mode 100644 index 000000000..85505a13e Binary files /dev/null and b/assets/inji-logo-white.png differ diff --git a/assets/inji_small_logo.png b/assets/inji_small_logo.png new file mode 100644 index 000000000..f70091869 Binary files /dev/null and b/assets/inji_small_logo.png differ diff --git a/assets/intro-scanner.png b/assets/intro-scanner.png new file mode 100644 index 000000000..fd8876e37 Binary files /dev/null and b/assets/intro-scanner.png differ diff --git a/assets/intro-wallet-binding.png b/assets/intro-wallet-binding.png new file mode 100644 index 000000000..fa59b5de1 Binary files /dev/null and b/assets/intro-wallet-binding.png differ diff --git a/assets/legal-notices-icon.png b/assets/legal-notices-icon.png new file mode 100644 index 000000000..69884e7c4 Binary files /dev/null and b/assets/legal-notices-icon.png differ diff --git a/assets/lock-icon.png b/assets/lock-icon.png new file mode 100644 index 000000000..147780f87 Binary files /dev/null and b/assets/lock-icon.png differ diff --git a/assets/magnifier-zoom.png b/assets/magnifier-zoom.png new file mode 100644 index 000000000..cbbc2153b Binary files /dev/null and b/assets/magnifier-zoom.png differ diff --git a/assets/otp-mobile-logo.png b/assets/otp-mobile-logo.png index 4e6eaa73d..8a8a4a521 100644 Binary files a/assets/otp-mobile-logo.png and b/assets/otp-mobile-logo.png differ diff --git a/assets/phone_mockup_1.png b/assets/phone_mockup_1.png new file mode 100644 index 000000000..5e52fdc80 Binary files /dev/null and b/assets/phone_mockup_1.png differ diff --git a/assets/progressing-logo.png b/assets/progressing-logo.png new file mode 100644 index 000000000..dc8d0b74c Binary files /dev/null and b/assets/progressing-logo.png differ diff --git a/assets/receive-card-icon.png b/assets/receive-card-icon.png new file mode 100644 index 000000000..b0db01a00 Binary files /dev/null and b/assets/receive-card-icon.png differ diff --git a/assets/received-cards-icon.png b/assets/received-cards-icon.png new file mode 100644 index 000000000..52afc034c Binary files /dev/null and b/assets/received-cards-icon.png differ diff --git a/assets/splash.png b/assets/splash.png index 48c75eb72..df0075df5 100644 Binary files a/assets/splash.png and b/assets/splash.png differ diff --git a/components/ActivityLogText.tsx b/components/ActivityLogText.tsx index 3ef069070..937873c86 100644 --- a/components/ActivityLogText.tsx +++ b/components/ActivityLogText.tsx @@ -14,6 +14,7 @@ export const ActivityLogText: React.FC<{ activity: ActivityLog }> = (props) => { ); }; diff --git a/components/DeviceInfoList.tsx b/components/DeviceInfoList.tsx index 30e5d9b55..1d131b5cc 100644 --- a/components/DeviceInfoList.tsx +++ b/components/DeviceInfoList.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { TextItem } from './ui/TextItem'; +import { Text } from './ui'; export const DeviceInfoList: React.FC = (props) => { const { t } = useTranslation('DeviceInfoList'); @@ -17,7 +17,6 @@ export const DeviceInfoList: React.FC = (props) => { }; interface DeviceInfoProps { - of: 'sender' | 'receiver'; deviceInfo: DeviceInfo; } diff --git a/components/EditableListItem.tsx b/components/EditableListItem.tsx index 75f71f1aa..bbf995fe7 100644 --- a/components/EditableListItem.tsx +++ b/components/EditableListItem.tsx @@ -18,24 +18,27 @@ export const EditableListItem: React.FC = (props) => { }, [props.credentialRegistryResponse]); return ( - setIsEditing(true)} - style={{ display: props.display }}> + setIsEditing(true)}> - {props.label} + + {props.label} + {props.value} - + void; display?: 'none' | 'flex'; credentialRegistryResponse: string; diff --git a/components/HelpScreen.tsx b/components/HelpScreen.tsx new file mode 100644 index 000000000..3b2b74ef6 --- /dev/null +++ b/components/HelpScreen.tsx @@ -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 = ( + props +) => { + const { t } = useTranslation('HelpScreen'); + + const [showHelpPage, setShowHelpPage] = useState(false); + + return ( + + { + setShowHelpPage(!showHelpPage); + }}> + {props.triggerComponent} + + { + setShowHelpPage(!showHelpPage); + }}> + + + + {t('whatIsDigitalCredential?')} + + {t('detail-1')} + + {t('whatCanDoWithDigitalCredential?')} + + {t('detail-2')} + + {t('howToAddCard?')} + + {t('detail-3')} + + {t('howToRemoveCardFromWallet?')} + + {t('detail-4')} + + {t('canWeAddMultipleCards?')} + + {t('detail-5')} + + {t('howToShareCard?')} + + {t('detail-6')} + + {t('howToActivateCardForOnlineLogin?')} + + {t('detail-7')} + + {t('howToViewActivity?')} + + {t('detail-8')} + + + + + ); +}; + +interface HelpScreenProps { + triggerComponent: React.ReactElement; +} diff --git a/components/KebabPopUp.tsx b/components/KebabPopUp.tsx new file mode 100644 index 000000000..12c7111b1 --- /dev/null +++ b/components/KebabPopUp.tsx @@ -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 = (props) => { + const controller = useKebabPopUp(props); + const { t } = useTranslation('HomeScreenKebabPopUp'); + return ( + + + + + {t('title')} + + + + + + + + + {props.vcKey.split(':')[4] == 'true' + ? t('unPinCard') + : t('pinCard')} + + + + + + + + + + + + + + controller.REMOVE(props.vcKey)}> + + {t('removeFromWallet')} + + + + + + + + + + + ); +}; + +export interface KebabPopUpProps { + iconName: string; + iconType?: string; + vcKey: string; + isVisible: boolean; + onDismiss: () => void; + service: ActorRefFrom; +} diff --git a/components/KebabPopUpController.tsx b/components/KebabPopUpController.tsx new file mode 100644 index 000000000..292415344 --- /dev/null +++ b/components/KebabPopUpController.tsx @@ -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; + 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), + }; +} diff --git a/components/MessageOverlay.tsx b/components/MessageOverlay.tsx index cb07cbed0..1b7aec303 100644 --- a/components/MessageOverlay.tsx +++ b/components/MessageOverlay.tsx @@ -14,14 +14,33 @@ export const MessageOverlay: React.FC = (props) => { overlayStyle={Theme.MessageOverlayStyles.overlay} onShow={props.onShow} onBackdropPress={props.onBackdropPress}> - - + + {props.title && ( - + {props.title} )} - {props.message && {props.message}} + {props.message && ( + + {props.message} + + )} {props.progress && } {props.hint && ( = (props) => { {!props.children && props.onCancel ? (