mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
[INJIMOB-691] show restore success / failure toaster in all screen
Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
This commit is contained in:
@@ -152,5 +152,5 @@ fileignoreconfig:
|
||||
- filename: machines/backupAndRestore/backupAndRestore.ts
|
||||
checksum: e86fd9e6e3b244e348432cf03e812f3e85082fd1c0743a76e1083eab6ba0e322
|
||||
- filename: machines/backupAndRestore/backupAndRestore.typegen.ts
|
||||
checksum: a04f9256d0981c1c6843fe1bfb64b5b22a6ad6a1efc08cd4a11fcb6bdfbe9ddb
|
||||
checksum: 9aac693297af25ab6f6b6677e0e2e488f228ff1232ac91ccd259917b223a7b18
|
||||
version: ""
|
||||
|
||||
@@ -3,9 +3,12 @@ import {useBackupScreen} from '../screens/backupAndRestore/BackupController';
|
||||
import {BannerNotification} from './BannerNotification';
|
||||
import {Theme} from './ui/styleUtils';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {useBackupRestoreScreen} from '../screens/Settings/BackupRestoreController';
|
||||
|
||||
export const BackupAndRestoreAllScreenBanner: React.FC = () => {
|
||||
const backUpController = useBackupScreen();
|
||||
const restoreController = useBackupRestoreScreen();
|
||||
|
||||
const {t} = useTranslation('BackupAndRestoreBanner');
|
||||
|
||||
function backupFailure() {
|
||||
@@ -23,6 +26,23 @@ export const BackupAndRestoreAllScreenBanner: React.FC = () => {
|
||||
);
|
||||
}
|
||||
|
||||
function restoreFailure() {
|
||||
const translation = t(
|
||||
`restoreFailure.${
|
||||
restoreController.restoreErrorReason || 'technicalError'
|
||||
}`,
|
||||
);
|
||||
|
||||
return (
|
||||
<BannerNotification
|
||||
message={translation}
|
||||
onClosePress={restoreController.DISMISS}
|
||||
testId={`restoreFailure-${backUpController.backupErrorReason}`}
|
||||
customStyle={Theme.Styles.dataBackupFailure}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{backUpController.isBackingUpSuccess && (
|
||||
@@ -35,6 +55,16 @@ export const BackupAndRestoreAllScreenBanner: React.FC = () => {
|
||||
)}
|
||||
|
||||
{backUpController.isBackingUpFailure && backupFailure()}
|
||||
|
||||
{restoreController.isBackUpRestoreSuccess && (
|
||||
<BannerNotification
|
||||
message={t('restoreSuccessful')}
|
||||
onClosePress={restoreController.DISMISS}
|
||||
testId={'restoreBackupSuccess'}
|
||||
customStyle={Theme.Styles.dataBackupSuccess}
|
||||
/>
|
||||
)}
|
||||
{restoreController.isBackUpRestoreFailure && restoreFailure()}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -599,6 +599,11 @@
|
||||
"networkError": "بسبب <الاتصال غير المستقر>، لم نتمكن من إجراء النسخ الاحتياطي للبيانات. الرجاء معاودة المحاولة في وقت لاحق.",
|
||||
"technicalError": "بسبب خطأ فني، لم نتمكن من إجراء النسخ الاحتياطي للبيانات. الرجاء معاودة المحاولة في وقت لاحق.",
|
||||
"noDataForBackup": "عذرًا، ولكن لا توجد بيانات متاحة لإجراء نسخ احتياطي في الوقت الحالي."
|
||||
},
|
||||
"restoreSuccessful": "تمت عملية الاستعادة بنجاح!",
|
||||
"restoreFailure": {
|
||||
"networkError": "بسبب الاتصال غير المستقر، لم نتمكن من استعادة البيانات. الرجاء معاودة المحاولة في وقت لاحق.",
|
||||
"technicalError": "بسبب خطأ فني، لم نتمكن من استعادة البيانات. الرجاء معاودة المحاولة في وقت لاحق."
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -603,6 +603,11 @@
|
||||
"networkError": "Due to Unstable Connection, we were unable to perform data backup. Please try again later.",
|
||||
"technicalError": "Due to Technical Error, we were unable to perform data backup. Please try again later.",
|
||||
"noDataForBackup": "We're sorry, but there is no data available to back up at the moment."
|
||||
},
|
||||
"restoreSuccessful": "Your restore was successful!",
|
||||
"restoreFailure": {
|
||||
"networkError": "Due to Unstable Connection, we were unable to restore data. Please try again later.",
|
||||
"technicalError": "Due to Technical Error, we were unable to restore the data. Please try again later."
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -602,6 +602,11 @@
|
||||
"networkError": "Dahil sa Hindi Matatag na Koneksyon, hindi namin nagawang isagawa ang pag-backup ng data. Pakisubukang muli sa ibang pagkakataon.",
|
||||
"technicalError": "Dahil sa Technical Error, hindi namin nagawang magsagawa ng pag-backup ng data. Subukang muli mamaya.",
|
||||
"noDataForBackup": "Ikinalulungkot namin, ngunit walang data na magagamit upang i-back up sa ngayon."
|
||||
},
|
||||
"restoreSuccessful": "Ang iyong pag-restore ay matagumpay!",
|
||||
"restoreFailure": {
|
||||
"networkError": "Dahil sa Hindi Matatag na Koneksyon, hindi namin naibalik ang data. Subukang muli mamaya.",
|
||||
"technicalError": "Dahil sa Technical Error, hindi namin naibalik ang data. Subukang muli mamaya."
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -599,6 +599,11 @@
|
||||
"networkError": "अस्थिर कनेक्शन के कारण, हम डेटा बैकअप करने में असमर्थ थे। कृपया बाद में पुनः प्रयास करें।",
|
||||
"technicalError": "तकनीकी त्रुटि के कारण, हम डेटा बैकअप करने में असमर्थ थे। कृपया बाद में पुन: प्रयास करें।",
|
||||
"noDataForBackup": "हमें खेद है, लेकिन इस समय बैकअप के लिए कोई डेटा उपलब्ध नहीं है।"
|
||||
},
|
||||
"restoreSuccessful": "आपका पुनर्स्थापना सफल रहा!",
|
||||
"restoreFailure": {
|
||||
"networkError": "अस्थिर कनेक्शन के कारण, हम डेटा पुनर्स्थापित करने में असमर्थ थे। कृपया बाद में पुन: प्रयास करें।",
|
||||
"technicalError": "तकनीकी त्रुटि के कारण, हम डेटा को पुनर्स्थापित करने में असमर्थ थे। कृपया बाद में पुन: प्रयास करें।"
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -591,6 +591,11 @@
|
||||
"networkError": "ಅಸ್ಥಿರ ಸಂಪರ್ಕ ಕಾರಣ, ನಮಗೆ ಡೇಟಾ ಬ್ಯಾಕಪ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.",
|
||||
"technicalError": "ತಾಂತ್ರಿಕ ದೋಷದಿಂದಾಗಿ, ಡೇಟಾ ಬ್ಯಾಕಪ್ ಮಾಡಲು ನಮಗೆ ಸಾಧ್ಯವಾಗಲಿಲ್ಲ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.",
|
||||
"noDataForBackup": "ನಮ್ಮನ್ನು ಕ್ಷಮಿಸಿ, ಆದರೆ ಸದ್ಯಕ್ಕೆ ಬ್ಯಾಕಪ್ ಮಾಡಲು ಯಾವುದೇ ಡೇಟಾ ಲಭ್ಯವಿಲ್ಲ."
|
||||
},
|
||||
"restoreSuccessful": "ನಿಮ್ಮ ಮರುಸ್ಥಾಪನೆ ಯಶಸ್ವಿಯಾಗಿದೆ!",
|
||||
"restoreFailure": {
|
||||
"networkError": "ಅಸ್ಥಿರ ಸಂಪರ್ಕದ ಕಾರಣ, ನಮಗೆ ಡೇಟಾವನ್ನು ಮರುಸ್ಥಾಪಿಸಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ.",
|
||||
"technicalError": "ತಾಂತ್ರಿಕ ದೋಷದಿಂದಾಗಿ, ಡೇಟಾವನ್ನು ಮರುಸ್ಥಾಪಿಸಲು ನಮಗೆ ಸಾಧ್ಯವಾಗಲಿಲ್ಲ. ದಯವಿಟ್ಟು ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -597,6 +597,11 @@
|
||||
"networkError": "Debido a Conexión inestable, no pudimos realizar la copia de seguridad de los datos. Vuelve a intentarlo más tarde.",
|
||||
"technicalError": "Debido a un error técnico, no pudimos realizar una copia de seguridad de los datos. Por favor, inténtelo de nuevo más tarde.",
|
||||
"noDataForBackup": "Lo sentimos, pero no hay datos disponibles para realizar una copia de seguridad en este momento."
|
||||
},
|
||||
"restoreSuccessful": "¡Tu restauración fue exitosa!",
|
||||
"restoreFailure": {
|
||||
"networkError": "Debido a una conexión inestable, no pudimos restaurar los datos. Por favor, inténtelo de nuevo más tarde.",
|
||||
"technicalError": "Debido a un error técnico, no pudimos restaurar los datos. Por favor, inténtelo de nuevo más tarde."
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -597,6 +597,11 @@
|
||||
"networkError": "நிலையற்ற இணைப்பு காரணமாக, தரவு காப்புப்பிரதியை எங்களால் செய்ய முடியவில்லை. பிறகு முயற்சிக்கவும்.",
|
||||
"technicalError": "தொழில்நுட்பப் பிழை காரணமாக, தரவு காப்புப் பிரதி எடுக்க முடியவில்லை. பிறகு முயற்சிக்கவும்.",
|
||||
"noDataForBackup": "மன்னிக்கவும், தற்போது காப்புப் பிரதி எடுக்க தரவு எதுவும் இல்லை."
|
||||
},
|
||||
"restoreSuccessful": "உங்கள் மீட்டெடுப்பு வெற்றிகரமாக இருந்தது!",
|
||||
"restoreFailure": {
|
||||
"networkError": "நிலையற்ற இணைப்பு காரணமாக, எங்களால் தரவை மீட்டெடுக்க முடியவில்லை. பிறகு முயற்சிக்கவும்.",
|
||||
"technicalError": "தொழில்நுட்பப் பிழை காரணமாக, தரவை மீட்டெடுக்க முடியவில்லை. பிறகு முயற்சிக்கவும்."
|
||||
}
|
||||
},
|
||||
"AccountSelection": {
|
||||
|
||||
@@ -42,6 +42,7 @@ export interface Typegen0 {
|
||||
eventsCausingDelays: {};
|
||||
eventsCausingGuards: {
|
||||
isInternetConnected: 'done.invoke.backupAndRestore.checkInternet:invocation[0]';
|
||||
isNetworkError: 'done.invoke.backupAndRestore.checkSignIn:invocation[0]';
|
||||
isSignInSuccessful: 'done.invoke.signIn:invocation[0]';
|
||||
isSignedIn: 'done.invoke.backupAndRestore.checkSignIn:invocation[0]';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user