Skip to content

Commit

Permalink
Merge branch 'master' into IOAPPX-283-add-ioscrollview-next-iteration…
Browse files Browse the repository at this point in the history
…-of-gradientscroll
  • Loading branch information
dmnplb authored May 17, 2024
2 parents 918ab97 + 26db96b commit 763d43d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 56 deletions.
2 changes: 0 additions & 2 deletions locales/de/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,7 @@ authentication:
card5-title: "Willkommen in IO!"
card5-content: "Lass uns gemeinsam herausfinden, was du machen kannst"
card5-content-accessibility: "Wähle das vorherige Element, um einen Chat mit dem IO-Team zu beginnen, wenn etwas nicht so funktioniert, wie es sollte."
expiredCardTitle: "Karte abgelaufen oder nicht mehr gültig"
expiredCardHeaderTitle: "Anmeldung mit CIE"
expiredCardContent: "Die verwendete Karte ist nicht mehr gültig oder abgelaufen.\nWenn du dich anmelden und auf die IO zugreifen möchtest, musst du SPID verwenden."
expiredCardHelp: "Wie erneuert man seine elektronische Identitätskarte?"
cie:
genericTitle: "Anmeldung mit CIE"
Expand Down
4 changes: 2 additions & 2 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@ authentication:
card5-title: Welcome to IO!
card5-content: What can you do?
card5-content-accessibility: Select previous item to open a chat with the IO team if something is not working.
expiredCardTitle: Card expired or no longer valid
expiredCardTitle: The CIE verification failed
expiredCardHeaderTitle: Login with CIE
expiredCardContent: "The card used is no longer valid or has expired.\nIf you want to log in and access IO you must use SPID."
expiredCardContent: The card used is no longer valid or has expired. Use SPID to enter the app.
expiredCardHelp: How to renew your Electronic Identity Card?
cie:
genericTitle: Login with CIE
Expand Down
4 changes: 2 additions & 2 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@ authentication:
card5-title: Ti diamo il benvenuto su IO!
card5-content: Vediamo insieme cosa puoi fare
card5-content-accessibility: Seleziona elemento precedente per aprire una chat con il team di IO se qualcosa non funziona come dovrebbe.
expiredCardTitle: Carta scaduta o non più valida
expiredCardTitle: La verifica della CIE non è andata a buon fine
expiredCardHeaderTitle: Entra con CIE
expiredCardContent: "La carta utilizzata non è più valida oppure è scaduta.\nSe vuoi autenticarti ed accedere ad IO devi usare SPID."
expiredCardContent: La carta utilizzata potrebbe essere scaduta o non più valida. Prova ad usare SPID per entrare in app.
expiredCardHelp: Come rinnovare la propria Carta di Identità Elettronica?
cie:
genericTitle: Entra con CIE
Expand Down
10 changes: 5 additions & 5 deletions ts/navigation/AuthenticationNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ const AuthenticationStackNavigator = () => (
component={TestAuthenticationScreen}
/>

<Stack.Screen
name={ROUTES.CIE_EXPIRED_SCREEN}
component={CieExpiredOrInvalidScreen}
/>

<Stack.Screen
name={ROUTES.CIE_PIN_SCREEN}
component={CiePinScreen}
Expand Down Expand Up @@ -125,6 +120,11 @@ const AuthenticationStackNavigator = () => (
name={ROUTES.CIE_WRONG_PIN_SCREEN}
component={CieWrongCiePinScreen}
/>

<Stack.Screen
name={ROUTES.CIE_EXPIRED_SCREEN}
component={CieExpiredOrInvalidScreen}
/>
</Stack.Group>

<Stack.Group
Expand Down
66 changes: 21 additions & 45 deletions ts/screens/authentication/cie/CieExpiredOrInvalidScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,29 @@
import {
ContentWrapper,
FooterWithButtons,
VSpacer
} from "@pagopa/io-app-design-system";
import * as React from "react";
import { ScrollView } from "react-native";
import { Body } from "../../../components/core/typography/Body";
import { Link } from "../../../components/core/typography/Link";
import { ScreenContentHeader } from "../../../components/screens/ScreenContentHeader";
import TopScreenComponent from "../../../components/screens/TopScreenComponent";
import { openLink } from "../../../components/ui/Markdown/handlers/link";
import React, { useCallback } from "react";
import I18n from "../../../i18n";
import { resetToAuthenticationRoute } from "../../../store/actions/navigation";

const bookingUrl = I18n.t("cie.booking_url");
const browseToLink = () => openLink(bookingUrl);
import { OperationResultScreenContent } from "../../../components/screens/OperationResultScreenContent";
import { useIONavigation } from "../../../navigation/params/AppParamsList";
import ROUTES from "../../../navigation/routes";

const CieExpiredOrInvalidScreen = () => {
const handleGoBack = () => resetToAuthenticationRoute();
const navigation = useIONavigation();

const handleClose = useCallback(() => {
navigation.navigate(ROUTES.AUTHENTICATION, {
screen: ROUTES.AUTHENTICATION_LANDING
});
}, [navigation]);

return (
<TopScreenComponent
goBack={handleGoBack}
headerTitle={I18n.t("authentication.landing.expiredCardHeaderTitle")}
>
<ScreenContentHeader
title={I18n.t("authentication.landing.expiredCardTitle")}
/>
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
<ContentWrapper>
<Body>{I18n.t("authentication.landing.expiredCardContent")}</Body>
<VSpacer size={16} />
<Link onPress={browseToLink}>
{I18n.t("authentication.landing.expiredCardHelp")}
</Link>
</ContentWrapper>
</ScrollView>
<FooterWithButtons
type="SingleButton"
primary={{
type: "Outline",
buttonProps: {
label: I18n.t("global.buttons.cancel"),
accessibilityLabel: I18n.t("global.buttons.cancel"),
onPress: handleGoBack
}
}}
/>
</TopScreenComponent>
<OperationResultScreenContent
pictogram="attention"
title={I18n.t("authentication.landing.expiredCardTitle")}
subtitle={I18n.t("authentication.landing.expiredCardContent")}
action={{
label: I18n.t("global.buttons.close"),
accessibilityLabel: I18n.t("global.buttons.close"),
onPress: handleClose
}}
/>
);
};

Expand Down

0 comments on commit 763d43d

Please sign in to comment.