App.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. /**
  2. * Copyright (c) UNA, Inc - https://una.io
  3. * MIT License - https://opensource.org/licenses/MIT
  4. */
  5. import React, { Component } from 'react';
  6. import OneSignal from 'react-native-onesignal';
  7. import SplashScreen from 'react-native-splash-screen';
  8. import { WebView } from 'react-native-webview';
  9. import {
  10. Platform,
  11. StyleSheet,
  12. StyleProvider,
  13. Image,
  14. Linking,
  15. BackHandler,
  16. ActivityIndicator,
  17. Dimensions,
  18. StatusBar,
  19. } from 'react-native';
  20. import {
  21. View,
  22. Container, Content,
  23. Header, Title, Left, Body, Right, Item, Input,
  24. Footer, FooterTab, Badge,
  25. Text, Icon, Button,
  26. Drawer,
  27. } from 'native-base';
  28. import { initialMode, useDarkMode, DynamicStyleSheet, DynamicValue, useDynamicStyleSheet, eventEmitter } from 'react-native-dark-mode';
  29. import JitsiMeet, { JitsiMeetView } from 'react-native-jitsi-meet';
  30. import VideoCall from './VideoCall';
  31. import { version } from './package.json';
  32. type Props = {};
  33. const BASE_URL = 'https://una.io/';
  34. const MIX_LIGHT = '12';
  35. const MIX_DARK = '13';
  36. const TEMPLATE = 'protean';
  37. const TITLE = 'UNA.IO';
  38. const ONESIGNALAPPID = '';
  39. export default class App extends Component<Props> {
  40. loading = false;
  41. videoCallAudio = false;
  42. mode = initialMode;
  43. constructor(props) {
  44. super(props);
  45. this.state = {
  46. url: `${BASE_URL}?skin=${TEMPLATE}&mix=${'dark' == this.mode ? MIX_DARK : MIX_LIGHT}`,
  47. status: 'No Page Loaded',
  48. backButtonEnabled: false,
  49. forwardButtonEnabled: false,
  50. loading: this.loading,
  51. data: {},
  52. searchbar: false,
  53. key: 1,
  54. videoCall: 0,
  55. videoCallUri: false,
  56. };
  57. this.onBack.bind(this);
  58. this.onMainMenu.bind(this);
  59. this.onConferenceTerminated = this.onConferenceTerminated.bind(this);
  60. this.onConferenceJoined = this.onConferenceJoined.bind(this);
  61. this.onConferenceWillJoin = this.onConferenceWillJoin.bind(this);
  62. this.onVideoCallStart = this.onVideoCallStart.bind(this);
  63. eventEmitter.on('currentModeChanged', this.onModeChanged.bind(this));
  64. }
  65. onModeChanged(newMode) {
  66. this.mode = newMode;
  67. this.setState ({
  68. key: this.state.key + 1,
  69. });
  70. }
  71. onConferenceTerminated(e) {
  72. this.endVideoCall();
  73. this.injectJavaScript("bx_mobile_apps_video_terminated(" + JSON.stringify(e.nativeEvent) + ")");
  74. }
  75. onConferenceJoined(e) {
  76. this.injectJavaScript("bx_mobile_apps_video_joined(" + JSON.stringify(e.nativeEvent) + ")");
  77. }
  78. onConferenceWillJoin(e) {
  79. this.injectJavaScript("bx_mobile_apps_video_will_join(" + JSON.stringify(e.nativeEvent) + ")");
  80. }
  81. endVideoCall() {
  82. this.videoCallAudio = false;
  83. this.setState ({
  84. videoCall: 0,
  85. videoCallUri: false,
  86. });
  87. JitsiMeet.endCall();
  88. }
  89. onVideoCallStart(sUri, bAudioOnly = false) {
  90. if (!this.state.videoCall) {
  91. this.videoCallAudio = bAudioOnly;
  92. this.setState ({
  93. videoCall: 1,
  94. videoCallUri: sUri,
  95. });
  96. }
  97. }
  98. onVideoCallToggle() {
  99. if (this.state.videoCall) {
  100. this.endVideoCall();
  101. }
  102. else {
  103. this.onVideoCallStart('testing-egr58t32g2');
  104. }
  105. }
  106. onBack() {
  107. this.endVideoCall();
  108. if (this.state.backButtonEnabled) {
  109. if ('android' === Platform.OS)
  110. this.onWebViewLoadStart(); // show loading screen
  111. this.refs.webView1.goBack();
  112. // this.injectJavaScript("window.history.go(-1)");
  113. return true;
  114. }
  115. return false;
  116. }
  117. onMainMenu() {
  118. this.endVideoCall();
  119. if (this.state.data.loggedin)
  120. this.injectJavaScript("bx_mobile_apps_show_main_menu()");
  121. else
  122. this.drawerOpen();
  123. }
  124. onBackAndMainMenu() {
  125. if (this.state.backButtonEnabled) {
  126. return this.onBack();
  127. }
  128. else {
  129. return this.onMainMenu();
  130. }
  131. }
  132. onProfileMenu() {
  133. this.endVideoCall();
  134. this.injectJavaScript("bx_mobile_apps_show_profile_menu()");
  135. return true;
  136. }
  137. onAddMenu() {
  138. this.endVideoCall();
  139. this.injectJavaScript("bx_mobile_apps_show_add_menu()");
  140. return true;
  141. }
  142. onNotificationsMenu() {
  143. this.endVideoCall();
  144. this.injectJavaScript("bx_mobile_apps_show_notifications_menu()");
  145. return true;
  146. }
  147. onMessengerMenu() {
  148. this.endVideoCall();
  149. this.injectJavaScript("bx_mobile_apps_show_messenger_menu()");
  150. return true;
  151. }
  152. onHomeMenu() {
  153. this.endVideoCall();
  154. if (`${BASE_URL}` == this.state.url || this.state.url.startsWith(`${BASE_URL}?skin=${TEMPLATE}`) || `${BASE_URL}index.php` == this.state.url) {
  155. this.injectJavaScript("bx_mobile_apps_close_sliding_menus()");
  156. } else {
  157. this.setState ({
  158. url: `${BASE_URL}?skin=${TEMPLATE}&mix=${'dark' == this.mode ? MIX_DARK : MIX_LIGHT}`,
  159. searchbar: false,
  160. key: this.state.key + 1,
  161. });
  162. }
  163. return true;
  164. }
  165. onSearch(event) {
  166. this.onSearchCancelMenu();
  167. this.injectJavaScript(`window.location = '${BASE_URL}searchKeyword.php?keyword=${event.nativeEvent.text}';`);
  168. }
  169. onSearchCancelMenu() {
  170. this.setState ({
  171. loading: this.loading,
  172. searchbar: false,
  173. });
  174. return true;
  175. }
  176. onSearchMenu() {
  177. this.endVideoCall();
  178. this.setState ({
  179. loading: this.loading,
  180. searchbar: true,
  181. });
  182. return true;
  183. }
  184. onDrawerLoginMenu() {
  185. this.onHomeMenu();
  186. this.drawerClose();
  187. return true;
  188. }
  189. onDrawerJoinMenu() {
  190. this.injectJavaScript(`window.location = '${BASE_URL}page/create-account';`);
  191. this.drawerClose();
  192. return true;
  193. }
  194. onDrawerForgotMenu() {
  195. this.injectJavaScript(`window.location = '${BASE_URL}page/forgot-password';`);
  196. this.drawerClose();
  197. return true;
  198. }
  199. onWebViewNavigationStateChange(navState) {
  200. if (-1 != navState.url.indexOf('#') && this.state.url == navState.url.substring(0, navState.url.indexOf('#'))) {
  201. this.onWebViewLoadEnd();
  202. return;
  203. }
  204. this.setState ({
  205. url: navState.url,
  206. status: navState.title,
  207. backButtonEnabled: navState.canGoBack,
  208. forwardButtonEnabled: navState.canGoForward,
  209. searchbar: false,
  210. });
  211. }
  212. onWebViewLoadStart (syntheticEvent) {
  213. if (-1 == this.state.url.indexOf(`${BASE_URL}`)) { // loading indicator is supported on original domains only
  214. this.onWebViewLoadEnd(syntheticEvent);
  215. return;
  216. }
  217. this.loading = true;
  218. this.setState ({
  219. loading: this.loading,
  220. searchbar: false,
  221. });
  222. }
  223. onWebViewLoadEnd (syntheticEvent) {
  224. this.loading = false;
  225. this.setState ({
  226. loading: this.loading,
  227. searchbar: false,
  228. });
  229. }
  230. reload() {
  231. this.refs.webView1.reload();
  232. }
  233. postMessage (data) {
  234. // posts a message to web view
  235. this.refs.webView1.postMessage(data);
  236. }
  237. injectJavaScript (script) {
  238. // executes JavaScript immediately in web view
  239. this.refs.webView1.injectJavaScript(script);
  240. }
  241. onWebViewShouldStartLoadWithRequest (event) {
  242. var aExceptionsUrls = [
  243. 'redirect_uri=', 'redirect_uri%', 'redirectUri%', // Facebook/LinkedIn Connect and other Connect apps
  244. 'signin/oauth', 'signin%2Foauth', // Google Connect
  245. '/m/oauth2', // Dolphin/UNA Connect
  246. 'api.twitter.com', // Twitter Connect
  247. ];
  248. var bExceptionUrl = aExceptionsUrls.some(e => {
  249. return -1 !== event.url.indexOf(e);
  250. });
  251. if ('about:blank' === event.url)
  252. return false;
  253. if (0 != event.url.indexOf('http') || (!bExceptionUrl && -1 == event.url.indexOf(`${BASE_URL}`) && ('android' === Platform.OS || ('click' == event.navigationType && 'ios' === Platform.OS)))) {
  254. Linking.canOpenURL(event.url).then(supported => {
  255. if (supported) {
  256. Linking.openURL(event.url);
  257. }
  258. else {
  259. console.log('Don\'t know how to open URI: ' + event.url);
  260. }
  261. return false;
  262. });
  263. return false;
  264. }
  265. if ('android' === Platform.OS)
  266. this.onWebViewLoadStart(); // show loading screen
  267. return true;
  268. }
  269. javascriptToInject () {
  270. return 'glBxNexusApp = ' + JSON.stringify({ver:version});
  271. }
  272. componentDidCatch(error, info) {
  273. SplashScreen.hide();
  274. }
  275. componentDidMount() {
  276. OneSignal.init(ONESIGNALAPPID, {kOSSettingsKeyAutoPrompt : true});
  277. OneSignal.inFocusDisplaying(0);
  278. OneSignal.addEventListener('received', this.onNotificationReceived);
  279. OneSignal.addEventListener('opened', this.onNotificationOpened.bind(this));
  280. if (Platform.OS === 'android') {
  281. this.backHandler = BackHandler.addEventListener('hardwareBackPress', () => {
  282. this.onBack(); // works best when the goBack is async
  283. return true;
  284. });
  285. }
  286. SplashScreen.hide();
  287. }
  288. componentWillUnmount() {
  289. OneSignal.removeEventListener('received', this.onNotificationReceived);
  290. OneSignal.removeEventListener('opened', this.onNotificationOpened);
  291. if (Platform.OS === 'android') {
  292. this.backHandler.remove();
  293. }
  294. }
  295. onNotificationReceived(notification) {
  296. console.log("Notification received: ", notification);
  297. }
  298. onNotificationOpened(openResult) {
  299. if ('undefined' !== typeof(openResult.notification.payload.additionalData) && 'undefined' !== typeof(openResult.notification.payload.additionalData.url) && !openResult.notification.isAppInFocus) {
  300. this.injectJavaScript(`window.location = '${openResult.notification.payload.additionalData.url}';`);
  301. }
  302. }
  303. onWebViewMessage(event) {
  304. let oMsgData;
  305. try {
  306. oMsgData = JSON.parse(event.nativeEvent.data);
  307. }
  308. catch(err) {
  309. console.warn(err);
  310. return;
  311. }
  312. if ('undefined' !== typeof(oMsgData.loggedin)) {
  313. this.setState ({
  314. loading: this.loading,
  315. data: oMsgData,
  316. searchbar: false,
  317. key: 'undefined' === typeof(this.state.data.loggedin) || this.state.data.loggedin != oMsgData.loggedin ? this.state.key + 1 : this.state.key,
  318. });
  319. }
  320. if ('undefined' !== typeof(oMsgData['push_tags']) && oMsgData['push_tags'] !== false) {
  321. if ('undefined' !== typeof(oMsgData['push_tags']['email']) && oMsgData['push_tags']['email'].length) {
  322. OneSignal.setEmail(oMsgData['push_tags']['email'], oMsgData['push_tags']['email_hash'], (sError) => {
  323. console.warn("OneSignal set email error:" + sError);
  324. });
  325. delete oMsgData['push_tags']['email'];
  326. delete oMsgData['push_tags']['email_hash'];
  327. }
  328. OneSignal.sendTags(oMsgData['push_tags']);
  329. }
  330. if ('undefined' !== typeof(oMsgData['stop_loading']) && oMsgData['stop_loading']) {
  331. this.onWebViewLoadEnd (event);
  332. }
  333. if ('undefined' !== typeof(oMsgData['video_call_start'])) {
  334. this.onVideoCallStart (oMsgData['video_call_start']['uri'], 'undefined' === typeof(oMsgData['video_call_start']['audio']) ? false : oMsgData['video_call_start']['audio']);
  335. }
  336. if ('undefined' !== typeof(oMsgData['video_call_stop']) && oMsgData['video_call_stop']) {
  337. this.endVideoCall ();
  338. }
  339. if ('undefined' !== typeof(oMsgData['goto_home']) && oMsgData['goto_home']) {
  340. this.onHomeMenu ();
  341. }
  342. if ('undefined' !== typeof(oMsgData['reload']) && oMsgData['reload']) {
  343. this.reload ();
  344. }
  345. }
  346. drawerClose () {
  347. this.refs.drawer._root.close()
  348. }
  349. drawerOpen () {
  350. this.refs.drawer._root.open()
  351. }
  352. render() {
  353. var sWebview = (
  354. <WebView
  355. useWebKit={true}
  356. ref="webView1"
  357. key={this.state.key}
  358. geolocationEnabled={true}
  359. builtInZoomControls={false}
  360. decelerationRate="normal"
  361. cacheEnabled={true}
  362. allowsLinkPreview={true}
  363. hideKeyboardAccessoryView={true}
  364. injectedJavaScript={this.javascriptToInject()}
  365. onShouldStartLoadWithRequest={this.onWebViewShouldStartLoadWithRequest.bind(this)}
  366. onNavigationStateChange={this.onWebViewNavigationStateChange.bind(this)}
  367. style={{flex: 1}}
  368. source={{uri: `${BASE_URL}?skin=${TEMPLATE}&mix=${'dark' == this.mode ? MIX_DARK : MIX_LIGHT}`}}
  369. userAgent={"UNAMobileApp/Mobile (" + Platform.OS + ")"}
  370. onMessage={this.onWebViewMessage.bind(this)}
  371. allowFileAccess={true}
  372. onLoad={this.onWebViewLoadEnd.bind(this)}
  373. onLoadStart={this.onWebViewLoadStart.bind(this)}
  374. />
  375. );
  376. return (
  377. <Container>
  378. <Drawer ref="drawer" content={<UnaDrawer onLogin={this.onDrawerLoginMenu.bind(this)} onJoin={this.onDrawerJoinMenu.bind(this)} onForotPassword={this.onDrawerForgotMenu.bind(this)} onClose={this.drawerClose.bind(this)} />} onClose={this.drawerClose.bind(this)}>
  379. <UnaApp
  380. webview={sWebview}
  381. state={this.state}
  382. videoCallAudio={this.videoCallAudio}
  383. onSearch={this.onSearch.bind(this)}
  384. onSearchCancelMenu={this.onSearchCancelMenu.bind(this)}
  385. onMainMenu={this.onMainMenu.bind(this)}
  386. onBackAndMainMenu={this.onBackAndMainMenu.bind(this)}
  387. onHomeMenu={this.onHomeMenu.bind(this)}
  388. onAddMenu={this.onAddMenu.bind(this)}
  389. onSearchMenu={this.onSearchMenu.bind(this)}
  390. onNotificationsMenu={this.onNotificationsMenu.bind(this)}
  391. onMessengerMenu={this.onMessengerMenu.bind(this)}
  392. onProfileMenu={this.onProfileMenu.bind(this)}
  393. onVideoCallToggle={this.onVideoCallToggle.bind(this)}
  394. onConferenceTerminated={this.onConferenceTerminated}
  395. onConferenceJoined={this.onConferenceJoined}
  396. onConferenceWillJoin={this.onConferenceWillJoin} />
  397. </Drawer>
  398. </Container>
  399. );
  400. }
  401. }
  402. function UnaApp(o) {
  403. const styles = useDynamicStyleSheet(dynamicStyles);
  404. const isDarkMode = useDarkMode();
  405. var sBarStyle = 'dark-content';
  406. if (Platform.OS === 'android' || isDarkMode)
  407. sBarStyle = 'light-content';
  408. StatusBar.setBarStyle(sBarStyle, false);
  409. return (<Container>
  410. {o.state.searchbar ? (
  411. <UnaToolbarSearch onSearch={o.onSearch} onSearchCancel={o.onSearchCancelMenu} />
  412. ) : (
  413. <UnaToolbar loggedin={o.state.data.loggedin} backButtonEnabled={o.state.backButtonEnabled} onMainMenu={o.onMainMenu} onHomeMenu={o.onHomeMenu} onSearchMenu={o.onSearchMenu} onBackAndMainMenu={o.onBackAndMainMenu} />
  414. ) }
  415. {o.state.videoCall && o.state.videoCallUri ? (
  416. <View style={styles.containerVideoCall}><VideoCall onConferenceTerminated={o.onConferenceTerminated} onConferenceJoined={o.onConferenceJoined} onConferenceWillJoin={o.onConferenceWillJoin} conferenceUri={o.state.videoCallUri} audio={o.videoCallAudio} userInfo={o.state.data.user_info} /></View>
  417. ) : (
  418. <View />
  419. )}
  420. {o.webview}
  421. {o.state.data.loggedin && (
  422. <UnaFooter bubblesNum={o.state.data.bubbles_num} bubbles={o.state.data.bubbles} onMainMenu={o.onMainMenu} onNotificationsMenu={o.onNotificationsMenu} onVideoCallToggle={o.onVideoCallToggle} onAddMenu={o.onAddMenu} onMessengerMenu={o.onMessengerMenu} onProfileMenu={o.onProfileMenu} />
  423. )}
  424. {o.state.loading && (
  425. <View style={styles.viewLoading2}>
  426. <ActivityIndicator size="large" color="#fff" />
  427. </View>
  428. )}
  429. </Container>
  430. );
  431. }
  432. function UnaFooter(o) {
  433. const styles = useDynamicStyleSheet(dynamicStyles)
  434. return (
  435. <Footer style={styles.footer}>
  436. <FooterTab>
  437. <Button vertical onPress={o.onMainMenu}>
  438. <Icon name="bars" type="FontAwesome5" />
  439. </Button>
  440. </FooterTab>
  441. <FooterTab>
  442. <Button vertical onPress={o.onNotificationsMenu} badge={o.bubbles['notifications-notifications'] > 0 ? true : false}>
  443. {o.bubbles['notifications-notifications'] > 0 &&
  444. (<Badge><Text>{o.bubbles['notifications-notifications']}</Text></Badge>)
  445. }
  446. <Icon name="bell" type="FontAwesome5" solid />
  447. </Button>
  448. </FooterTab>
  449. {/*
  450. <FooterTab>
  451. <Button vertical onPress={o.onVideoCallToggle}>
  452. <Icon name="video" type="FontAwesome5" solid />
  453. </Button>
  454. </FooterTab>
  455. */}
  456. <FooterTab>
  457. <Button vertical onPress={o.onAddMenu}>
  458. <Icon name="plus-circle" type="FontAwesome5" solid />
  459. </Button>
  460. </FooterTab>
  461. <FooterTab>
  462. <Button vertical onPress={o.onMessengerMenu} badge={o.bubbles['notifications-messenger'] > 0 ? true : false}>
  463. {o.bubbles['notifications-messenger'] > 0 &&
  464. (<Badge><Text>{o.bubbles['notifications-messenger']}</Text></Badge>)
  465. }
  466. <Icon name="comments" type="FontAwesome5" solid />
  467. </Button>
  468. </FooterTab>
  469. <FooterTab>
  470. <Button vertical onPress={o.onProfileMenu} badge={o.bubblesNum > 0 ? true : false}>
  471. {o.bubblesNum > 0 &&
  472. (<Badge><Text>{o.bubblesNum}</Text></Badge>)
  473. }
  474. <Icon name="user" type="FontAwesome5" solid />
  475. </Button>
  476. </FooterTab>
  477. </Footer>
  478. );
  479. }
  480. function UnaToolbar(o) {
  481. const styles = useDynamicStyleSheet(dynamicStyles)
  482. return (
  483. <Header style={styles.header}>
  484. <Left>
  485. {o.loggedin ? (
  486. o.backButtonEnabled &&
  487. (<Button style={Platform.OS === 'android' ? styles.buttonLeftTopAndroid : styles.buttonLeftTopIos} transparent onPress={o.onBackAndMainMenu}>
  488. <Icon name="ios-arrow-back" />
  489. </Button>)
  490. ) : (
  491. <Button style={Platform.OS === 'android' ? styles.buttonLeftTopAndroid : styles.buttonLeftTopIos} transparent onPress={o.onMainMenu}>
  492. <Icon name='menu' />
  493. </Button>
  494. )}
  495. </Left>
  496. <Body>
  497. <Title style={styles.headerTitle} onPress={o.onHomeMenu}>{TITLE}</Title>
  498. </Body>
  499. <Right>
  500. {o.loggedin && (
  501. <Button transparent>
  502. <Icon name='search' onPress={o.onSearchMenu} />
  503. </Button>
  504. )}
  505. </Right>
  506. </Header>
  507. );
  508. }
  509. function UnaToolbarSearch(o) {
  510. const styles = useDynamicStyleSheet(dynamicStyles)
  511. return (
  512. <Header style={styles.header} searchBar rounded>
  513. <Item>
  514. <Icon name="search" />
  515. <Input placeholder="Search" onEndEditing={o.onSearchCancel} onSubmitEditing={o.onSeach} />
  516. </Item>
  517. <Button transparent onPress={o.onSearchCancel}>
  518. <Text>Cancel</Text>
  519. </Button>
  520. </Header>
  521. );
  522. }
  523. function UnaDrawer(o) {
  524. const styles = useDynamicStyleSheet(dynamicStyles)
  525. return (
  526. <Container>
  527. <Content>
  528. <View style={styles.drawerImageContainer}>
  529. <Image style={styles.drawerImage} source={require('./img/logo-loading.png')} />
  530. </View>
  531. <Button style={styles.drawerButton} iconLeft transparent onPress={o.onLogin}>
  532. <Icon style={styles.drawerButtonIcon} name='key' type="FontAwesome5" solid />
  533. <Text>Login</Text>
  534. </Button>
  535. <Button style={styles.drawerButton} iconLeft transparent onPress={o.onJoin}>
  536. <Icon style={styles.drawerButtonIcon} name='plus-circle' type="FontAwesome5" solid />
  537. <Text>Join</Text>
  538. </Button>
  539. <Button style={styles.drawerButton} iconLeft transparent onPress={o.onForotPassword}>
  540. <Icon style={styles.drawerButtonIcon} name='lock' type="FontAwesome5" solid />
  541. <Text>Forgot Password</Text>
  542. </Button>
  543. </Content>
  544. </Container>
  545. );
  546. }
  547. const dynamicStyles = new DynamicStyleSheet({
  548. header: {
  549. backgroundColor: new DynamicValue('#eee', '#333'),
  550. },
  551. headerTitle: {
  552. color: new DynamicValue('#333', '#eee'),
  553. },
  554. footer: {
  555. backgroundColor: new DynamicValue('#eee', '#333'),
  556. },
  557. containerVideoCall: {
  558. backgroundColor: '#000',
  559. flex: 999999999999,
  560. },
  561. viewLoading2: {
  562. position: 'absolute',
  563. width: Dimensions.get('window').width,
  564. height: Dimensions.get('window').height,
  565. justifyContent: 'center',
  566. alignItems: 'center',
  567. backgroundColor: '#00000066',
  568. },
  569. buttonLeftTopAndroid: {
  570. },
  571. buttonLeftTopIos: {
  572. marginLeft: 5,
  573. },
  574. drawerImageContainer: {
  575. height:100,
  576. justifyContent: 'center',
  577. alignItems: 'center',
  578. backgroundColor: '#FFF',
  579. },
  580. drawerImage: {
  581. height:33.5,
  582. width:125,
  583. },
  584. drawerButton: {
  585. justifyContent: 'flex-start',
  586. },
  587. drawerButtonIcon: {
  588. width: 20,
  589. fontSize: 20,
  590. justifyContent: 'center',
  591. textAlign: 'center',
  592. },
  593. });