[Inji-680]: Changes on VC sharing successful screen added home or history navigation. (#1161)

* [INJI-680]: Added home or history navigation in VC sharing successful screen

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Disconecting devices after navigation to home or history

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Resolved comments in PR (1)

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Adjusted the translation part in Successful shared screen

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Resolved comments in respective PR (2)

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Made changes in scan machine & locals

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Reverted DISCONNECTED to DISMISS at required

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

* [INJI-680]: Renamed as disconnect from navigateToHome as we are disconnecting the devices

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>

---------

Signed-off-by: anil_majji <majjianilkumar050@gmail.com>
This commit is contained in:
Anil kumar M
2024-01-18 13:05:59 +05:30
committed by GitHub
parent df1e51b491
commit f340420627
14 changed files with 342 additions and 143 deletions

View File

@@ -179,7 +179,7 @@ export class SvgImage {
);
}
static SuccessLogo() {
return <SuccessLogo />;
return <SuccessLogo {...testIDProps('SuccessLogo')} />;
}
static NoInternetConnection() {
return (

View File

@@ -930,6 +930,13 @@ export const DefaultTheme = {
flex: 1,
backgroundColor: Colors.White,
},
sharedSuccessfullyIconStyle: {
margin: 16,
padding: 8,
borderWidth: 2,
borderColor: Colors.Orange,
borderRadius: 30,
},
}),
AppMetaDataStyles: StyleSheet.create({
buttonContainer: {

View File

@@ -934,6 +934,13 @@ export const PurpleTheme = {
flex: 1,
backgroundColor: Colors.White,
},
sharedSuccessfullyIconStyle: {
margin: 16,
padding: 8,
borderWidth: 2,
borderColor: Colors.Purple,
borderRadius: 30,
},
}),
AppMetaDataStyles: StyleSheet.create({
buttonContainer: {

View File

@@ -520,8 +520,9 @@
},
"accepted": {
"title": "تمت مشاركة المعرف بنجاح!",
"message": "تمت مشاركة هويتك بنجاح مع",
"gotohome": "اذهب الى المنزل"
"message": "لقد تمت مشاركة هويتك بنجاح.",
"home": "المنزل",
"history": "تاريخ"
},
"rejected": {
"title": "يلاحظ",

View File

@@ -524,8 +524,9 @@
},
"accepted": {
"title": "ID shared successfully!",
"message": "Your ID has been successfully shared with",
"gotohome": "Go to Home"
"message": "Your ID has been successfully shared.",
"home": "Home",
"history": "History"
},
"rejected": {
"title": "Notice",

View File

@@ -523,8 +523,9 @@
},
"accepted": {
"title": "Matagumpay na naibahagi ang ID!",
"message": "Ang iyong ID ay matagumpay na naibahagi sa",
"gotohome": "Pumunta sa bahay"
"message": "Ang iyong ID ay matagumpay na naibahagi.",
"home": "Bahay",
"history": "Kasaysayan"
},
"rejected": {
"title": "Pansinin",

View File

@@ -520,8 +520,9 @@
},
"accepted": {
"title": "आईडी सफलतापूर्वक साझा की गई!",
"message": "आपकी आईडी सफलतापूर्वक साझा कर दी गई है",
"gotohome": "घर जाओ"
"message": "आपकी आईडी सफलतापूर्वक साझा कर दी गई है.",
"home": "होम",
"history": "इतिहास"
},
"rejected": {
"title": "सूचना",

View File

@@ -512,8 +512,9 @@
},
"accepted": {
"title": "ಐಡಿಯನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ!",
"message": "ನಿಮ್ಮ ಐಡಿಯನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ",
"gotohome": "ಮನೆಗೆ ಹೋಗು"
"message": "ನಿಮ್ಮ ಐಡಿಯನ್ನು ಯಶಸ್ವಿಯಾಗಿ ಹಂಚಿಕೊಳ್ಳಲಾಗಿದೆ.",
"home": "ಮನೆ",
"history": "ಇತಿಹಾಸ"
},
"rejected": {
"title": "ಗಮನಿಸಿ",

View File

@@ -520,8 +520,9 @@
},
"accepted": {
"title": "¡Éxito!",
"message": "Tu tarjeta ha sido compartida exitosamente con el Verificador",
"gotohome": "Ir a casa"
"message": "Su identificación se ha compartido correctamente.",
"home": "Hogar",
"history": "Historia"
},
"rejected": {
"title": "Aviso",

View File

@@ -518,8 +518,9 @@
},
"accepted": {
"title": "ஐடி வெற்றிகரமாகப் பகிரப்பட்டது!",
"message": "உங்கள் ஐடி வெற்றிகரமாகப் பகிரப்பட்டது",
"gotohome": "வீட்டிற்கு போ"
"message": "உங்கள் ஐடி வெற்றிகரமாகப் பகிரப்பட்டது.",
"home": "வீடு",
"history": "வரலாறு"
},
"rejected": {
"title": "கவனிக்கவும்",

View File

@@ -161,7 +161,7 @@ export const scanMachine =
target: '.checkStorage',
},
DISMISS: {
target: '#scan.reviewing.navigatingToHome',
target: '#scan.reviewing.disconnect',
},
},
states: {
@@ -595,7 +595,7 @@ export const scanMachine =
entry: ['logShared', 'sendVcShareSuccessEvent'],
on: {
DISMISS: {
target: 'navigatingToHome',
target: 'disconnect',
},
},
},
@@ -606,7 +606,12 @@ export const scanMachine =
},
},
},
navigatingToHome: {},
disconnect: {
//Renamed this to disconnect from navigateToHome as we are disconnecting the devices.
invoke: {
src: 'disconnect',
},
},
verifyingIdentity: {
on: {
FACE_VALID: {
@@ -657,7 +662,7 @@ export const scanMachine =
target: '#scan.reviewing.cancelling',
},
DISMISS: {
target: '#scan.reviewing.navigatingToHome',
target: '#scan.reviewing.disconnect',
},
},
},

