feat(mosip#305): include 'powered by' message for BLE and GoogleNearby in profile screen

This commit is contained in:
Mohammed Jaffer
2023-01-05 12:28:33 +05:30
parent 2da717f635
commit 830d52095a
7 changed files with 23 additions and 14 deletions

4
.env
View File

@@ -1,4 +1,8 @@
# after making changes to the env file, ensure to start the bundler (or the project) with a --reset-cache
# eg . npm build android:newlogic --reset-cache
MIMOTO_HOST=https://api.qa4.mosip.net/residentmobileapp
#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
GOOGLE_NEARBY_MESSAGES_API_KEY=
USE_BLE_SHARE=true

View File

@@ -9,7 +9,7 @@ const { Openid4vpBle } = OpenIdBle;
type ShareProtocol = OpenIDBLEShare | IdpassSmartshareType;
let ShareLib: ShareProtocol;
if (USE_BLE_SHARE) {
if (USE_BLE_SHARE === 'true') {
ShareLib = Openid4vpBle;
} else {
ShareLib = IdpassSmartshare;

View File

@@ -177,7 +177,8 @@
"empty": "Empty",
"revokeSuccessful": "VID successfully revoked",
"version": "Version",
"useBle": "Share VC using BLE"
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
},
"ReceiveVcScreen": {
"header": "{{vcLabel}} details",
@@ -298,3 +299,4 @@
}
}
}

8
package-lock.json generated
View File

@@ -52,7 +52,7 @@
"react-native-gesture-handler": "~2.1.0",
"react-native-keychain": "^8.0.0",
"react-native-location-enabler": "^4.1.0",
"react-native-openid4vp-ble": "ravikp/tuvali#develop",
"react-native-openid4vp-ble": "mosip/tuvali#v0.1.0",
"react-native-permissions": "^3.6.0",
"react-native-popable": "^0.4.3",
"react-native-qrcode-svg": "^6.1.1",
@@ -21150,7 +21150,7 @@
},
"node_modules/react-native-openid4vp-ble": {
"version": "0.1.0",
"resolved": "git+ssh://git@github.com/ravikp/tuvali.git#3408c7a5aaf4a1da8920fb532834df255236075d",
"resolved": "git+ssh://git@github.com/mosip/tuvali.git#d9474da8e6c3f4b3ce4583dcf8afe44ccb1bdaac",
"license": "MIT",
"peerDependencies": {
"react": "*",
@@ -44064,8 +44064,8 @@
"requires": {}
},
"react-native-openid4vp-ble": {
"version": "git+ssh://git@github.com/ravikp/tuvali.git#3408c7a5aaf4a1da8920fb532834df255236075d",
"from": "react-native-openid4vp-ble@ravikp/tuvali#develop",
"version": "git+ssh://git@github.com/mosip/tuvali.git#d9474da8e6c3f4b3ce4583dcf8afe44ccb1bdaac",
"from": "react-native-openid4vp-ble@mosip/tuvali#v0.1.0",
"requires": {}
},
"react-native-permissions": {

View File

@@ -69,7 +69,7 @@
"react-native-swipe-gestures": "^1.0.5",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^8.1.0",
"react-native-openid4vp-ble": "ravikp/tuvali#develop",
"react-native-openid4vp-ble": "mosip/tuvali#v0.1.0",
"xstate": "^4.26.0"
},
"devDependencies": {

View File

@@ -13,5 +13,6 @@
"empty": "Empty",
"revokeSuccessful": "VID successfully revoked",
"version": "Version",
"useBle": "Share VC using BLE"
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
}

View File

@@ -85,14 +85,16 @@ export const ProfileScreen: React.FC<MainRouteProps> = (props) => {
<ListItem bottomDivider>
<ListItem.Content>
<ListItem.Title>
<Text color={Theme.Colors.profileLabel}>{t('useBle')}</Text>
<Text
color={
USE_BLE_SHARE === 'true'
? Theme.Colors.lightGreyBackgroundColor
: Theme.Colors.profileValue
}>
{USE_BLE_SHARE === 'true' ? t('useBle') : t('useGoogleNearby')}
</Text>
</ListItem.Title>
</ListItem.Content>
<Switch
value={USE_BLE_SHARE === 'true'}
color={Theme.Colors.profileValue}
disabled
/>
</ListItem>
<Credits label={t('credits')} color={Theme.Colors.profileLabel} />
<ListItem bottomDivider onPress={controller.LOGOUT}>