Skip to content

Commit

Permalink
Base file
Browse files Browse the repository at this point in the history
  • Loading branch information
NidhishVyas committed Jan 30, 2024
1 parent 4bbf7c6 commit 6de8947
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 44 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@
"@react-navigation/stack": "6.0.11",
"@types/node": "16.9.6",
"@aries-framework/react-hooks": "patch:@aries-framework/react-hooks@npm:0.4.2#./.yarn/patches/@aries-framework-react-hooks-npm-0.4.2-84b7eb8764.patch"
},
"dependencies": {
"react-native-qrcode-svg": "^6.2.0",
"react-native-svg": "^14.1.0"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">Aries Bifold</string>
<string name="app_name">FHWA</string>
</resources>
1 change: 0 additions & 1 deletion packages/legacy/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"react-native-orientation-locker": "^1.6.0",
"react-native-permissions": "^3.8.4",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "^3.4.2",
"react-native-safe-area-context": "^3.2.0",
"react-native-scalable-image": "^1.1.0",
"react-native-screens": "^3.24.0",
Expand Down
1 change: 1 addition & 0 deletions packages/legacy/core/App/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ const translation = {
"AppGuides": "App guides",
"Build": "Build",
"WhatAreContacts": "What are Contacts?",
"QRCodeGen": "Generate QR Code",
"ScanMyQR": "Scan my QR code",
"Help": "Help",
"MoreInformation": "More information",
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/navigators/ContactStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import CredentialOffer from '../screens/CredentialOffer'
import ListContacts from '../screens/ListContacts'
import ProofDetails from '../screens/ProofDetails'
import ProofRequest from '../screens/ProofRequest'
import QRCodeGen from '../screens/QRCodeGen'
import RenameContact from '../screens/RenameContact'
import WhatAreContacts from '../screens/WhatAreContacts'
import { ContactStackParams, Screens } from '../types/navigators'
Expand Down Expand Up @@ -39,6 +40,7 @@ const ContactStack: React.FC = () => {
options={{ title: t('Screens.RenameContact') }}
/>
<Stack.Screen name={Screens.Chat} component={Chat} />
<Stack.Screen name={Screens.QRCodeGen} component={QRCodeGen} options={{ title: 'QR Code' }} />
<Stack.Screen name={Screens.WhatAreContacts} component={WhatAreContacts} options={{ title: '' }} />
<Stack.Screen
name={Screens.CredentialDetails}
Expand Down
50 changes: 50 additions & 0 deletions packages/legacy/core/App/screens/QRCodeGen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { NavigationProp, ParamListBase } from '@react-navigation/native'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { SafeAreaView, ScrollView, StyleSheet, Text, View } from 'react-native'
import QRCode from 'react-native-qrcode-svg'

import Link from '../components/texts/Link'
import { useTheme } from '../contexts/theme'
import { Screens, Stacks } from '../types/navigators'

interface WhatAreContactsProps {
navigation: NavigationProp<ParamListBase>
}

const QRCodeGen: React.FC<WhatAreContactsProps> = () => {
const { ColorPallet, TextTheme } = useTheme()
const { t } = useTranslation()
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
backgroundColor: ColorPallet.brand.primaryBackground,
},
title: {
...TextTheme.headingTwo,
marginBottom: 15,
},
pageContent: {
marginTop: 30,
paddingLeft: 25,
paddingRight: 25,
},
})

return (
<SafeAreaView style={styles.container}>
<ScrollView
contentContainerStyle={styles.pageContent}
directionalLockEnabled
automaticallyAdjustContentInsets={false}
showsHorizontalScrollIndicator={false}
>
<Text style={styles.title}>Scan the QR Code</Text>
<QRCode value="https://www.npmjs.com/package/react-native-qrcode-svg" size={325} />
</ScrollView>
</SafeAreaView>
)
}

export default QRCodeGen
15 changes: 11 additions & 4 deletions packages/legacy/core/App/screens/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,18 @@ const Settings: React.FC<SettingsProps> = ({ navigation }) => {
.getParent()
?.navigate(Stacks.ContactStack, { screen: Screens.Contacts, params: { navigation: navigation } }),
},
// {
// title: t('Settings.WhatAreContacts'),
// accessibilityLabel: t('Settings.WhatAreContacts'),
// testID: testIdWithKey('WhatAreContacts'),
// onPress: () => navigation.getParent()?.navigate(Stacks.ContactStack, { screen: Screens.WhatAreContacts }),
// value: undefined,
// },
{
title: t('Settings.WhatAreContacts'),
accessibilityLabel: t('Settings.WhatAreContacts'),
testID: testIdWithKey('WhatAreContacts'),
onPress: () => navigation.getParent()?.navigate(Stacks.ContactStack, { screen: Screens.WhatAreContacts }),
title: t('Settings.QRCodeGen'),
accessibilityLabel: t('Settings.QRCodeGen'),
testID: testIdWithKey('QRCodeGen'),
onPress: () => navigation.getParent()?.navigate(Stacks.ContactStack, { screen: Screens.QRCodeGen }),
value: undefined,
},
],
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/types/navigators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export enum Screens {
NameWallet = 'Name Wallet',
RenameContact = 'Rename Contact',
ScanHelp = 'Scan Help',
QRCodeGen = 'Generate QR Code',
}

