Skip to content

Commit

Permalink
feat: change proof req buttons and add new modal (openwallet-foundati…
Browse files Browse the repository at this point in the history
…on#1122)

Signed-off-by: Bryce McMath <[email protected]>
  • Loading branch information
bryce-mcmath authored Mar 26, 2024
1 parent 0a4903c commit 29c94f4
Show file tree
Hide file tree
Showing 11 changed files with 378 additions and 43 deletions.
36 changes: 36 additions & 0 deletions packages/legacy/core/App/assets/img/no_information_shared.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions packages/legacy/core/App/components/modals/ProofCancelModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import { Modal, ScrollView, StyleSheet, View, Text } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'

import { useTheme } from '../../contexts/theme'
import { GenericFn } from '../../types/fn'
import { testIdWithKey } from '../../utils/testable'
import Button, { ButtonType } from '../buttons/Button'

interface ProofCancelModalProps {
visible?: boolean
onDone?: GenericFn
}

const ProofCancelModal: React.FC<ProofCancelModalProps> = ({ visible, onDone }) => {
const { t } = useTranslation()
const { ColorPallet, TextTheme, Assets } = useTheme()

const styles = StyleSheet.create({
safeAreaView: {
backgroundColor: ColorPallet.brand.modalPrimaryBackground,
flex: 1,
},
container: {
flexGrow: 1,
padding: 20,
},
controlsContainer: {
marginHorizontal: 20,
marginBottom: 10,
},
content: {
justifyContent: 'space-around',
},
heading: {
...TextTheme.modalHeadingOne,
marginTop: 60,
marginBottom: 30,
textAlign: 'center',
},
image: {
alignSelf: 'center',
marginBottom: 50,
},
subtext: {
...TextTheme.modalNormal,
fontSize: 22,
textAlign: 'center',
},
})

return (
<Modal visible={visible} animationType="slide">
<SafeAreaView style={styles.safeAreaView}>
<ScrollView style={styles.container}>
<View style={styles.content}>
<Text style={styles.heading}>{t('ProofRequest.NoInfoShared')}</Text>
<Assets.svg.noInfoShared style={styles.image} height={200} />
<Text style={styles.subtext}>{t('ProofRequest.YourInfo')}</Text>
</View>
</ScrollView>
<View style={styles.controlsContainer}>
<View style={{ paddingTop: 10 }}>
<Button
title={t('Global.Done')}
accessibilityLabel={t('Global.Done')}
testID={testIdWithKey('Done')}
onPress={onDone}
buttonType={ButtonType.ModalPrimary}
/>
</View>
</View>
</SafeAreaView>
</Modal>
)
}

export default ProofCancelModal
2 changes: 2 additions & 0 deletions packages/legacy/core/App/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ const translation = {
"DeclineBulletPoint1": "Organizations and services require that you prove you're eligible to continue with their service or access.",
"DeclineBulletPoint2": "In order to receive the proof request again, you will need to restart the process with the service.",
"DeclineBulletPoint3": "Are you sure you want to decline this proof request?",
"NoInfoShared": "No information was shared",
"YourInfo": "Your information was not shared",
},
"Settings": {
"Version": "Version",
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ const translation = {
"DeclineBulletPoint1": "Les organisations et les services exigent que vous prouviez que vous êtes éligible pour continuer avec leur service ou leur accès.",
"DeclineBulletPoint2": "Afin de recevoir à nouveau la demande de preuve, vous devrez relancer le processus avec le service.",
"DeclineBulletPoint3": "Etes-vous sûr vous voulez refuser cette demande de preuve?",
"NoInfoShared": "No information was shared (FR)",
"YourInfo": "Your information was not shared (FR)",
},
"Settings": {
"Version": "Version",
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/localization/pt-br/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ const translation = {
"DeclineBulletPoint1": "Organizações e serviços requerem que você prove que é elegível para continuar com os serviços ou acessos delas.",
"DeclineBulletPoint2": "Para obter a requisição de prova novamente, você precisará iniciar novamente o processo com o serviço.",
"DeclineBulletPoint3": "Você tem certeza que quer recusar esta requisição de prova?",
"NoInfoShared": "No information was shared (PT-BR)",
"YourInfo": "Your information was not shared (PT-BR)",
},
"Settings": {
"Version": "Versão",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const DefaultScreenOptionsDictionary: ScreenOptionsType = {
},
[Screens.Developer]: {
headerTintColor: OnboardingTheme.headerTintColor,
headerShown: false,
headerBackTestID: testIdWithKey('Back'),
},
[Screens.UsePushNotifications]: {
Expand Down
Loading

0 comments on commit 29c94f4

Please sign in to comment.