mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-10 14:07:59 -05:00
Remove error toaster when retrying for backup or restore (#1241)
* [INJIMOB-825]: remove error toaster when retrying for backup or restore Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> * [INJIMOB-825]: refactor to check on data availability and storage avilability Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> * [INJIMOB-788] add gap between action buttons in Error screen Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * [INJIMOB-788] add theme colors to backup&restore flow icons Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> * [INJIMOB-788] modify style of gradient button Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> --------- Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> Signed-off-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com> Co-authored-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> Co-authored-by: KiruthikaJeyashankar <81218987+KiruthikaJeyashankar@users.noreply.github.com>
This commit is contained in:
@@ -148,7 +148,7 @@ fileignoreconfig:
|
||||
- filename: machines/backupAndRestore/backupAndRestore.typegen.ts
|
||||
checksum: 509b9660553990841883c54f8986971f21c7315e7450c455bba2766738c58bee
|
||||
- filename: machines/backupAndRestore/backup.ts
|
||||
checksum: b7defa2c5217211cf1d07b63bb253c466bda8f57605e5482f750f11bc3dd16ee
|
||||
checksum: 73f68c5f37a763d98fa8422229a262e049260187ea10590f1a5f538f54d17371
|
||||
- filename: machines/backupAndRestore/backup.typegen.ts
|
||||
checksum: 5d0ff5ea1361c4f1184699e5c96615940366a048c2edf5881ed9c86d824c722b
|
||||
- filename: components/BackupAndRestoreAllScreenBanner.tsx
|
||||
@@ -183,7 +183,7 @@ fileignoreconfig:
|
||||
- filename: components/HelpScreen.tsx
|
||||
checksum: bbc69143bd37d065bba3800396301db5a0318e8b7ba51ecd49142dda68783a01
|
||||
- filename: machines/backupRestore.ts
|
||||
checksum: e84d409ad0968c8ad189f4fa8553996820f46056dd3b25ab5e60851c2d1f3e03
|
||||
checksum: 8fa9d8b430e2c2c632dfed0d701d375ac3d436a198a9c7acde93ec6507764550
|
||||
- filename: machines/backupAndRestore/backupAndRestoreSetup.ts
|
||||
checksum: 75b07071aef4278f40f16861232b922e5ee8594efc9467984b072966fa7793b8
|
||||
- filename: machines/backupAndRestore/backupAndRestoreSetup.typegen.ts
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="78.143" height="56.742" viewBox="0 0 78.143 56.742">
|
||||
<path id="cloud_upload_FILL0_wght400_GRAD0_opsz48" d="M58.648-742.258a17.938,17.938,0,0,1-13.142-5.506A17.938,17.938,0,0,1,40-760.906a18.532,18.532,0,0,1,4.4-12.21,17.75,17.75,0,0,1,11.322-6.349,24.071,24.071,0,0,1,8.347-14.075A23.062,23.062,0,0,1,79.249-799a22.15,22.15,0,0,1,16.827,7.237,24.474,24.474,0,0,1,6.793,17.36v2.131a14.364,14.364,0,0,1,10.833,4.129,14.514,14.514,0,0,1,4.44,10.878A14.432,14.432,0,0,1,113.7-746.7a14.432,14.432,0,0,1-10.567,4.44h-21.4a5.111,5.111,0,0,1-3.73-1.6,5.111,5.111,0,0,1-1.6-3.729V-770.5l-7.37,7.37-3.818-3.818L79.071-780.8l13.853,13.853-3.818,3.818-7.37-7.37v22.91h21.4a9.321,9.321,0,0,0,6.837-2.842,9.32,9.32,0,0,0,2.842-6.837,9.321,9.321,0,0,0-2.842-6.837,9.321,9.321,0,0,0-6.837-2.842H97.541V-774.4a19.09,19.09,0,0,0-5.372-13.586,17.539,17.539,0,0,0-13.275-5.683,17.68,17.68,0,0,0-13.32,5.683A19.006,19.006,0,0,0,60.157-774.4H58.47a12.611,12.611,0,0,0-9.324,3.863,13.046,13.046,0,0,0-3.818,9.546,12.988,12.988,0,0,0,3.9,9.457,12.752,12.752,0,0,0,9.419,3.952H71.079v5.328ZM79.071-768.009Z" transform="translate(-40 799)" fill="#f2801d"/>
|
||||
<path id="cloud_upload_FILL0_wght400_GRAD0_opsz48" d="M58.648-742.258a17.938,17.938,0,0,1-13.142-5.506A17.938,17.938,0,0,1,40-760.906a18.532,18.532,0,0,1,4.4-12.21,17.75,17.75,0,0,1,11.322-6.349,24.071,24.071,0,0,1,8.347-14.075A23.062,23.062,0,0,1,79.249-799a22.15,22.15,0,0,1,16.827,7.237,24.474,24.474,0,0,1,6.793,17.36v2.131a14.364,14.364,0,0,1,10.833,4.129,14.514,14.514,0,0,1,4.44,10.878A14.432,14.432,0,0,1,113.7-746.7a14.432,14.432,0,0,1-10.567,4.44h-21.4a5.111,5.111,0,0,1-3.73-1.6,5.111,5.111,0,0,1-1.6-3.729V-770.5l-7.37,7.37-3.818-3.818L79.071-780.8l13.853,13.853-3.818,3.818-7.37-7.37v22.91h21.4a9.321,9.321,0,0,0,6.837-2.842,9.32,9.32,0,0,0,2.842-6.837,9.321,9.321,0,0,0-2.842-6.837,9.321,9.321,0,0,0-6.837-2.842H97.541V-774.4a19.09,19.09,0,0,0-5.372-13.586,17.539,17.539,0,0,0-13.275-5.683,17.68,17.68,0,0,0-13.32,5.683A19.006,19.006,0,0,0,60.157-774.4H58.47a12.611,12.611,0,0,0-9.324,3.863,13.046,13.046,0,0,0-3.818,9.546,12.988,12.988,0,0,0,3.9,9.457,12.752,12.752,0,0,0,9.419,3.952H71.079v5.328ZM79.071-768.009Z" transform="translate(-40 799)" fill="@fill"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,3 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24.994" height="24.994" viewBox="0 0 24.994 24.994">
|
||||
<path id="history_FILL0_wght400_GRAD0_opsz48" d="M132.393-815.006a11.869,11.869,0,0,1-8.783-3.662,12.168,12.168,0,0,1-3.61-8.869h2.083a10.191,10.191,0,0,0,2.985,7.394,9.844,9.844,0,0,0,7.325,3.055,10.1,10.1,0,0,0,7.464-3.09,10.268,10.268,0,0,0,3.055-7.5,9.7,9.7,0,0,0-3.09-7.273,10.34,10.34,0,0,0-7.429-2.968,9.44,9.44,0,0,0-4.426,1.076,12.073,12.073,0,0,0-3.593,2.847h3.645v2.083h-7.255v-7.221h2.083v3.68a13.211,13.211,0,0,1,4.287-3.333A11.809,11.809,0,0,1,132.393-840a12.4,12.4,0,0,1,4.895.972,12.825,12.825,0,0,1,4.009,2.656,12.467,12.467,0,0,1,2.708,3.94,11.968,11.968,0,0,1,.989,4.86,12.214,12.214,0,0,1-.989,4.895,12.565,12.565,0,0,1-2.708,3.992,12.92,12.92,0,0,1-4.009,2.69A12.213,12.213,0,0,1,132.393-815.006Zm4.443-6.839-5.346-5.277v-7.429h2.083v6.561l4.756,4.652Z" transform="translate(-120 840)" fill="#f2801d"/>
|
||||
<path id="history_FILL0_wght400_GRAD0_opsz48" d="M132.393-815.006a11.869,11.869,0,0,1-8.783-3.662,12.168,12.168,0,0,1-3.61-8.869h2.083a10.191,10.191,0,0,0,2.985,7.394,9.844,9.844,0,0,0,7.325,3.055,10.1,10.1,0,0,0,7.464-3.09,10.268,10.268,0,0,0,3.055-7.5,9.7,9.7,0,0,0-3.09-7.273,10.34,10.34,0,0,0-7.429-2.968,9.44,9.44,0,0,0-4.426,1.076,12.073,12.073,0,0,0-3.593,2.847h3.645v2.083h-7.255v-7.221h2.083v3.68a13.211,13.211,0,0,1,4.287-3.333A11.809,11.809,0,0,1,132.393-840a12.4,12.4,0,0,1,4.895.972,12.825,12.825,0,0,1,4.009,2.656,12.467,12.467,0,0,1,2.708,3.94,11.968,11.968,0,0,1,.989,4.86,12.214,12.214,0,0,1-.989,4.895,12.565,12.565,0,0,1-2.708,3.992,12.92,12.92,0,0,1-4.009,2.69A12.213,12.213,0,0,1,132.393-815.006Zm4.443-6.839-5.346-5.277v-7.429h2.083v6.561l4.756,4.652Z" transform="translate(-120 840)" fill="@fill"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 931 B |
@@ -54,7 +54,9 @@ export const BackupAndRestoreBannerNotification: React.FC = () => {
|
||||
/>
|
||||
)}
|
||||
|
||||
{backUpController.isBackingUpFailure && backupFailure()}
|
||||
{backUpController.isBackingUpFailure &&
|
||||
!backUpController.isCheckingDataForBackup &&
|
||||
backupFailure()}
|
||||
|
||||
{restoreController.isBackUpRestoreSuccess && (
|
||||
<BannerNotification
|
||||
@@ -65,7 +67,9 @@ export const BackupAndRestoreBannerNotification: React.FC = () => {
|
||||
testId={'restoreBackupSuccess'}
|
||||
/>
|
||||
)}
|
||||
{restoreController.isBackUpRestoreFailure && restoreFailure()}
|
||||
{restoreController.isBackUpRestoreFailure &&
|
||||
!restoreController.isCheckStorageAvailibility &&
|
||||
restoreFailure()}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ export const Error: React.FC<ErrorProps> = props => {
|
||||
</View>
|
||||
{props.alignActionsOnEnd && (
|
||||
<Column fill crossAlign="center" align="flex-end" margin="0 0 30 0">
|
||||
<Row style={{marginHorizontal: 30}}>
|
||||
<Row style={{marginHorizontal: 30, marginBottom: 15}}>
|
||||
{props.primaryButtonText && (
|
||||
<Button
|
||||
fill
|
||||
|
||||
@@ -240,8 +240,7 @@ export class SvgImage {
|
||||
return (
|
||||
<Backup
|
||||
{...testIDProps('dataBackupIcon')}
|
||||
color1={Theme.Colors.linearGradientStart}
|
||||
color2={Theme.Colors.linearGradientEnd}
|
||||
color1={Theme.Colors.Icon}
|
||||
width={width}
|
||||
height={height}
|
||||
/>
|
||||
@@ -249,7 +248,9 @@ export class SvgImage {
|
||||
}
|
||||
|
||||
static RestoreIcon() {
|
||||
return <Restore {...testIDProps('restoreIcon')} />;
|
||||
return (
|
||||
<Restore color1={Theme.Colors.Icon} {...testIDProps('restoreIcon')} />
|
||||
);
|
||||
}
|
||||
|
||||
static SuccessLogo() {
|
||||
|
||||
@@ -664,7 +664,7 @@ export const PurpleTheme = {
|
||||
paddingHorizontal: 24,
|
||||
},
|
||||
newLabel: {
|
||||
backgroundColor: Colors.Orange,
|
||||
backgroundColor: Colors.Purple,
|
||||
paddingHorizontal: 5,
|
||||
paddingVertical: 4,
|
||||
borderRadius: 4,
|
||||
@@ -982,7 +982,6 @@ export const PurpleTheme = {
|
||||
borderRadius: 9,
|
||||
width: Dimensions.get('window').width * 0.72,
|
||||
alignSelf: 'center',
|
||||
margin: 3,
|
||||
height: 54,
|
||||
},
|
||||
float: {
|
||||
|
||||
@@ -415,6 +415,9 @@ export function selectIsLoading(state: State) {
|
||||
export function selectIsBackingUpSuccess(state: State) {
|
||||
return state.matches('backingUp.success');
|
||||
}
|
||||
export function selectIsCheckingDataAvailabilityForBackup(state: State) {
|
||||
return state.matches('backingUp.checkDataAvailabilityForBackup');
|
||||
}
|
||||
export function selectIsBackingUpFailure(state: State) {
|
||||
return state.matches('backingUp.failure');
|
||||
}
|
||||
|
||||
@@ -287,6 +287,9 @@ export function selectIsBackUpRestoring(state: State) {
|
||||
export function selectIsBackUpRestoreSuccess(state: State) {
|
||||
return state.matches('restoreBackup.success');
|
||||
}
|
||||
export function selectIsCheckStorageAvailibility(state: State) {
|
||||
return state.matches('restoreBackup.checkStorageAvailibility');
|
||||
}
|
||||
export function selectIsBackUpRestoreFailure(state: State) {
|
||||
return state.matches('restoreBackup.failure');
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
selectIsBackUpRestoreFailure,
|
||||
selectIsBackUpRestoreSuccess,
|
||||
selectErrorReason,
|
||||
selectIsCheckStorageAvailibility,
|
||||
} from '../../machines/backupRestore';
|
||||
import {GlobalContext} from '../../shared/GlobalContext';
|
||||
import {VcEvents} from '../../machines/VCItemMachine/vc';
|
||||
@@ -29,6 +30,10 @@ export function useBackupRestoreScreen() {
|
||||
backupRestoreService,
|
||||
selectIsBackUpRestoreFailure,
|
||||
),
|
||||
isCheckStorageAvailibility: useSelector(
|
||||
backupRestoreService,
|
||||
selectIsCheckStorageAvailibility,
|
||||
),
|
||||
BACKUP_RESTORE: () => {
|
||||
backupRestoreService.send(BackupRestoreEvents.BACKUP_RESTORE());
|
||||
},
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
selectBackupErrorReason,
|
||||
lastBackupDetails,
|
||||
selectIsLoading,
|
||||
selectIsCheckingDataAvailabilityForBackup,
|
||||
} from '../../machines/backupAndRestore/backup';
|
||||
import {GlobalContext} from '../../shared/GlobalContext';
|
||||
|
||||
@@ -24,6 +25,10 @@ export function useBackupScreen() {
|
||||
isBackingUpSuccess: useSelector(backupService, selectIsBackingUpSuccess),
|
||||
isBackingUpFailure: useSelector(backupService, selectIsBackingUpFailure),
|
||||
isBackupInProgress: useSelector(backupService, selectIsBackupInprogress),
|
||||
isCheckingDataForBackup: useSelector(
|
||||
backupService,
|
||||
selectIsCheckingDataAvailabilityForBackup,
|
||||
),
|
||||
DATA_BACKUP: () => {
|
||||
backupService.send(BackupEvents.DATA_BACKUP());
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user