-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19508 from Expensify/nikki-emaildeliveryissue
Add EmailDeliveryFailure view
- Loading branch information
Showing
4 changed files
with
144 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -776,6 +776,16 @@ export default { | |
linkSent: 'Link sent!', | ||
succesfullyUnlinkedLogin: 'Secondary login successfully unlinked!', | ||
}, | ||
emailDeliveryFailurePage: { | ||
ourEmailProvider: ({login}) => `Our email provider has temporarily suspended emails to ${login} due to delivery issues. To unblock your login, please follow these steps:`, | ||
confirmThat: ({login}) => `Confirm that ${login} is spelled correctly and is a real, deliverable email address. `, | ||
emailAliases: 'Email aliases such as "[email protected]" must have access to their own email inbox for it to be a valid Expensify login.', | ||
ensureYourEmailClient: 'Ensure your email client allows expensify.com emails. ', | ||
youCanFindDirections: 'You can find directions on how to complete this step ', | ||
helpConfigure: ' but you may need your IT department to help configure your email settings.', | ||
onceTheAbove: 'Once the above steps are completed, please reach out to ', | ||
toUnblock: ' to unblock your login.', | ||
}, | ||
detailsPage: { | ||
localTime: 'Local time', | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -778,6 +778,18 @@ export default { | |
linkSent: '¡Enlace enviado!', | ||
succesfullyUnlinkedLogin: '¡Nombre de usuario secundario desvinculado correctamente!', | ||
}, | ||
emailDeliveryFailurePage: { | ||
ourEmailProvider: ({login}) => | ||
`Nuestro proveedor de correo electrónico ha suspendido temporalmente los correos electrónicos a ${login} debido a problemas de entrega. Para desbloquear el inicio de sesión, sigue estos pasos:`, | ||
confirmThat: ({login}) => `Confirma que ${login} está escrito correctamente y que es una dirección de correo electrónico real que puede recibir correos. `, | ||
emailAliases: | ||
'Los alias de correo electrónico como "[email protected]" deben tener acceso a su propia bandeja de entrada de correo electrónico para que sea un inicio de sesión válido de Expensify.', | ||
ensureYourEmailClient: 'Asegúrese de que su cliente de correo electrónico permita correos electrónicos de expensify.com. ', | ||
youCanFindDirections: 'Puedes encontrar instrucciones sobre cómo completar este paso ', | ||
helpConfigure: ', pero es posible que necesites que el departamento de informática te ayude a configurar los ajustes de correo electrónico.', | ||
onceTheAbove: 'Una vez completados los pasos anteriores, ponte en contacto con ', | ||
toUnblock: ' para desbloquear el inicio de sesión.', | ||
}, | ||
detailsPage: { | ||
localTime: 'Hora local', | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import React, {useEffect} from 'react'; | ||
import {Keyboard, View} from 'react-native'; | ||
import {withOnyx} from 'react-native-onyx'; | ||
import PropTypes from 'prop-types'; | ||
import Str from 'expensify-common/lib/str'; | ||
import styles from '../../styles/styles'; | ||
import Text from '../../components/Text'; | ||
import TextLink from '../../components/TextLink'; | ||
import ONYXKEYS from '../../ONYXKEYS'; | ||
import useLocalize from '../../hooks/useLocalize'; | ||
import useKeyboardState from '../../hooks/useKeyboardState'; | ||
import redirectToSignIn from '../../libs/actions/SignInRedirect'; | ||
import CONST from '../../CONST'; | ||
import PressableWithFeedback from '../../components/Pressable/PressableWithFeedback'; | ||
|
||
const propTypes = { | ||
/* Onyx Props */ | ||
|
||
/** The credentials of the logged in person */ | ||
credentials: PropTypes.shape({ | ||
/** The email/phone the user logged in with */ | ||
login: PropTypes.string, | ||
}), | ||
}; | ||
|
||
const defaultProps = { | ||
credentials: {}, | ||
}; | ||
|
||
function EmailDeliveryFailurePage(props) { | ||
const {isKeyboardShown} = useKeyboardState(); | ||
const {translate} = useLocalize(); | ||
const login = Str.isSMSLogin(props.credentials.login) ? Str.removeSMSDomain(props.credentials.login) : props.credentials.login; | ||
|
||
// This view doesn't have a field for user input, so dismiss the device keyboard if shown | ||
useEffect(() => { | ||
if (!isKeyboardShown) { | ||
return; | ||
} | ||
Keyboard.dismiss(); | ||
}, [isKeyboardShown]); | ||
|
||
return ( | ||
<> | ||
<View style={[styles.mv3, styles.flexRow, styles.justifyContentetween]}> | ||
<View style={[styles.flex1]}> | ||
<Text>{translate('emailDeliveryFailurePage.ourEmailProvider', {login})}</Text> | ||
<Text style={[styles.mt5]}> | ||
<Text style={[styles.textStrong]}>{translate('emailDeliveryFailurePage.confirmThat', {login})}</Text> | ||
{translate('emailDeliveryFailurePage.emailAliases')} | ||
</Text> | ||
<Text style={[styles.mt5]}> | ||
<Text style={[styles.textStrong]}>{translate('emailDeliveryFailurePage.ensureYourEmailClient')}</Text> | ||
{translate('emailDeliveryFailurePage.youCanFindDirections')} | ||
<TextLink | ||
href="https://community.expensify.com/discussion/5651/deep-dive-best-practices-when-youre-running-into-trouble-receiving-emails-from-expensify/p1?new=1" | ||
style={[styles.link]} | ||
> | ||
{translate('common.here')} | ||
</TextLink> | ||
{translate('emailDeliveryFailurePage.helpConfigure')} | ||
</Text> | ||
<Text style={styles.mt5}> | ||
{translate('emailDeliveryFailurePage.onceTheAbove')} | ||
<TextLink | ||
href={`mailto:${CONST.EMAIL.CONCIERGE}`} | ||
style={[styles.link]} | ||
> | ||
{CONST.EMAIL.CONCIERGE} | ||
</TextLink> | ||
{translate('emailDeliveryFailurePage.toUnblock')} | ||
</Text> | ||
</View> | ||
</View> | ||
<View style={[styles.mv4, styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter]}> | ||
<PressableWithFeedback | ||
onPress={() => redirectToSignIn()} | ||
accessibilityRole="button" | ||
accessibilityLabel={translate('common.back')} | ||
// disable hover dim for switch | ||
hoverDimmingValue={1} | ||
pressDimmingValue={0.2} | ||
> | ||
<Text style={[styles.link]}>{translate('common.back')}</Text> | ||
</PressableWithFeedback> | ||
</View> | ||
</> | ||
); | ||
} | ||
|
||
EmailDeliveryFailurePage.propTypes = propTypes; | ||
EmailDeliveryFailurePage.defaultProps = defaultProps; | ||
EmailDeliveryFailurePage.displayName = 'EmailDeliveryFailurePage'; | ||
|
||
export default withOnyx({ | ||
credentials: {key: ONYXKEYS.CREDENTIALS}, | ||
})(EmailDeliveryFailurePage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters