From a11b7b17e81df9e20e987452312a749279dec74f Mon Sep 17 00:00:00 2001 From: Igor Korsakov Date: Sat, 22 Sep 2018 12:26:45 +0100 Subject: [PATCH] FIX: layout bugs (#71) * FIX: layout bugs --- App.test.js | 3 +-- BlueComponents.js | 42 +++++++++------------------------- MainBottomTabs.js | 3 --- app.json | 2 +- screen/lnd/manageFunds.js | 5 ++-- screen/receive/details.js | 12 +--------- screen/receive/list.js | 2 -- screen/send/create.js | 5 ++-- screen/send/details.js | 18 +++++++-------- screen/transactions/details.js | 5 ++-- screen/transactions/list.js | 4 ++-- screen/wallets/add.js | 2 -- screen/wallets/details.js | 2 -- screen/wallets/export.js | 1 - 14 files changed, 34 insertions(+), 72 deletions(-) diff --git a/App.test.js b/App.test.js index bc202b1d8..c4d487372 100644 --- a/App.test.js +++ b/App.test.js @@ -29,8 +29,7 @@ jest.mock('ScrollView', () => { const RealComponent = require.requireActual('ScrollView'); const React = require('React'); class ScrollView extends React.Component { - scrollTo() { - } + scrollTo() {} render() { return React.createElement('ScrollView', this.props, this.props.children); diff --git a/BlueComponents.js b/BlueComponents.js index 1471fcfec..a1590ba7d 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; 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 { Icon, Button, FormLabel, FormInput, Text, Header, List, ListItem } from 'react-native-elements'; import { TouchableOpacity, ActivityIndicator, View, StyleSheet, Dimensions, Image, SafeAreaView } from 'react-native'; import { WatchOnlyWallet, LegacyWallet } from './class'; import Carousel from 'react-native-snap-carousel'; @@ -160,27 +160,7 @@ export class SafeBlueArea extends Component { export class BlueCard extends Component { render() { - return ( - - ); + return ; } } @@ -320,7 +300,7 @@ export class BlueHeader extends Component { export class BlueHeaderDefaultSub extends Component { render() { return ( - +
+ { @@ -467,7 +447,7 @@ export class BlueList extends Component { backgroundColor: BlueApp.settings.brandingColor, borderTopColor: 'transparent', borderTopWidth: 0, - flex: 1 + flex: 1, }} /> ); @@ -598,7 +578,7 @@ export class BlueRefreshIcon extends Component { export class BlueTransactionIncommingIcon extends Component { render() { return ( - + @@ -612,7 +592,7 @@ export class BlueTransactionIncommingIcon extends Component { export class BlueTransactionPendingIcon extends Component { render() { return ( - + + + + + diff --git a/MainBottomTabs.js b/MainBottomTabs.js index 9d5c14ad6..37ff77a62 100644 --- a/MainBottomTabs.js +++ b/MainBottomTabs.js @@ -6,9 +6,6 @@ import send from './screen/send'; import settings from './screen/settings'; import receive from './screen/receive'; -/** @type {AppStorage} */ -let BlueApp = require('./BlueApp'); - const Tabs = createStackNavigator( { Wallets: { diff --git a/app.json b/app.json index 4192a82c3..1aff1b633 100644 --- a/app.json +++ b/app.json @@ -7,7 +7,7 @@ "ios" ], "ios": { - "buildNumber": "68", + "buildNumber": "69", "supportsTablet": true, "isRemoteJSEnabled": false, "bundleIdentifier": "io.bluewallet.bluewallet", diff --git a/screen/lnd/manageFunds.js b/screen/lnd/manageFunds.js index d7f4cee50..0a22646ee 100644 --- a/screen/lnd/manageFunds.js +++ b/screen/lnd/manageFunds.js @@ -13,7 +13,9 @@ let data = []; export default class ManageFunds extends Component { static navigationOptions = { - tabBarVisible: false, + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -65,7 +67,6 @@ export default class ManageFunds extends Component { return ( - this.props.navigation.goBack()} /> {(() => { diff --git a/screen/receive/details.js b/screen/receive/details.js index e7d2f4330..27f64b43f 100644 --- a/screen/receive/details.js +++ b/screen/receive/details.js @@ -1,15 +1,7 @@ import React, { Component } from 'react'; import { Dimensions, View } from 'react-native'; import QRCode from 'react-native-qrcode'; -import { - BlueLoading, - BlueFormInputAddress, - SafeBlueArea, - BlueCard, - BlueHeaderDefaultSub, - BlueSpacingVariable, - is, -} from '../../BlueComponents'; +import { BlueLoading, BlueFormInputAddress, SafeBlueArea, BlueCard, BlueHeaderDefaultSub, is } from '../../BlueComponents'; import PropTypes from 'prop-types'; /** @type {AppStorage} */ let BlueApp = require('../../BlueApp'); @@ -18,7 +10,6 @@ let loc = require('../../loc'); const { width } = Dimensions.get('window'); export default class ReceiveDetails extends Component { - static navigationOptions = { header: ({ navigation }) => { return navigation.goBack(null)} />; @@ -84,7 +75,6 @@ export default class ReceiveDetails extends Component { return ( - { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -153,7 +155,6 @@ export default class SendCreate extends Component { return ( - this.props.navigation.goBack()} /> {loc.send.create.this_is_hex} diff --git a/screen/send/details.js b/screen/send/details.js index e219aa2da..003157354 100644 --- a/screen/send/details.js +++ b/screen/send/details.js @@ -3,11 +3,9 @@ import { ActivityIndicator, View } from 'react-native'; import { Text, FormValidationMessage } from 'react-native-elements'; import { BlueSpacing20, - BlueSpacingVariable, BlueHeaderDefaultSub, BlueButton, SafeBlueArea, - BlueCard, BlueText, BlueFormInput, BlueFormInputAddress, @@ -23,6 +21,11 @@ let loc = require('../../loc'); const btcAddressRx = /^[a-zA-Z0-9]{26,35}$/; export default class SendDetails extends Component { + static navigationOptions = { + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, + }; constructor(props) { super(props); @@ -180,11 +183,8 @@ export default class SendDetails extends Component { } return ( - - - this.props.navigation.goBack()} /> - - + + this.setState({ address: text })} placeholder={loc.send.details.receiver_placeholder} @@ -212,11 +212,11 @@ export default class SendDetails extends Component { /> - + {loc.send.details.remaining_balance}:{' '} {this.recalculateAvailableBalance(this.state.fromWallet.getBalance(), this.state.amount, this.state.fee)} BTC - + {this.state.errorMessage} diff --git a/screen/transactions/details.js b/screen/transactions/details.js index 08e035d14..9fa28a6f5 100644 --- a/screen/transactions/details.js +++ b/screen/transactions/details.js @@ -48,7 +48,9 @@ function formatTime(time) { export default class TransactionsDetails extends Component { static navigationOptions = { - tabBarVisible: false, + header: ({ navigation }) => { + return navigation.goBack(null)} />; + }, }; constructor(props) { @@ -99,7 +101,6 @@ export default class TransactionsDetails extends Component { return ; } })()} - this.props.navigation.goBack()} /> {(() => { diff --git a/screen/transactions/list.js b/screen/transactions/list.js index d22e88dd4..bf440966b 100644 --- a/screen/transactions/list.js +++ b/screen/transactions/list.js @@ -87,13 +87,13 @@ export default class TransactionsList extends Component { _keyExtractor = (item, index) => item.hash; render() { - console.warn(this.state.dataSource) + console.warn(this.state.dataSource); const { navigate } = this.props.navigation; if (this.state.isLoading) { return ; } - + return (
- {loc.wallets.add.wallet_name} - {(() => { if (this.state.wallet.getAddress()) { diff --git a/screen/wallets/export.js b/screen/wallets/export.js index d0993ec0b..6bd55cc5a 100644 --- a/screen/wallets/export.js +++ b/screen/wallets/export.js @@ -16,7 +16,6 @@ if (aspectRatio > 1.6) { } export default class WalletExport extends Component { - static navigationOptions = { header: ({ navigation }) => { return navigation.goBack(null)} />;