Skip to content

Commit

Permalink
Ajout des contacts dans la section plus (#196)
Browse files Browse the repository at this point in the history
Signed-off-by: ClaudeArs <[email protected]>
  • Loading branch information
ClaudeArs authored Jan 10, 2025
1 parent 298641d commit 605c185
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ SPEC CHECKSUMS:
anoncreds: 045f191123bb20d7dcdc2f7c19df57ae30c427f6
aries-askar: 3a78d5cfc8faedbfc55a9ff35e2309fc4574a147
BEMCheckBox: 5ba6e37ade3d3657b36caecc35c8b75c6c2b1a4e
boost: 7dcd2de282d72e344012f7d6564d024930a6a440
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CatCrypto: a477899b6be4954e75be4897e732da098cc0a5a8
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
Expand Down
1 change: 1 addition & 0 deletions app/src/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ const translation = {
PageTitle: 'More options',
ButtonParamsApp: 'Application Settings',
ButtonHelpCenter: 'Help Center',
ButtonContacts: 'Contacts',
ButtonAbout: 'About',
TitleSupport: 'Customer Support',
DetailSupport: 'You have a problem with the application or questions, you can contact the team.',
Expand Down
1 change: 1 addition & 0 deletions app/src/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ const translation = {
ButtonParamsApp: "Paramètres de l'application",
ButtonHelpCenter: "Centre d'aide",
ButtonAbout: 'À propos',
ButtonContacts: 'Contacts',
TitleSupport: 'Soutien à la clientèle',
DetailSupport: "Vous avez un problème avec l'application ou des questions, vous pouvez joundre l'équipe.",
JoinUsTitle: 'Nous Joindre',
Expand Down
8 changes: 8 additions & 0 deletions app/src/navigators/PlusStack.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useTheme } from '@hyperledger/aries-bifold-core'
import { useDefaultStackOptions } from '@hyperledger/aries-bifold-core/App/navigators/defaultStackOptions'
import ListContacts from '@hyperledger/aries-bifold-core/App/screens/ListContacts'
import { createStackNavigator } from '@react-navigation/stack'
import React from 'react'
import { useTranslation } from 'react-i18next'
Expand All @@ -26,6 +27,13 @@ const PlusStack: React.FC = () => {
title: t('Screens.OptionsPlus'),
}}
/>
<StackPlus.Screen
name={Screens.Contacts}
component={ListContacts}
options={{
title: t('Screens.Contacts'),
}}
/>
<StackPlus.Screen
name={Stacks.SettingsStack}
component={SettingStack}
Expand Down
2 changes: 2 additions & 0 deletions app/src/navigators/navigators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export enum Screens {
HelpCenter = 'Help Center',
HelpCenterPage = 'Help Center Page',
About = 'About',
Contacts = 'Contacts',
}

export enum Stacks {
Expand Down Expand Up @@ -106,6 +107,7 @@ export type ActivitiesStackParams = {

export type OptionsPlusStackParams = {
[Screens.OptionsPlus]: undefined
[Screens.Contacts]: undefined
[Stacks.SettingsStack]: NavigatorScreenParams<SettingStackParams>
[Stacks.HelpCenterStack]: NavigatorScreenParams<HelpCenterStackParams>
[Stacks.AboutStack]: NavigatorScreenParams<AboutStackParams>
Expand Down
16 changes: 13 additions & 3 deletions app/src/screens/Plus.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { useTheme, Button, ButtonType, testIdWithKey } from '@hyperledger/aries-bifold-core'
import { useNavigation } from '@react-navigation/native'
import { StackNavigationProp } from '@react-navigation/stack'
import { StackNavigationProp, StackScreenProps } from '@react-navigation/stack'
import { useTranslation } from 'react-i18next'
import { ScrollView, StyleSheet, Text, View } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'

import ContactUs from '../components/ContactUs'
import { SettingStackParams, Stacks, Screens } from '../navigators/navigators'
import { SettingStackParams, OptionsPlusStackParams, Stacks, Screens } from '../navigators/navigators'
type OptionsPlusProps = StackScreenProps<OptionsPlusStackParams>

const Plus: React.FC = () => {
const Plus: React.FC<OptionsPlusProps> = ({ navigation }) => {
const { ColorPallet, TextTheme } = useTheme()
const { t } = useTranslation()
const { navigate } = useNavigation<StackNavigationProp<SettingStackParams>>()
Expand Down Expand Up @@ -91,6 +92,15 @@ const Plus: React.FC = () => {
<ScrollView contentContainerStyle={styles.scroll}>
<View style={styles.innerContainer}>
<View style={styles.mainSection}>
<View style={styles.button}>
<Button
buttonType={ButtonType.Secondary}
testID={testIdWithKey('AppContacts')}
accessibilityLabel={t('OptionsPlus.ButtonContacts')}
title={t('OptionsPlus.ButtonContacts')}
onPress={() => navigation.navigate(Screens.Contacts)}
/>
</View>
<View style={styles.button}>
<Button
buttonType={ButtonType.Secondary}
Expand Down

0 comments on commit 605c185

Please sign in to comment.