diff --git a/locales/en/index.yml b/locales/en/index.yml index 6e442b71645..5c1ac6f91fe 100644 --- a/locales/en/index.yml +++ b/locales/en/index.yml @@ -3444,10 +3444,10 @@ features: credentialPreviewScreen: title: "Here's a preview of your credential" subtitle: "Before adding it, check if the data is correct." - somethingWrong: - title: "Something wrong?" - subtitle: "If there are errors in the data or you want to better understand what they mean, contact {{issuer}}." - action: "Ask for help" + banner: + title: "Something doesn't add up?" + content: "If you want to delve deeper into some data or report errors, contact support." + actionTitle: "Contact support" bottomSheet: about: title: "Who is it?" diff --git a/locales/it/index.yml b/locales/it/index.yml index 70b90f24837..29d68f3b0b4 100644 --- a/locales/it/index.yml +++ b/locales/it/index.yml @@ -3469,11 +3469,10 @@ features: title: "Ecco un’anteprima della tua tessera" subtitle: "Prima di aggiungerla, verifica che tutte le informazioni siano corrette." - somethingWrong: + banner: title: "Qualcosa non torna?" - subtitle: "Se ci sono errori nei dati o vuoi capire meglio cosa significano, - contatta {{issuer}}." - action: "Contatta l'assistenza" + content: "Se ci sono errori nei dati o vuoi capire meglio cosa significano, contatta l’assistenza." + actionTitle: "Contatta l'assistenza" bottomSheet: about: title: "Chi è?" diff --git a/ts/features/it-wallet/navigation/ItwParamsList.ts b/ts/features/it-wallet/navigation/ItwParamsList.ts index 00e8790f6db..e2a2b0ba73d 100644 --- a/ts/features/it-wallet/navigation/ItwParamsList.ts +++ b/ts/features/it-wallet/navigation/ItwParamsList.ts @@ -1,3 +1,4 @@ +import { ItwCredentialDetailsScreenNavigationParams } from "../screens/credential/ItwCredentialDetailsScreen"; import { ItwPidRequestScreenNavigationParams } from "../screens/issuing/ItwPidRequestScreen"; import { ItwCieCardReaderScreenNavigationParams } from "../screens/issuing/cie/ItwCieCardReaderScreen"; import { ItwCieConsentDataUsageScreenNavigationParams } from "../screens/issuing/cie/ItwCieConsentDataUsageScreen"; @@ -39,6 +40,9 @@ export type ItwParamsList = { [ITW_ROUTES.CREDENTIAL.ISSUING.CHECKS]: undefined; [ITW_ROUTES.CREDENTIAL.ISSUING.AUTH]: undefined; [ITW_ROUTES.CREDENTIAL.ISSUING.PREVIEW]: undefined; + // CREDENTIALS PRESENTATION + [ITW_ROUTES.CREDENTIAL.PRESENTATION + .CREDENTIAL_DETAILS]: ItwCredentialDetailsScreenNavigationParams; // GENERIC [ITW_ROUTES.GENERIC.NOT_AVAILABLE]: undefined; }; diff --git a/ts/features/it-wallet/navigation/ItwRoutes.ts b/ts/features/it-wallet/navigation/ItwRoutes.ts index c4eb4bccf24..13245b04db3 100644 --- a/ts/features/it-wallet/navigation/ItwRoutes.ts +++ b/ts/features/it-wallet/navigation/ItwRoutes.ts @@ -34,6 +34,9 @@ export const ITW_ROUTES = { CHECKS: "ITW_CREDENTIAL_ISSUING_CHECKS", AUTH: "ITW_CREDENTIAL_ISSUING_AUTH", PREVIEW: "ITW_CREDENTIAL_ISSUING_PREVIEW" + } as const, + PRESENTATION: { + CREDENTIAL_DETAILS: "ITW_CREDENTIAL_PRESENTATION_DETAILS" } as const } as const, GENERIC: { diff --git a/ts/features/it-wallet/navigation/ItwStackNavigator.tsx b/ts/features/it-wallet/navigation/ItwStackNavigator.tsx index 11d6fb508a9..694899a2cdb 100644 --- a/ts/features/it-wallet/navigation/ItwStackNavigator.tsx +++ b/ts/features/it-wallet/navigation/ItwStackNavigator.tsx @@ -23,6 +23,7 @@ import ItwPresentationDataScreen from "../screens/presentation/crossdevice/new/I import ItwPresentationResultScreen from "../screens/presentation/crossdevice/new/ItwPresentationResultScreen"; import ItwCredentialsChecksScreen from "../screens/credential/issuing/ItwCredentialChecksScreen"; import ItwCredentialCatalogScreen from "../screens/credential/issuing/ItwCredentialsCatalogScreen"; +import ItwCredentialDetailsScreen from "../screens/credential/ItwCredentialDetailsScreen"; import { ItwParamsList } from "./ItwParamsList"; import { ITW_ROUTES } from "./ItwRoutes"; @@ -123,6 +124,11 @@ export const ItwStackNavigator = () => ( name={ITW_ROUTES.CREDENTIAL.ISSUING.PREVIEW} component={ItwCredentialPreviewScreen} /> + {/* CREDENTIAL PRESENTATION */} + {/* COMMON */} { .map((credential, idx) => ( + navigation.navigate(ITW_ROUTES.MAIN, { + screen: ITW_ROUTES.CREDENTIAL.PRESENTATION.CREDENTIAL_DETAILS, + params: { + credential + } + }) + } key={`${credential.displayData.title}-${idx}`} > ; + +/** + * Renders a preview screen which displays a visual representation and the claims contained in the credential. + */ +const ItwCredentialDetailsScreen = () => { + const route = useRoute(); + const { credential } = route.params; + const bannerViewRef = React.createRef(); + + /** + * Content view which asks the user to confirm the issuance of the credential. + * @param data - the issuance result data of the credential used to display the credential. + */ + const ContentView = ({ data }: { data: StoredCredential }) => { + const presentationButton: BlockButtonProps = { + type: "Solid", + buttonProps: { + label: I18n.t( + "features.itWallet.presentation.credentialDetails.buttons.qrCode" + ), + accessibilityLabel: I18n.t( + "features.itWallet.presentation.credentialDetails.buttons.qrCode" + ), + onPress: () => null + } + }; + + return ( + + + + + + + + + + + + + + ); + }; + + return ; +}; + +export default ItwCredentialDetailsScreen; diff --git a/ts/features/it-wallet/screens/credential/issuing/ItwCredentialPreviewScreen.tsx b/ts/features/it-wallet/screens/credential/issuing/ItwCredentialPreviewScreen.tsx index 6a699847877..0ced1390efc 100644 --- a/ts/features/it-wallet/screens/credential/issuing/ItwCredentialPreviewScreen.tsx +++ b/ts/features/it-wallet/screens/credential/issuing/ItwCredentialPreviewScreen.tsx @@ -152,17 +152,17 @@ const ItwCredentialPreviewScreen = () => { color={"neutral"} size="big" title={I18n.t( - "features.itWallet.issuing.credentialPreviewScreen.somethingWrong.title" + "features.itWallet.issuing.credentialPreviewScreen.banner.title" )} content={I18n.t( - "features.itWallet.issuing.credentialPreviewScreen.somethingWrong.subtitle", + "features.itWallet.issuing.credentialPreviewScreen.banner.content", { issuer: data.issuerName } )} pictogramName={"security"} action={I18n.t( - "features.itWallet.issuing.credentialPreviewScreen.somethingWrong.action" + "features.itWallet.issuing.credentialPreviewScreen.banner.actionTitle" )} onPress={present} />