View File

@@ -1,109 +1,245 @@
// This file was automatically generated. Edits will be overwritten
// This file was automatically generated. Edits will be overwritten
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
"": { type: "" };
"done.invoke.QrLogin": { type: "done.invoke.QrLogin"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.scan.checkStorage:invocation[0]": { type: "done.invoke.scan.checkStorage:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"done.invoke.scan.reviewing.creatingVp:invocation[0]": { type: "done.invoke.scan.reviewing.creatingVp:invocation[0]"; data: unknown; __tip: "See the XState TS docs to learn how to strongly type this." };
"xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection": { type: "xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection" };
"xstate.init": { type: "xstate.init" };
"xstate.stop": { type: "xstate.stop" };
};
invokeSrcNameMap: {
"checkBluetoothPermission": "done.invoke.scan.checkBluetoothPermission.checking:invocation[0]";
"checkBluetoothState": "done.invoke.scan.checkBluetoothState.checking:invocation[0]" | "done.invoke.scan.recheckBluetoothState.checking:invocation[0]";
"checkLocationPermission": "done.invoke.scan.checkingLocationState.checkingPermissionStatus:invocation[0]";
"checkLocationStatus": "done.invoke.scan.checkingLocationState.checkLocationService:invocation[0]";
"checkNearByDevicesPermission": "done.invoke.scan.checkNearbyDevicesPermission.checking:invocation[0]";
"checkStorageAvailability": "done.invoke.scan.checkStorage:invocation[0]";
"createVp": "done.invoke.scan.reviewing.creatingVp:invocation[0]";
"disconnect": "done.invoke.scan.clearingConnection:invocation[0]" | "done.invoke.scan.disconnectDevice:invocation[0]";
"monitorConnection": "done.invoke.scan:invocation[0]";
"requestBluetooth": "done.invoke.scan.checkBluetoothState.requesting:invocation[0]";
"requestNearByDevicesPermission": "done.invoke.scan.checkNearbyDevicesPermission.requesting:invocation[0]";
"requestToEnableLocationPermission": "done.invoke.scan.checkingLocationState.requestToEnableLocation:invocation[0]";
"sendVc": "done.invoke.scan.reviewing.sendingVc:invocation[0]";
"startConnection": "done.invoke.scan.connecting:invocation[0]";
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
"clearCreatedVp": "" | "BLE_ERROR" | "DISCONNECT" | "DISMISS" | "RESET" | "SCREEN_BLUR" | "SCREEN_FOCUS" | "xstate.stop";
"clearReason": "" | "BLE_ERROR" | "DISCONNECT" | "DISMISS" | "RESET" | "SCREEN_BLUR" | "SCREEN_FOCUS" | "xstate.stop";
"clearUri": "DISCONNECT" | "DISMISS" | "xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection";
"logFailedVerification": "FACE_INVALID";
"logShared": "VC_ACCEPTED";
"openAppPermission": "GOTO_SETTINGS" | "LOCATION_REQUEST";
"openBluetoothSettings": "GOTO_SETTINGS";
"registerLoggers": "DISCONNECT" | "DISMISS" | "xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection";
"removeLoggers": "DISCONNECT" | "DISMISS" | "SCREEN_BLUR" | "xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection" | "xstate.init";
"resetShouldVerifyPresence": "CANCEL" | "CONNECTED" | "DISMISS" | "RETRY";
"sendBLEConnectionErrorEvent": "BLE_ERROR";
"sendScanData": "SCAN";
"sendVCShareFlowCancelEndEvent": "CANCEL";
"sendVCShareFlowTimeoutEndEvent": "CANCEL" | "RETRY";
"sendVcShareSuccessEvent": "VC_ACCEPTED";
"sendVcSharingStartEvent": "SCAN";
"setBleError": "BLE_ERROR";
"setChildRef": "DISCONNECT" | "DISMISS" | "xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection";
"setCreatedVp": "done.invoke.scan.reviewing.creatingVp:invocation[0]";
"setLinkCode": "SCAN";
"setReadyForBluetoothStateCheck": "BLUETOOTH_PERMISSION_ENABLED";
"setReason": "UPDATE_REASON";
"setReceiverInfo": "CONNECTED";
"setSelectedVc": "SELECT_VC";
"setSenderInfo": "CONNECTED";
"setShareLogTypeUnverified": "ACCEPT_REQUEST";
"setShareLogTypeVerified": "FACE_VALID";
"setUri": "SCAN";
"storeLoginItem": "done.invoke.QrLogin";
"storingActivityLog": "STORE_RESPONSE";
"toggleShouldVerifyPresence": "TOGGLE_USER_CONSENT";
};
eventsCausingDelays: {
"CONNECTION_TIMEOUT": "SCAN";
"DESTROY_TIMEOUT": "" | "DISMISS" | "LOCATION_ENABLED";
"SHARING_TIMEOUT": "ACCEPT_REQUEST" | "FACE_VALID" | "done.invoke.scan.reviewing.creatingVp:invocation[0]";
};
eventsCausingGuards: {
"isIOS": "BLUETOOTH_STATE_DISABLED" | "START_PERMISSION_CHECK";
"isMinimumStorageRequiredForAuditEntryReached": "done.invoke.scan.checkStorage:invocation[0]";
"isOpenIdQr": "SCAN";
"isQrLogin": "SCAN";
"uptoAndroid11": "" | "START_PERMISSION_CHECK";
};
eventsCausingServices: {
"QrLogin": "SCAN";
"checkBluetoothPermission": "" | "BLUETOOTH_STATE_DISABLED" | "NEARBY_ENABLED" | "START_PERMISSION_CHECK";
"checkBluetoothState": "" | "APP_ACTIVE";
"checkLocationPermission": "APP_ACTIVE" | "LOCATION_ENABLED";
"checkLocationStatus": "" | "LOCATION_REQUEST";
"checkNearByDevicesPermission": "APP_ACTIVE" | "START_PERMISSION_CHECK";
"checkStorageAvailability": "RESET" | "SCREEN_FOCUS";
"createVp": never;
"disconnect": "" | "DISMISS" | "LOCATION_ENABLED" | "SCREEN_BLUR";
"monitorConnection": "DISMISS" | "SCREEN_BLUR" | "xstate.init";
"requestBluetooth": "BLUETOOTH_STATE_DISABLED";
"requestNearByDevicesPermission": "NEARBY_DISABLED";
"requestToEnableLocationPermission": "LOCATION_DISABLED";
"sendVc": "ACCEPT_REQUEST" | "FACE_VALID" | "done.invoke.scan.reviewing.creatingVp:invocation[0]";
"startConnection": "SCAN";
};
matchesStates: "bluetoothDenied" | "bluetoothPermissionDenied" | "checkBluetoothPermission" | "checkBluetoothPermission.checking" | "checkBluetoothPermission.enabled" | "checkBluetoothState" | "checkBluetoothState.checking" | "checkBluetoothState.enabled" | "checkBluetoothState.requesting" | "checkNearbyDevicesPermission" | "checkNearbyDevicesPermission.checking" | "checkNearbyDevicesPermission.enabled" | "checkNearbyDevicesPermission.requesting" | "checkStorage" | "checkingLocationState" | "checkingLocationState.checkLocationService" | "checkingLocationState.checkingPermissionStatus" | "checkingLocationState.denied" | "checkingLocationState.disabled" | "checkingLocationState.requestToEnableLocation" | "clearingConnection" | "connecting" | "connecting.inProgress" | "connecting.timeout" | "disconnectDevice" | "disconnected" | "findingConnection" | "handlingBleError" | "inactive" | "invalid" | "nearByDevicesPermissionDenied" | "recheckBluetoothState" | "recheckBluetoothState.checking" | "recheckBluetoothState.enabled" | "restrictSharingVc" | "reviewing" | "reviewing.accepted" | "reviewing.cancelling" | "reviewing.creatingVp" | "reviewing.invalidIdentity" | "reviewing.navigatingToHome" | "reviewing.rejected" | "reviewing.selectingVc" | "reviewing.sendingVc" | "reviewing.sendingVc.inProgress" | "reviewing.sendingVc.sent" | "reviewing.sendingVc.timeout" | "reviewing.verifyingIdentity" | "showQrLogin" | "showQrLogin.idle" | "showQrLogin.navigatingToHistory" | "showQrLogin.storing" | "startPermissionCheck" | { "checkBluetoothPermission"?: "checking" | "enabled";
"checkBluetoothState"?: "checking" | "enabled" | "requesting";
"checkNearbyDevicesPermission"?: "checking" | "enabled" | "requesting";
"checkingLocationState"?: "checkLocationService" | "checkingPermissionStatus" | "denied" | "disabled" | "requestToEnableLocation";
"connecting"?: "inProgress" | "timeout";
"recheckBluetoothState"?: "checking" | "enabled";
"reviewing"?: "accepted" | "cancelling" | "creatingVp" | "invalidIdentity" | "navigatingToHome" | "rejected" | "selectingVc" | "sendingVc" | "verifyingIdentity" | { "sendingVc"?: "inProgress" | "sent" | "timeout"; };
"showQrLogin"?: "idle" | "navigatingToHistory" | "storing"; };
tags: never;
}
export interface Typegen0 {
'@@xstate/typegen': true;
internalEvents: {
'': {type: ''};
'done.invoke.QrLogin': {
type: 'done.invoke.QrLogin';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.scan.checkStorage:invocation[0]': {
type: 'done.invoke.scan.checkStorage:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'done.invoke.scan.reviewing.creatingVp:invocation[0]': {
type: 'done.invoke.scan.reviewing.creatingVp:invocation[0]';
data: unknown;
__tip: 'See the XState TS docs to learn how to strongly type this.';
};
'xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection': {
type: 'xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection';
};
'xstate.init': {type: 'xstate.init'};
'xstate.stop': {type: 'xstate.stop'};
};
invokeSrcNameMap: {
checkBluetoothPermission: 'done.invoke.scan.checkBluetoothPermission.checking:invocation[0]';
checkBluetoothState:
| 'done.invoke.scan.checkBluetoothState.checking:invocation[0]'
| 'done.invoke.scan.recheckBluetoothState.checking:invocation[0]';
checkLocationPermission: 'done.invoke.scan.checkingLocationState.checkingPermissionStatus:invocation[0]';
checkLocationStatus: 'done.invoke.scan.checkingLocationState.checkLocationService:invocation[0]';
checkNearByDevicesPermission: 'done.invoke.scan.checkNearbyDevicesPermission.checking:invocation[0]';
checkStorageAvailability: 'done.invoke.scan.checkStorage:invocation[0]';
createVp: 'done.invoke.scan.reviewing.creatingVp:invocation[0]';
disconnect:
| 'done.invoke.scan.clearingConnection:invocation[0]'
| 'done.invoke.scan.disconnectDevice:invocation[0]'
| 'done.invoke.scan.reviewing.navigatingToHistory:invocation[0]'
| 'done.invoke.scan.reviewing.navigatingToHome:invocation[0]';
monitorConnection: 'done.invoke.scan:invocation[0]';
requestBluetooth: 'done.invoke.scan.checkBluetoothState.requesting:invocation[0]';
requestNearByDevicesPermission: 'done.invoke.scan.checkNearbyDevicesPermission.requesting:invocation[0]';
requestToEnableLocationPermission: 'done.invoke.scan.checkingLocationState.requestToEnableLocation:invocation[0]';
sendVc: 'done.invoke.scan.reviewing.sendingVc:invocation[0]';
startConnection: 'done.invoke.scan.connecting:invocation[0]';
};
missingImplementations: {
actions: never;
delays: never;
guards: never;
services: never;
};
eventsCausingActions: {
clearCreatedVp:
| ''
| 'BLE_ERROR'
| 'DISCONNECT'
| 'DISMISS'
| 'RESET'
| 'SCREEN_BLUR'
| 'SCREEN_FOCUS'
| 'xstate.stop';
clearReason:
| ''
| 'BLE_ERROR'
| 'DISCONNECT'
| 'DISMISS'
| 'RESET'
| 'SCREEN_BLUR'
| 'SCREEN_FOCUS'
| 'xstate.stop';
clearUri:
| 'DISCONNECT'
| 'DISMISS'
| 'xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection';
logFailedVerification: 'FACE_INVALID';
logShared: 'VC_ACCEPTED';
openAppPermission: 'GOTO_SETTINGS' | 'LOCATION_REQUEST';
openBluetoothSettings: 'GOTO_SETTINGS';
registerLoggers:
| 'DISCONNECT'
| 'DISMISS'
| 'xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection';
removeLoggers:
| 'DISCONNECT'
| 'DISMISS'
| 'SCREEN_BLUR'
| 'xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection'
| 'xstate.init';
resetShouldVerifyPresence: 'CANCEL' | 'CONNECTED' | 'DISMISS' | 'RETRY';
sendBLEConnectionErrorEvent: 'BLE_ERROR';
sendScanData: 'SCAN';
sendVCShareFlowCancelEndEvent: 'CANCEL';
sendVCShareFlowTimeoutEndEvent: 'CANCEL' | 'RETRY';
sendVcShareSuccessEvent: 'VC_ACCEPTED';
sendVcSharingStartEvent: 'SCAN';
setBleError: 'BLE_ERROR';
setChildRef:
| 'DISCONNECT'
| 'DISMISS'
| 'xstate.after(DESTROY_TIMEOUT)#scan.clearingConnection';
setCreatedVp: 'done.invoke.scan.reviewing.creatingVp:invocation[0]';
setLinkCode: 'SCAN';
setReadyForBluetoothStateCheck: 'BLUETOOTH_PERMISSION_ENABLED';
setReason: 'UPDATE_REASON';
setReceiverInfo: 'CONNECTED';
setSelectedVc: 'SELECT_VC';
setSenderInfo: 'CONNECTED';
setShareLogTypeUnverified: 'ACCEPT_REQUEST';
setShareLogTypeVerified: 'FACE_VALID';
setUri: 'SCAN';
storeLoginItem: 'done.invoke.QrLogin';
storingActivityLog: 'STORE_RESPONSE';
toggleShouldVerifyPresence: 'TOGGLE_USER_CONSENT';
};
eventsCausingDelays: {
CONNECTION_TIMEOUT: 'SCAN';
DESTROY_TIMEOUT: '' | 'DISMISS' | 'LOCATION_ENABLED';
SHARING_TIMEOUT:
| 'ACCEPT_REQUEST'
| 'FACE_VALID'
| 'done.invoke.scan.reviewing.creatingVp:invocation[0]';
};
eventsCausingGuards: {
isIOS: 'BLUETOOTH_STATE_DISABLED' | 'START_PERMISSION_CHECK';
isMinimumStorageRequiredForAuditEntryReached: 'done.invoke.scan.checkStorage:invocation[0]';
isOpenIdQr: 'SCAN';
isQrLogin: 'SCAN';
uptoAndroid11: '' | 'START_PERMISSION_CHECK';
};
eventsCausingServices: {
QrLogin: 'SCAN';
checkBluetoothPermission:
| ''
| 'BLUETOOTH_STATE_DISABLED'
| 'NEARBY_ENABLED'
| 'START_PERMISSION_CHECK';
checkBluetoothState: '' | 'APP_ACTIVE';
checkLocationPermission: 'APP_ACTIVE' | 'LOCATION_ENABLED';
checkLocationStatus: '' | 'LOCATION_REQUEST';
checkNearByDevicesPermission: 'APP_ACTIVE' | 'START_PERMISSION_CHECK';
checkStorageAvailability: 'RESET' | 'SCREEN_FOCUS';
createVp: never;
disconnect:
| ''
| 'DISCONNECT'
| 'DISMISS'
| 'LOCATION_ENABLED'
| 'SCREEN_BLUR';
monitorConnection: 'DISMISS' | 'SCREEN_BLUR' | 'xstate.init';
requestBluetooth: 'BLUETOOTH_STATE_DISABLED';
requestNearByDevicesPermission: 'NEARBY_DISABLED';
requestToEnableLocationPermission: 'LOCATION_DISABLED';
sendVc:
| 'ACCEPT_REQUEST'
| 'FACE_VALID'
| 'done.invoke.scan.reviewing.creatingVp:invocation[0]';
startConnection: 'SCAN';
};
matchesStates:
| 'bluetoothDenied'
| 'bluetoothPermissionDenied'
| 'checkBluetoothPermission'
| 'checkBluetoothPermission.checking'
| 'checkBluetoothPermission.enabled'
| 'checkBluetoothState'
| 'checkBluetoothState.checking'
| 'checkBluetoothState.enabled'
| 'checkBluetoothState.requesting'
| 'checkNearbyDevicesPermission'
| 'checkNearbyDevicesPermission.checking'
| 'checkNearbyDevicesPermission.enabled'
| 'checkNearbyDevicesPermission.requesting'
| 'checkStorage'
| 'checkingLocationState'
| 'checkingLocationState.checkLocationService'
| 'checkingLocationState.checkingPermissionStatus'
| 'checkingLocationState.denied'
| 'checkingLocationState.disabled'
| 'checkingLocationState.requestToEnableLocation'
| 'clearingConnection'
| 'connecting'
| 'connecting.inProgress'
| 'connecting.timeout'
| 'disconnectDevice'
| 'disconnected'
| 'findingConnection'
| 'handlingBleError'
| 'inactive'
| 'invalid'
| 'nearByDevicesPermissionDenied'
| 'recheckBluetoothState'
| 'recheckBluetoothState.checking'
| 'recheckBluetoothState.enabled'
| 'restrictSharingVc'
| 'reviewing'
| 'reviewing.accepted'
| 'reviewing.cancelling'
| 'reviewing.creatingVp'
| 'reviewing.invalidIdentity'
| 'reviewing.navigatingToHistory'
| 'reviewing.navigatingToHome'
| 'reviewing.rejected'
| 'reviewing.selectingVc'
| 'reviewing.sendingVc'
| 'reviewing.sendingVc.inProgress'
| 'reviewing.sendingVc.sent'
| 'reviewing.sendingVc.timeout'
| 'reviewing.verifyingIdentity'
| 'showQrLogin'
| 'showQrLogin.idle'
| 'showQrLogin.navigatingToHistory'
| 'showQrLogin.storing'
| 'startPermissionCheck'
| {
checkBluetoothPermission?: 'checking' | 'enabled';
checkBluetoothState?: 'checking' | 'enabled' | 'requesting';
checkNearbyDevicesPermission?: 'checking' | 'enabled' | 'requesting';
checkingLocationState?:
| 'checkLocationService'
| 'checkingPermissionStatus'
| 'denied'
| 'disabled'
| 'requestToEnableLocation';
connecting?: 'inProgress' | 'timeout';
recheckBluetoothState?: 'checking' | 'enabled';
reviewing?:
| 'accepted'
| 'cancelling'
| 'creatingVp'
| 'invalidIdentity'
| 'navigatingToHistory'
| 'navigatingToHome'
| 'rejected'
| 'selectingVc'
| 'sendingVc'
| 'verifyingIdentity'
| {sendingVc?: 'inProgress' | 'sent' | 'timeout'};
showQrLogin?: 'idle' | 'navigatingToHistory' | 'storing';
};
tags: never;
}

