diff --git a/BlueComponents.js b/BlueComponents.js index 27c4d25f..1471fcfe 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -1,10 +1,9 @@ /** @type {AppStorage} */ import React, { Component } from 'react'; -import { SafeAreaView } from 'react-navigation'; import Ionicons from 'react-native-vector-icons/Ionicons'; import { LinearGradient, Constants } from 'expo'; import { Icon, Button, FormLabel, FormInput, Card, Text, Header, List, ListItem } from 'react-native-elements'; -import { TouchableOpacity, ActivityIndicator, View, StyleSheet, Dimensions, Image } from 'react-native'; +import { TouchableOpacity, ActivityIndicator, View, StyleSheet, Dimensions, Image, SafeAreaView } from 'react-native'; import { WatchOnlyWallet, LegacyWallet } from './class'; import Carousel from 'react-native-snap-carousel'; import { HDLegacyP2PKHWallet } from './class/hd-legacy-p2pkh-wallet'; @@ -321,43 +320,45 @@ export class BlueHeader extends Component { export class BlueHeaderDefaultSub extends Component { render() { return ( -
- { - // eslint-disable-next-line - this.props.leftText - } - - } - rightComponent={ - { - // eslint-disable-next-line - if (this.props.onClose) this.props.onClose(); - }} - > - - - + +
+ { + // eslint-disable-next-line + this.props.leftText + } + + } + rightComponent={ + { + // eslint-disable-next-line + if (this.props.onClose) this.props.onClose(); + }} + > + + + + - - - } - /> + + } + /> + ); } } @@ -365,29 +366,8 @@ export class BlueHeaderDefaultSub extends Component { export class BlueHeaderDefaultMain extends Component { render() { return ( -
- { - // eslint-disable-next-line - this.props.leftText - } - - } - rightComponent={ + + { // eslint-disable-next-line @@ -400,8 +380,42 @@ export class BlueHeaderDefaultMain extends Component { - } - /> +
+ { + // eslint-disable-next-line + this.props.leftText + } + + } + rightComponent={ + + + + } + /> + + ); } } @@ -486,7 +500,9 @@ const stylesBlueIcon = StyleSheet.create({ top: 15, }, box: { - position: 'relative', + alignSelf: 'flex-end', + paddingHorizontal: 14, + paddingTop: 8, }, boxIncomming: { position: 'relative', diff --git a/MainBottomTabs.js b/MainBottomTabs.js index f68d9008..9d5c14ad 100644 --- a/MainBottomTabs.js +++ b/MainBottomTabs.js @@ -14,9 +14,6 @@ const Tabs = createStackNavigator( Wallets: { screen: wallets, path: 'wallets', - navigationOptions: { - title: 'Wallets', - }, }, Transactions: { screen: transactions, @@ -36,6 +33,7 @@ const Tabs = createStackNavigator( }, }, { + mode: 'modal', headerMode: 'none', }, ); diff --git a/screen/receive.js b/screen/receive.js index ba92b60e..0cdd895c 100644 --- a/screen/receive.js +++ b/screen/receive.js @@ -9,7 +9,6 @@ const ReceiveNavigator = createStackNavigator( }, }, { - headerMode: 'none', mode: 'modal', }, ); diff --git a/screen/receive/details.js b/screen/receive/details.js index c599514b..e7d2f433 100644 --- a/screen/receive/details.js +++ b/screen/receive/details.js @@ -18,8 +18,11 @@ let loc = require('../../loc'); const { width } = Dimensions.get('window'); export default class ReceiveDetails extends Component { + static navigationOptions = { - tabBarVisible: false, + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -82,8 +85,6 @@ export default class ReceiveDetails extends Component { return ( - this.props.navigation.goBack()} /> - ( - - ), - }; constructor(props) { super(props); diff --git a/screen/send/details.js b/screen/send/details.js index 493371cc..e219aa2d 100644 --- a/screen/send/details.js +++ b/screen/send/details.js @@ -23,9 +23,6 @@ let loc = require('../../loc'); const btcAddressRx = /^[a-zA-Z0-9]{26,35}$/; export default class SendDetails extends Component { - static navigationOptions = { - tabBarVisible: false, - }; constructor(props) { super(props); diff --git a/screen/send/scanQrAddress.js b/screen/send/scanQrAddress.js index 5da82b66..f393defd 100644 --- a/screen/send/scanQrAddress.js +++ b/screen/send/scanQrAddress.js @@ -7,7 +7,7 @@ let EV = require('../../events'); export default class CameraExample extends React.Component { static navigationOptions = { - tabBarVisible: false, + header: null, }; state = { diff --git a/screen/wallets.js b/screen/wallets.js index f9e437d2..5b047864 100644 --- a/screen/wallets.js +++ b/screen/wallets.js @@ -81,7 +81,6 @@ const WalletsNavigator = createStackNavigator( }, }, { - headerMode: 'none', mode: 'modal', }, ); diff --git a/screen/wallets/add.js b/screen/wallets/add.js index 06e402e9..a32825be 100644 --- a/screen/wallets/add.js +++ b/screen/wallets/add.js @@ -30,7 +30,9 @@ const { width } = Dimensions.get('window'); export default class WalletsAdd extends Component { static navigationOptions = { - tabBarVisible: false, + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -73,8 +75,6 @@ export default class WalletsAdd extends Component { return ( - this.props.navigation.goBack()} /> - {loc.wallets.add.wallet_name} { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -78,9 +80,6 @@ export default class WalletDetails extends Component { return ( - - this.props.navigation.goBack()} /> - {(() => { if (this.state.wallet.getAddress()) { diff --git a/screen/wallets/export.js b/screen/wallets/export.js index 35c2f3a1..d0993ec0 100644 --- a/screen/wallets/export.js +++ b/screen/wallets/export.js @@ -16,8 +16,11 @@ if (aspectRatio > 1.6) { } export default class WalletExport extends Component { + static navigationOptions = { - tabBarVisible: false, + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -74,8 +77,6 @@ export default class WalletExport extends Component { return ; } })()} - this.props.navigation.goBack()} /> - {(() => { if (this.state.wallet.getAddress()) { diff --git a/screen/wallets/import.js b/screen/wallets/import.js index cfda78eb..6fbde61d 100644 --- a/screen/wallets/import.js +++ b/screen/wallets/import.js @@ -30,7 +30,9 @@ const { width } = Dimensions.get('window'); export default class WalletsImport extends Component { static navigationOptions = { - tabBarVisible: false, + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -209,8 +211,6 @@ export default class WalletsImport extends Component { - this.props.navigation.goBack()} /> - {loc.wallets.import.explanation} { + return ( + navigation.navigate('AddWallet')} + onClose={() => navigation.navigate('Settings')} + /> + ); + }, }; constructor(props) { @@ -273,8 +282,6 @@ export default class WalletsList extends Component { return ( - navigate('Settings')} /> - { diff --git a/screen/wallets/scanQrWif.js b/screen/wallets/scanQrWif.js index d8ca7866..a4a0483d 100644 --- a/screen/wallets/scanQrWif.js +++ b/screen/wallets/scanQrWif.js @@ -15,7 +15,7 @@ let loc = require('../../loc'); export default class ScanQrWif extends React.Component { static navigationOptions = { - tabBarVisible: false, + header: null, }; state = {