export enum Stacks {
Expand Down Expand Up @@ -97,6 +98,7 @@ export type ContactStackParams = {
[Screens.ContactDetails]: { connectionId: string }
[Screens.RenameContact]: { connectionId: string }
[Screens.WhatAreContacts]: undefined
[Screens.QRCodeGen]: undefined
[Screens.CredentialDetails]: { credentialId: string }
[Screens.CredentialOffer]: { credentialId: string }
[Screens.ProofDetails]: { recordId: string; isHistory?: boolean }
Expand Down
2 changes: 0 additions & 2 deletions packages/legacy/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
"react-native-orientation-locker": "^1.6.0",
"react-native-permissions": "^3.8.4",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "^3.4.2",
"react-native-safe-area-context": "^3.2.0",
"react-native-scalable-image": "^1.1.0",
"react-native-screens": "^3.24.0",
Expand Down Expand Up @@ -200,7 +199,6 @@
"react-native-orientation-locker": "*",
"react-native-permissions": "^3.8.4",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "^3.4.2",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.24.0",
"react-native-splash-screen": "^3.3.0",
Expand Down
52 changes: 16 additions & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2319,17 +2319,6 @@ __metadata:
languageName: node
linkType: hard

"@babel/plugin-transform-object-assign@npm:^7.16.7":
version: 7.18.6
resolution: "@babel/plugin-transform-object-assign@npm:7.18.6"
dependencies:
"@babel/helper-plugin-utils": ^7.18.6
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: a9738264cc996c54febafa0701c5a182d99afbddbfe9fbcc0b2536e3b2332b3318a8143aacd0368e31e18c24cd1b1980be7a3b0b2e5122efb520952d863a1203
languageName: node
linkType: hard

"@babel/plugin-transform-object-rest-spread@npm:^7.22.15":
version: 7.22.15
resolution: "@babel/plugin-transform-object-rest-spread@npm:7.22.15"
Expand Down Expand Up @@ -3077,7 +3066,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/preset-typescript@npm:^7.16.7, @babel/preset-typescript@npm:^7.17.12":
"@babel/preset-typescript@npm:^7.17.12":
version: 7.21.0
resolution: "@babel/preset-typescript@npm:7.21.0"
dependencies:
Expand Down Expand Up @@ -4074,7 +4063,6 @@ __metadata:
react-native-orientation-locker: ^1.6.0
react-native-permissions: ^3.8.4
react-native-qrcode-svg: ^6.2.0
react-native-reanimated: ^3.4.2
react-native-safe-area-context: ^3.2.0
react-native-scalable-image: ^1.1.0
react-native-screens: ^3.24.0
Expand Down Expand Up @@ -4146,7 +4134,6 @@ __metadata:
react-native-orientation-locker: "*"
react-native-permissions: ^3.8.4
react-native-qrcode-svg: ^6.2.0
react-native-reanimated: ^3.4.2
react-native-safe-area-context: ^3.2.0
react-native-screens: ^3.24.0
react-native-splash-screen: ^3.3.0
Expand Down Expand Up @@ -7543,7 +7530,6 @@ __metadata:
react-native-orientation-locker: ^1.6.0
react-native-permissions: ^3.8.4
react-native-qrcode-svg: ^6.2.0
react-native-reanimated: ^3.4.2
react-native-safe-area-context: ^3.2.0
react-native-scalable-image: ^1.1.0
react-native-screens: ^3.24.0
Expand Down Expand Up @@ -7578,6 +7564,8 @@ __metadata:
lerna: ^6.6.2
npm-run-all: ^4.1.5
prettier: ^2.8.4
react-native-qrcode-svg: ^6.2.0
react-native-svg: ^14.1.0
ts-node: ^10.0.0
typescript: ^5.0.4
languageName: unknown
Expand Down Expand Up @@ -18708,27 +18696,6 @@ __metadata:
languageName: node
linkType: hard

"react-native-reanimated@npm:^3.4.2":
version: 3.5.4
resolution: "react-native-reanimated@npm:3.5.4"
dependencies:
"@babel/plugin-transform-object-assign": ^7.16.7
"@babel/preset-typescript": ^7.16.7
convert-source-map: ^2.0.0
invariant: ^2.2.4
peerDependencies:
"@babel/core": ^7.0.0-0
"@babel/plugin-proposal-nullish-coalescing-operator": ^7.0.0-0
"@babel/plugin-proposal-optional-chaining": ^7.0.0-0
"@babel/plugin-transform-arrow-functions": ^7.0.0-0
"@babel/plugin-transform-shorthand-properties": ^7.0.0-0
"@babel/plugin-transform-template-literals": ^7.0.0-0
react: "*"
react-native: "*"
checksum: 885449b11324f0399128d665c90e7179a095dfa603dd251e8b1d14df2efe73411acd724562837e114366769e69b8aac2b0a2ffc1f63d2b7dbf1a35024f074604
languageName: node
linkType: hard

"react-native-safe-area-context@npm:^3.2.0":
version: 3.4.1
resolution: "react-native-safe-area-context@npm:3.4.1"
Expand Down Expand Up @@ -18811,6 +18778,19 @@ __metadata:
languageName: node
linkType: hard

"react-native-svg@npm:^14.1.0":
version: 14.1.0
resolution: "react-native-svg@npm:14.1.0"
dependencies:
css-select: ^5.1.0
css-tree: ^1.1.3
peerDependencies:
react: "*"
react-native: "*"
checksum: ed94adac9bf3144c5dcbf37a2956ab672d402f11c0ed75cda247d1d9136ce8977f4d01bcfc813ba576bd61ece420d66306c148057e2552828aa8fe9bad173d46
languageName: node
linkType: hard

"react-native-tcp-socket@npm:^6.0.6":
version: 6.0.6
resolution: "react-native-tcp-socket@npm:6.0.6"
Expand Down

0 comments on commit 6de8947

Please sign in to comment.