View File

@@ -63,6 +63,14 @@ export function useScanLayout() {
const onStayInProgress = () =>
scanService.send(ScanEvents.STAY_IN_PROGRESS());
const onRetry = () => scanService.send(ScanEvents.RETRY());
const GOTO_HOME = () => {
scanService.send(ScanEvents.DISMISS());
navigation.navigate(BOTTOM_TAB_ROUTES.home);
};
const GOTO_HISTORY = () => {
scanService.send(ScanEvents.DISMISS());
navigation.navigate(BOTTOM_TAB_ROUTES.history);
};
const isInvalid = useSelector(scanService, selectIsInvalid);
const isConnecting = useSelector(scanService, selectIsConnecting);
@@ -221,6 +229,8 @@ export function useScanLayout() {
return {
isInvalid,
isDone,
GOTO_HOME,
GOTO_HISTORY,
isDisconnected: useSelector(scanService, selectIsDisconnected),
statusOverlay,
isStayInProgress,

View File

@@ -2,13 +2,13 @@ import React from 'react';
import {useTranslation} from 'react-i18next';
import {Theme} from '../../components/ui/styleUtils';
import {Modal} from '../../components/ui/Modal';
import {Image} from 'react-native';
import {Column, Text} from '../../components/ui';
import {Button} from '../../components/ui';
import {Pressable, Dimensions} from 'react-native';
import {Column, Row, Text} from '../../components/ui';
import {useScanLayout} from './ScanLayoutController';
import {useSendVcScreen} from './SendVcScreenController';
import testIDProps from '../../shared/commonUtil';
import {SvgImage} from '../../components/ui/svg';
import {Icon} from 'react-native-elements';
export const SharingSuccessModal: React.FC<
SharingSuccessModalProps
@@ -28,26 +28,53 @@ export const SharingSuccessModal: React.FC<
crossAlign="center"
style={Theme.SelectVcOverlayStyles.sharedSuccessfully}>
{SvgImage.SuccessLogo()}
<Text margin="20 0" style={Theme.TextStyles.bold} size={'large'}>
{t('ScanScreen:status.accepted.title')}
<Text
testID="successfullySharedTitle"
margin="20 0"
style={Theme.TextStyles.bold}
size={'large'}>
{t('status.accepted.title')}
</Text>
<Text
testID="successfullySharedMessage"
align="center"
style={Theme.TextStyles.regular}
color={Theme.Colors.statusMessage}>
{t('ScanScreen:status.accepted.message')}
</Text>
<Text style={Theme.TextStyles.bold}>
{sendVcScreenController.receiverInfo.name}
{t('status.accepted.message')}
</Text>
</Column>
<Column margin="0 0 0">
<Button
type="gradient"
title={t('ScanScreen:status.accepted.gotohome')}
onPress={scanLayoutController.DISMISS}
/>
</Column>
<Row
align="space-evenly"
style={{marginBottom: Dimensions.get('screen').height * 0.06}}>
<Pressable testID="successfulVcSharedHomeIcon">
<Icon
name="home"
color={Theme.Colors.Icon}
size={33}
containerStyle={
Theme.SelectVcOverlayStyles.sharedSuccessfullyIconStyle
}
onPress={scanLayoutController.GOTO_HOME}
/>
<Text align="center" weight="bold">
{t('status.accepted.home')}
</Text>
</Pressable>
<Pressable testID="successfulVcSharedHistoryIcon">
<Icon
name="history"
color={Theme.Colors.Icon}
size={33}
containerStyle={
Theme.SelectVcOverlayStyles.sharedSuccessfullyIconStyle
}
onPress={scanLayoutController.GOTO_HISTORY}
/>
<Text align="center" weight="bold">
{t('status.accepted.history')}
</Text>
</Pressable>
</Row>
</Modal>
</React.Fragment>
);