diff --git a/locales/en/index.yml b/locales/en/index.yml index 74a738811df..4350aec6253 100644 --- a/locales/en/index.yml +++ b/locales/en/index.yml @@ -661,6 +661,7 @@ authentication: cardLocked: CIE card locked wrongPin1AttemptLeft: Wrong PIN, you still have 1 attempt wrongPin2AttemptLeft: Wrong PIN, you still have 2 attempts + genericError: Something went wrong! Please try again. error: readerCardLostTitle: Hold the card again for a few seconds readerCardLostTitleiOS: You removed the card too soon. diff --git a/locales/it/index.yml b/locales/it/index.yml index deacbeac280..9fd97bd041e 100644 --- a/locales/it/index.yml +++ b/locales/it/index.yml @@ -661,6 +661,7 @@ authentication: cardLocked: Carta CIE bloccata wrongPin1AttemptLeft: PIN errato, hai ancora 1 tentativo wrongPin2AttemptLeft: PIN errato, hai ancora 2 tentativi + genericError: Si รจ verificato un errore imprevisto. Riprova. error: readerCardLostTitle: Avvicina nuovamente la carta readerCardLostTitleiOS: Hai rimosso la carta troppo presto diff --git a/package.json b/package.json index 0da21aeb12d..f14d6e5bd21 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@pagopa/io-react-native-http-client": "^0.1.3", "@pagopa/io-react-native-login-utils": "^1.0.0", "@pagopa/io-react-native-zendesk": "^0.3.29", - "@pagopa/react-native-cie": "1.2.0", + "@pagopa/react-native-cie": "^1.2.1", "@pagopa/ts-commons": "^10.15.0", "@react-native-async-storage/async-storage": "^1.17.10", "@react-native-camera-roll/camera-roll": "5.6.1", diff --git a/ts/components/LoadingSpinnerOverlay.tsx b/ts/components/LoadingSpinnerOverlay.tsx index 22271727f72..962fc81f4e0 100644 --- a/ts/components/LoadingSpinnerOverlay.tsx +++ b/ts/components/LoadingSpinnerOverlay.tsx @@ -6,9 +6,6 @@ import { hexToRgba } from "@pagopa/io-app-design-system"; import I18n from "../i18n"; -import { useIOSelector } from "../store/hooks"; -import { isDesignSystemEnabledSelector } from "../store/reducers/persistedPreferences"; -import ButtonDefaultOpacity from "./ButtonDefaultOpacity"; import { Overlay } from "./ui/Overlay"; import { IOStyles } from "./core/variables/IOStyles"; import { Body } from "./core/typography/Body"; @@ -37,50 +34,37 @@ const LoadingSpinnerOverlay = ({ loadingCaption, loadingOpacity = 0.7, onCancel -}: Props) => { - const isDesignSystemEnabled = useIOSelector(isDesignSystemEnabledSelector); - return ( - - - {loadingCaption || I18n.t("global.remoteStates.wait")} - +}: Props) => ( + + + {loadingCaption || I18n.t("global.remoteStates.wait")} + + + } + action={ + onCancel && ( + + - } - action={ - onCancel && ( - - {isDesignSystemEnabled ? ( - - ) : ( - - {I18n.t("global.buttons.cancel")} - - )} - - ) - } - /> - ) - } - > - {children} - - ); -}; + ) + } + /> + ) + } + > + {children} + +); export default LoadingSpinnerOverlay; diff --git a/ts/screens/authentication/cie/CieCardReaderScreen.tsx b/ts/screens/authentication/cie/CieCardReaderScreen.tsx index 9f9995e9a5d..ce82cc19d0c 100644 --- a/ts/screens/authentication/cie/CieCardReaderScreen.tsx +++ b/ts/screens/authentication/cie/CieCardReaderScreen.tsx @@ -444,7 +444,8 @@ class CieCardReaderScreen extends React.PureComponent { ), wrongPin2AttemptLeft: I18n.t( "authentication.cie.card.iosAlert.wrongPin2AttemptLeft" - ) + ), + genericError: I18n.t("authentication.cie.card.iosAlert.genericError") }) .then(async () => { await cieManager.startListeningNFC(); diff --git a/yarn.lock b/yarn.lock index c1a57b98278..6257d4376e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3343,10 +3343,10 @@ write-yaml-file "^4.1.3" yargs "^15.0.1" -"@pagopa/react-native-cie@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@pagopa/react-native-cie/-/react-native-cie-1.2.0.tgz#7c664e810dfb4ea4e86c2a1a9e7c92ce481781a2" - integrity sha512-Dge9dKfsyqNvdc6cn/kEKoAGRQtvsVkO7zNz/oK/CgBGnw9V0h0A1PlogjvN1gsFpGMVuCOC3UiZocxMK95/0A== +"@pagopa/react-native-cie@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@pagopa/react-native-cie/-/react-native-cie-1.2.1.tgz#f38ca7c714c4943da839d232a4c076cc78f0d833" + integrity sha512-6v5DAzy5aTTBag+1idSyClTWRBhZ66kPoh5WXGxZsbKQQSolWhcTyl7pmWDeVG69UnkhIuy8ggXLGQnkrfOSOw== "@pagopa/ts-commons@^10.15.0": version "10.15.0"