An ATproto social media client -- with an independent Appview.
at main 103 lines 3.1 kB view raw
1import {View} from 'react-native' 2import {msg, Trans} from '@lingui/macro' 3import {useLingui} from '@lingui/react' 4 5import {atoms as a, platform, tokens, useBreakpoints, useTheme} from '#/alf' 6import {Button, ButtonText} from '#/components/Button' 7import {useDialogContext} from '#/components/Dialog' 8import { 9 ScreenID, 10 type ScreenProps, 11} from '#/components/dialogs/EmailDialog/types' 12import {Divider} from '#/components/Divider' 13import {GradientFill} from '#/components/GradientFill' 14import {ShieldCheck_Stroke2_Corner0_Rounded as ShieldIcon} from '#/components/icons/Shield' 15import {Text} from '#/components/Typography' 16 17export function VerificationReminder({ 18 showScreen, 19}: ScreenProps<ScreenID.VerificationReminder>) { 20 const t = useTheme() 21 const {_} = useLingui() 22 const {gtPhone, gtMobile} = useBreakpoints() 23 const control = useDialogContext() 24 25 const dialogPadding = gtMobile ? a.p_2xl.padding : a.p_xl.padding 26 27 return ( 28 <View style={[a.gap_lg]}> 29 <View 30 style={[ 31 a.absolute, 32 { 33 top: platform({web: dialogPadding, default: a.p_2xl.padding}) * -1, 34 left: dialogPadding * -1, 35 right: dialogPadding * -1, 36 height: 150, 37 }, 38 ]}> 39 <View 40 style={[ 41 a.absolute, 42 a.inset_0, 43 a.align_center, 44 a.justify_center, 45 a.overflow_hidden, 46 a.pt_md, 47 t.atoms.bg_contrast_100, 48 { 49 borderTopLeftRadius: a.rounded_md.borderRadius, 50 borderTopRightRadius: a.rounded_md.borderRadius, 51 }, 52 ]}> 53 <GradientFill gradient={tokens.gradients.primary} /> 54 <ShieldIcon width={64} fill="white" style={[a.z_10]} /> 55 </View> 56 </View> 57 58 <View style={[a.mb_xs, {height: 150 - dialogPadding}]} /> 59 60 <View style={[a.gap_sm]}> 61 <Text style={[a.text_xl, a.font_heavy]}> 62 <Trans>Please verify your email</Trans> 63 </Text> 64 <Text style={[a.text_sm, a.leading_snug, t.atoms.text_contrast_medium]}> 65 <Trans> 66 Your email has not yet been verified. Please verify your email in 67 order to enjoy all the features of Bluesky. 68 </Trans> 69 </Text> 70 </View> 71 72 <Divider /> 73 74 <View style={[a.gap_sm, gtPhone && [a.flex_row_reverse]]}> 75 <Button 76 label={_(msg`Get started`)} 77 variant="solid" 78 color="primary" 79 size="large" 80 onPress={() => 81 showScreen({ 82 id: ScreenID.Verify, 83 }) 84 }> 85 <ButtonText> 86 <Trans>Get started</Trans> 87 </ButtonText> 88 </Button> 89 <Button 90 label={_(msg`Maybe later`)} 91 accessibilityHint={_(msg`Snoozes the reminder`)} 92 variant="ghost" 93 color="secondary" 94 size="large" 95 onPress={() => control.close()}> 96 <ButtonText> 97 <Trans>Maybe later</Trans> 98 </ButtonText> 99 </Button> 100 </View> 101 </View> 102 ) 103}