RegisterV4.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. /**
  2. * 带OTP的注册页面
  3. * @邠心vbe on 2023/02/06
  4. */
  5. import React from 'react';
  6. import { View, Text, ScrollView, StyleSheet, TextInput, Pressable, Image } from 'react-native';
  7. import apiUser from '../../api/apiUser';
  8. import Button from '../../components/Button';
  9. import { PageList } from '../Router';
  10. import Dialog from '../../components/Dialog';
  11. import Modal from 'react-native-modal';
  12. import { RegisterDialog } from '../charge/InfoDialog';
  13. import Dropdown from '../../components/Dropdown';
  14. import ImagePicker from 'react-native-image-crop-picker';
  15. import apiUpload from '../../api/apiUpload';
  16. import { host } from '../../api/http';
  17. import { ModalProps } from '../../components/BottomModal';
  18. import { CountryDropNum, GetCountryList } from '../../components/CountryIcon';
  19. import StrengthView from './StrengthView';
  20. import CheckBox from '../../components/CheckBox';
  21. import { UploadThemes } from '../../components/ThemesConfig';
  22. const options = {
  23. width: 300,
  24. height: 200,
  25. cropping: true,
  26. multiple: false,
  27. mediaType: 'photo',
  28. writeTempFile: false,
  29. compressImageQuality: 0.8,
  30. compressImageMaxWidth: 720,
  31. compressImageMaxHeight: 1280,
  32. ...UploadThemes
  33. }
  34. export default class RegisterV4 extends React.Component {
  35. constructor(props) {
  36. super(props);
  37. this.StrengthView = StrengthView.V2
  38. this.state = {
  39. agree: true,
  40. strength: 0,
  41. countryNum: '65',
  42. countryShow: false,
  43. userInfo: {
  44. email: "",
  45. verificationCode: ""
  46. },
  47. countryNums: [],
  48. wrongCount: 0,
  49. params: {...this.props.route.params},
  50. email: '',
  51. password: '',
  52. fleetCompanyId: '',
  53. sendMinutes: 0,
  54. visible: false,
  55. isFleetDriver: false,
  56. pdvImages: ['', ''],
  57. companyList: []
  58. };
  59. }
  60. componentDidMount() {
  61. //console.log(this.state.params);
  62. if (this.state.params.isFleetUser) {
  63. this.setState({
  64. isFleetDriver: true
  65. })
  66. this.props.navigation.setOptions({
  67. headerTitle: "Fleet / PHV Registration"
  68. })
  69. }
  70. this.getCountryList();
  71. this.getCompanyList();
  72. }
  73. applyStrength(text) {
  74. this.StrengthView.apply(text, strength => {
  75. if (this.state.strength != strength) {
  76. this.setState({
  77. password: text,
  78. strength: strength
  79. });
  80. } else {
  81. this.setState({
  82. password: text
  83. });
  84. }
  85. });
  86. }
  87. changeInfo(key, value) {
  88. var info = this.state.userInfo;
  89. info[key] = value;
  90. this.setState({
  91. 'userInfo': info
  92. });
  93. }
  94. getCountryList() {
  95. GetCountryList(list => {
  96. this.setState({
  97. countryNums: list
  98. })
  99. })
  100. }
  101. getCompanyList() {
  102. apiUser.getConmpany().then(res => {
  103. if (res.data) {
  104. this.setState({
  105. companyList: res.data
  106. })
  107. }
  108. }).catch(err => [
  109. toastShort(err)
  110. ])
  111. }
  112. sendVerification() {
  113. var info = this.state.userInfo;
  114. if (!info.email) {
  115. toastShort('Please enter email address');
  116. return;
  117. }
  118. if (!/^[a-zA-Z0-9]+[\S]+@[a-zA-Z0-9_-]+[\.][\Sa-zA-Z]+$/.test(info.email)) {
  119. toastShort('Email is incorrect format');
  120. return;
  121. }
  122. Dialog.showProgressDialog()
  123. apiUser.sendVerificationCodeV2({email: info.email, type: "register"}).then(res => {
  124. Dialog.dismissLoading()
  125. //this.state.sendMinutes = 60;
  126. this.state.sendMinutes = res.data?.resendTime ?? 60;
  127. toastShort('Send verification code successfully');
  128. this.contdownTime();
  129. }).catch(err => {
  130. Dialog.dismissLoading()
  131. toastShort(err);
  132. });
  133. }
  134. contdownTime() {
  135. if (this.state.sendMinutes > 0) {
  136. this.setState({
  137. sendMinutes: this.state.sendMinutes - 1
  138. })
  139. setTimeout(() => {
  140. this.contdownTime();
  141. }, 1000);
  142. }
  143. }
  144. onRegister() {
  145. //console.log('sign up', this.state);
  146. var info = this.state.userInfo;
  147. if (!info.nickName) {
  148. toastShort('Please enter display name');
  149. return;
  150. }
  151. if (!info.email) {
  152. toastShort('Please enter email address');
  153. return;
  154. }
  155. if (!/^[a-zA-Z0-9]+[\S]+@[a-zA-Z0-9_-]+[\.][\Sa-zA-Z]+$/.test(info.email)) {
  156. toastShort('Email is incorrect format');
  157. return;
  158. }
  159. if (!info.phone) {
  160. toastShort('Please enter contact number');
  161. return;
  162. }
  163. if (!/^\d{6,15}$/.test(info.phone)) {
  164. toastShort('Phone Number is incorrect format');
  165. return;
  166. }
  167. if (!this.state.password) {
  168. toastShort('Please enter password');
  169. return;
  170. }
  171. if (this.state.strength < this.StrengthView.maxStrength) {
  172. toastShort('Password is not strong');
  173. return;
  174. }
  175. if (!info.password) {
  176. toastShort('Please enter confirm password');
  177. return;
  178. }
  179. if (info.password != this.state.password) {
  180. toastShort('The twice passwords are inconsistent');
  181. if (this.state.wrongCount < 3) {
  182. this.setState({
  183. wrongCount: this.state.wrongCount + 1
  184. })
  185. }
  186. return;
  187. }
  188. if (this.state.isFleetDriver) {
  189. if (!info.pdvLicence) {
  190. toastShort('Please enter PDV Licence');
  191. return;
  192. }
  193. if (this.state.pdvImages[0] == '' || this.state.pdvImages[1] == '') {
  194. toastShort('Please upload PDV Licence Photos');
  195. return;
  196. }
  197. }
  198. let param = Object.assign({}, info);
  199. //param.phone = this.state.countryNum + info.phone
  200. param.callingCode = this.state.countryNum;
  201. if (this.state.isFleetDriver) {
  202. param.userType = 'Driver';
  203. param.pdvLicencePictures = this.state.pdvImages;
  204. param.fleetCompanyId = this.state.fleetCompanyId;
  205. } else {
  206. param.userType = 'Public';
  207. }
  208. param.otp = param.verificationCode;
  209. console.log('params', param);
  210. Dialog.showProgressDialog();
  211. apiUser.register(param).then(res => {
  212. Dialog.dismissLoading();
  213. //toastShort('Sign up successfully!');
  214. this.setState({
  215. email: param.email,
  216. visible: true
  217. });
  218. //this.backToLogin();
  219. }).catch(err => {
  220. toastShort(err);
  221. Dialog.dismissLoading();
  222. });
  223. }
  224. getBackTopPosition() {
  225. return isIOS ? statusHeight - 16 : 8;
  226. }
  227. backToLogin() {
  228. if (this.state.params.actionLogin) {
  229. goBack()
  230. startPage(PageList.login);
  231. } else {
  232. goBack();
  233. }
  234. }
  235. uploadImage(index) {
  236. ImagePicker.openPicker(options).then(image => {
  237. if (image.path) {
  238. apiUpload.uploadImage(image.path, image.mime, 'PDVL').then(res => {
  239. if (res.success && res.data.picturePath) {
  240. let imageUrl = this.state.pdvImages;
  241. imageUrl[index] = res.data.picturePath;
  242. this.setState({
  243. pdvImages: imageUrl
  244. });
  245. } else {
  246. toastShort('Upload failed, please retry');
  247. }
  248. }).catch(err => {
  249. toastShort(err);
  250. });
  251. }
  252. }).catch(err => {
  253. //console.log(err);
  254. });
  255. }
  256. changeAgree(ag) {
  257. this.setState({
  258. agree: ag
  259. })
  260. }
  261. hideDialog() {
  262. this.setState({
  263. visible: false
  264. });
  265. this.backToLogin();
  266. }
  267. render() {
  268. return (
  269. <View style={styles.container}>
  270. <ScrollView
  271. style={styles.scollView}
  272. keyboardShouldPersistTaps={'handled'}>
  273. <View style={styles.signView}>
  274. {/* <View style={styles.tabView}>
  275. <Text
  276. style={[
  277. styles.tabText,
  278. this.state.isFleetDriver ? {} : styles.tabActive
  279. ]}
  280. onPress={() => this.changeTab(false)}
  281. >Public Users</Text>
  282. <Text
  283. style={[
  284. styles.tabText,
  285. this.state.isFleetDriver ? styles.tabActive: {}
  286. ]}
  287. onPress={() => this.changeTab(true)}
  288. >Fleet/PH Drivers</Text>
  289. </View> */}
  290. <View style={styles.signInput}>
  291. <Text style={styles.inputLabel}>Display Name</Text>
  292. <TextInput
  293. style={styles.inputView}
  294. placeholder='Display Name'
  295. placeholderTextColor={textPlacehoder}
  296. maxLength={50}
  297. onChangeText={v => this.changeInfo('nickName', v)}
  298. />
  299. </View>
  300. <View style={styles.signInput}>
  301. <Text style={styles.inputLabel}>Email Address</Text>
  302. <TextInput
  303. style={styles.inputView}
  304. placeholder='Email Address'
  305. placeholderTextColor={textPlacehoder}
  306. maxLength={50}
  307. keyboardType="email-address"
  308. textContentType='emailAddress'
  309. onChangeText={v => this.changeInfo('email', v)}
  310. />
  311. </View>
  312. <View style={styles.signInput}>
  313. <Text style={[styles.inputLabel, {flex: 2}]}>Validate Email</Text>
  314. <TextInput
  315. style={[styles.inputView, {flex: 2.2, marginLeft: 2}]}
  316. placeholder='OTP'
  317. placeholderTextColor={textPlacehoder}
  318. maxLength={6}
  319. keyboardType="number-pad"
  320. textContentType="telephoneNumber"
  321. onChangeText={v => this.changeInfo('verificationCode', v)}
  322. />
  323. <Button
  324. text={this.state.sendMinutes > 0 ? (this.state.sendMinutes + " s") : 'EMAIL OTP'}
  325. style={styles.sendBtn}
  326. disabled={this.state.sendMinutes > 0}
  327. viewStyle={styles.sendBtnView}
  328. textStyle={styles.sendBtnText}
  329. onClick={() => this.sendVerification()}
  330. />
  331. </View>
  332. <View style={styles.signInput}>
  333. <Text style={styles.inputLabel}>Phone Number</Text>
  334. <View style={styles.mobileView}>
  335. <View style={styles.dropView}>
  336. <TextInput style={styles.dropInput} editable={false}/>
  337. <Text style={styles.countryText}>{"+" + this.state.countryNum}</Text>
  338. <MaterialIcons name={'arrow-drop-down'} size={24} color={colorDark}/>
  339. <Dropdown
  340. style={styles.dropLayer}
  341. title='Country'
  342. prefixText="+"
  343. list={this.state.countryNums}
  344. value={this.state.countryNum}
  345. nameKey='countryNum'
  346. valueKey='countryNum'
  347. onChange={(value, index)=> {
  348. this.setState({
  349. countryNum: value
  350. })
  351. }}
  352. customerItemView={
  353. (item, index, onClick) =>
  354. <CountryDropNum
  355. key={index}
  356. country={item}
  357. value={this.state.countryNum}
  358. onClick={onClick}/>
  359. }/>
  360. </View>
  361. <TextInput
  362. style={styles.contactView}
  363. placeholder='Mobile Number'
  364. placeholderTextColor={textPlacehoder}
  365. keyboardType='phone-pad'
  366. maxLength={15}
  367. onChangeText={v => this.changeInfo('phone', v)}
  368. />
  369. </View>
  370. </View>
  371. <View style={styles.signInput}>
  372. <Text style={styles.inputLabel}>Create Password</Text>
  373. <TextInput
  374. secureTextEntry={this.state.wrongCount < 3}
  375. style={styles.inputView}
  376. placeholder='Password'
  377. placeholderTextColor={textPlacehoder}
  378. maxLength={20}
  379. onChangeText={(value) => {
  380. this.applyStrength(value);
  381. }}
  382. />
  383. </View>
  384. <View style={styles.signInput}>
  385. <Text style={styles.inputLabel}></Text>
  386. <View style={styles.passwordView}>
  387. <this.StrengthView.VIEW strength={this.state.strength}/>
  388. </View>
  389. </View>
  390. <View style={styles.signInput}>
  391. <Text style={styles.inputLabel}>Confirm Password</Text>
  392. <TextInput
  393. secureTextEntry={this.state.wrongCount < 3}
  394. style={styles.inputView}
  395. placeholder='Password'
  396. placeholderTextColor={textPlacehoder}
  397. maxLength={20}
  398. onChangeText={v => this.changeInfo('password', v)}
  399. />
  400. </View>
  401. { this.state.isFleetDriver &&
  402. <>
  403. <View style={styles.signInput}>
  404. <Text style={styles.inputLabel}>Your Company</Text>
  405. <Dropdown
  406. style={[styles.inputView, ui.flexc]}
  407. title='Company'
  408. list={this.state.companyList}
  409. value={this.state.fleetCompanyId}
  410. valueKey='fleetCompanyId'
  411. nameKey='fleetCompanyName'
  412. onChange={(value, index)=> {
  413. this.setState({
  414. fleetCompanyId: value
  415. })
  416. }}/>
  417. </View>
  418. <View style={styles.signInput}>
  419. <Text style={styles.inputLabel}>{'PDV Licence'}</Text>
  420. <TextInput
  421. style={styles.inputView}
  422. placeholder='PH Driver Vocational Licence'
  423. placeholderTextColor={textPlacehoder}
  424. maxLength={20}
  425. onChangeText={v => this.changeInfo('pdvLicence', v)}
  426. />
  427. </View>
  428. <View style={styles.signInput}>
  429. <Text style={styles.inputLabel}>{' PDV Photos\n(Front & Back)'}</Text>
  430. <View style={styles.uploadGroup}>
  431. { this.state.pdvImages.map((item, index) => (
  432. <UploadView
  433. key={index}
  434. onPress={() => this.uploadImage(index)}
  435. url={item}/>
  436. ))
  437. }
  438. </View>
  439. </View>
  440. </>
  441. }
  442. {/* <View style={styles.referView}>
  443. <Text style={styles.referTitle}>Have a referral code?</Text>
  444. <View style={styles.referText}>
  445. <Text>You'll get</Text>
  446. <Text style={styles.weight}>$5</Text>
  447. <Text>Credit as registration bonus!</Text>
  448. </View>
  449. <View style={styles.codeView}>
  450. <Text style={{ color: textPrimary, fontSize: 16 }}>Referral Code</Text>
  451. <TextInput
  452. style={styles.codeText}
  453. maxLength={6}
  454. placeholder='Referral Code'
  455. placeholderTextColor={textPlacehoder}
  456. onChangeText={v => this.changeInfo('referralCode', v)}
  457. />
  458. </View>
  459. </View> */}
  460. <View style={styles.agreeView}>
  461. <CheckBox
  462. value={this.state.agree}
  463. onValueChange={v => this.changeAgree(v)}
  464. />
  465. <View style={styles.agreeTextRow}>
  466. <Text style={styles.agreeText} onPress={() => this.changeAgree(!this.state.agree)}>
  467. {'I have read and I agree with the '}
  468. </Text>
  469. <Text style={styles.agreeLink} onPress={() => startPage(PageList.condition)}>Terms of Use</Text>
  470. <Text style={styles.agreeText}>{' '}</Text>
  471. <Text style={styles.agreeText}>{'and '}</Text>
  472. <Text style={styles.agreeLink} onPress={() => startPage(PageList.privacy)}>Privacy Policy</Text>
  473. <Text style={styles.agreeText}>.</Text>
  474. </View>
  475. </View>
  476. <Button
  477. style={styles.signButton}
  478. elevation={1.5}
  479. disabled={!this.state.agree}
  480. text='SIGN UP'
  481. fontSize={14}
  482. onClick={() => {
  483. this.onRegister();
  484. }}
  485. />
  486. </View>
  487. </ScrollView>
  488. <Modal
  489. isVisible={this.state.visible}
  490. onBackButtonPress={() => this.hideDialog()}
  491. {...ModalProps}>
  492. <RegisterDialog
  493. address={this.state.email}
  494. onClose={() => this.hideDialog()}
  495. />
  496. </Modal>
  497. </View>
  498. );
  499. }
  500. }
  501. const UploadView = ({url, onPress}) => (
  502. <Pressable
  503. style={styles.uploadView}
  504. onPress={onPress}>
  505. { url == ''
  506. ? <Image
  507. style={styles.uploadIcon}
  508. source={require('../../images/icon/ic-add-photo.png')}/>
  509. : <Image
  510. style={styles.uploadIcon}
  511. defaultSource={require('../../images/icon/icon-upload-default.png')}
  512. source={{uri: host + url}}/>
  513. }
  514. </Pressable>
  515. )
  516. const styles = StyleSheet.create({
  517. container: {
  518. flex: 1,
  519. backgroundColor: colorLight
  520. },
  521. header: {
  522. paddingTop: 56,
  523. backgroundColor: colorAccent
  524. },
  525. backView: {
  526. top: 12,
  527. zIndex: 5,
  528. padding: 16,
  529. position: 'absolute',
  530. flexDirection: 'row'
  531. },
  532. backButton: {
  533. borderRadius: 60,
  534. backgroundColor: colorLight
  535. },
  536. backButtonView: {
  537. height: 43,
  538. paddingLeft: 16,
  539. paddingRight: 16,
  540. alignItems: 'center',
  541. flexDirection: 'row'
  542. },
  543. scollView: {
  544. flex: 1
  545. },
  546. logoView: {
  547. paddingTop: 32,
  548. paddingBottom: 56,
  549. alignItems: 'center'
  550. },
  551. logoImg: {
  552. width:165.09,
  553. height: 51.94,
  554. },
  555. signView: {
  556. flex: 1,
  557. padding: 16,
  558. //marginTop: -30,
  559. borderTopLeftRadius: 20,
  560. borderTopRightRadius: 20,
  561. backgroundColor: colorLight
  562. },
  563. tabView: {
  564. marginBottom: 4,
  565. borderWidth: 1,
  566. borderRadius: 6,
  567. overflow: 'hidden',
  568. alignItems: 'center',
  569. flexDirection: 'row',
  570. borderColor: colorAccent,
  571. },
  572. tabText: {
  573. flex: 1,
  574. color: textPrimary,
  575. fontSize: 15,
  576. textAlign: 'center',
  577. ...$padding(10, 0),
  578. },
  579. tabActive: {
  580. fontWeight: 'bold',
  581. backgroundColor: colorAccent
  582. },
  583. title: {
  584. color: textPrimary,
  585. fontSize: 18,
  586. fontWeight: '700',
  587. paddingTop: 4,
  588. paddingBottom: 6,
  589. },
  590. signInput: {
  591. marginTop: 16,
  592. alignItems: 'center',
  593. flexDirection: 'row'
  594. },
  595. inputLabel: {
  596. flex: 1,
  597. color: textPrimary,
  598. fontSize: 14,
  599. marginRight: 4
  600. },
  601. inputView: {
  602. flex: 2,
  603. color: textPrimary,
  604. fontSize: 14,
  605. borderRadius: 5,
  606. minHeight: 40,
  607. paddingTop: 6,
  608. paddingLeft: 12,
  609. paddingRight: 12,
  610. paddingBottom: 6,
  611. backgroundColor: '#F5F5F5'
  612. },
  613. mobileView: {
  614. flex: 2,
  615. marginLeft: -12,
  616. alignItems: 'center',
  617. flexDirection: 'row'
  618. },
  619. dropView: {
  620. fontSize: 16,
  621. borderRadius: 4,
  622. paddingRight: 4,
  623. flexDirection: 'row',
  624. alignItems: 'center',
  625. backgroundColor: '#F5F5F5'
  626. },
  627. dropInput: {
  628. width: 12,
  629. padding: 6,
  630. color: textPrimary,
  631. minHeight: 40,
  632. },
  633. countryText: {
  634. color: textPrimary,
  635. fontSize: 14,
  636. paddingRight: 4
  637. },
  638. dropLayer: {
  639. left: 0,
  640. right: 0,
  641. opacity: 0,
  642. position: 'absolute'
  643. },
  644. contactView: {
  645. flex: 1,
  646. color: textPrimary,
  647. fontSize: 15,
  648. borderRadius: 4,
  649. minHeight: 40,
  650. paddingTop: 6,
  651. paddingLeft: 12,
  652. paddingRight: 12,
  653. paddingBottom: 6,
  654. marginLeft: 10,
  655. backgroundColor: '#F5F5F5'
  656. },
  657. passwordView: {
  658. flex: 2,
  659. marginTop: -8,
  660. },
  661. referView: {
  662. padding: 16,
  663. marginTop: 24,
  664. borderRadius: 6,
  665. alignItems: 'center',
  666. backgroundColor: '#F5F5F5'
  667. },
  668. referTitle: {
  669. color: textPrimary,
  670. fontSize: 18,
  671. fontWeight: 'bold'
  672. },
  673. referText: {
  674. color: textPrimary,
  675. paddingTop: 4,
  676. alignItems: 'flex-end',
  677. flexDirection: 'row'
  678. },
  679. weight: {
  680. fontSize: 18,
  681. paddingLeft: 4,
  682. paddingRight: 4,
  683. color: colorAccent,
  684. fontWeight: 'bold'
  685. },
  686. codeView: {
  687. paddingTop: 16,
  688. alignItems: 'center',
  689. flexDirection: 'row'
  690. },
  691. codeText: {
  692. color: textPrimary,
  693. fontSize: 16,
  694. paddingTop: 6,
  695. paddingLeft: 12,
  696. paddingRight: 12,
  697. paddingBottom: 6,
  698. minHeight: 40,
  699. marginLeft: 16,
  700. borderRadius: 6,
  701. textAlign: 'center',
  702. backgroundColor: colorLight
  703. },
  704. signButton: {
  705. marginTop: 24,
  706. marginBottom: 8,
  707. },
  708. uploadGroup: {
  709. flex: 2,
  710. alignItems: 'center',
  711. flexDirection: 'row',
  712. justifyContent: 'center'
  713. },
  714. uploadView: {
  715. flex: 1,
  716. alignItems: 'center'
  717. },
  718. uploadIcon: {
  719. width: $vw(28),
  720. height: $vw(28),
  721. borderRadius: 6
  722. },
  723. agreeView: {
  724. marginTop: 24,
  725. marginBottom: 16,
  726. flexDirection: 'row',
  727. alignItems: 'flex-start',
  728. },
  729. agreeTextRow: {
  730. flex: 1,
  731. paddingTop: 4,
  732. paddingLeft: 8,
  733. flexWrap: 'wrap',
  734. flexDirection: 'row'
  735. },
  736. agreeText: {
  737. color: textPrimary,
  738. fontSize: 14,
  739. paddingTop: 2,
  740. paddingBottom: 2
  741. },
  742. agreeLink: {
  743. ...ui.link,
  744. fontSize: 14,
  745. paddingTop: 2,
  746. paddingBottom: 2,
  747. textDecorationLine: 'underline'
  748. },
  749. sendBtn: {
  750. flex: 1.8,
  751. marginLeft: 6,
  752. marginRight: 0,
  753. borderRadius: 6
  754. },
  755. sendBtnView: {
  756. flex: 1,
  757. height: 40,
  758. paddingLeft: 4,
  759. paddingRight: 4,
  760. alignItems: 'center',
  761. justifyContent: 'center'
  762. },
  763. sendBtnText: {
  764. color: colorLight,
  765. fontSize: 13,
  766. fontWeight: 'bold'
  767. },
  768. });