mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
more subtle (and disappearing scan-lnurl button).
This commit is contained in:
parent
39a9449cf5
commit
3ed6a7a63f
@ -1702,7 +1702,7 @@ export class BlueAddressInput extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
export class BlueReadQRButton extends Component {
|
||||
export class BlueReadQR extends Component {
|
||||
static propTypes = {
|
||||
suffix: PropTypes.string,
|
||||
onBarScanned: PropTypes.func,
|
||||
@ -1710,17 +1710,21 @@ export class BlueReadQRButton extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<BlueButton
|
||||
icon={{
|
||||
name: 'qrcode',
|
||||
type: 'font-awesome',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
<TouchableOpacity
|
||||
onPress={() => NavigationService.navigate('ScanQrAddress', { onBarScanned: this.props.onBarScanned }) }
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
minWidth: width,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
title={`${loc.send.details.scan} ${this.props.suffix}`}
|
||||
onPress={() => {
|
||||
NavigationService.navigate('ScanQrAddress', { onBarScanned: this.props.onBarScanned });
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<Icon name="qrcode" type="font-awesome" color={BlueApp.settings.buttonTextColor} containerStyle={{ marginRight: 8 }} />
|
||||
<Text style={{color: BlueApp.settings.buttonTextColor, textAlign: 'center'}}>
|
||||
{loc.send.details.scan} {this.props.suffix}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
"appcenter": "2.1.0",
|
||||
"appcenter-analytics": "2.1.0",
|
||||
"appcenter-crashes": "2.1.0",
|
||||
"bech32": "^1.1.3",
|
||||
"bech32": "1.1.3",
|
||||
"bignumber.js": "9.0.0",
|
||||
"bip21": "2.0.2",
|
||||
"bip32": "2.0.3",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import { ActivityIndicator, View, TextInput, KeyboardAvoidingView, Keyboard, TouchableWithoutFeedback, Text } from 'react-native';
|
||||
import { BlueNavigationStyle, BlueButton, BlueReadQRButton, BlueBitcoinAmount, BlueDismissKeyboardInputAccessory } from '../../BlueComponents';
|
||||
import { BlueNavigationStyle, BlueButton, BlueReadQR, BlueBitcoinAmount, BlueDismissKeyboardInputAccessory } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import bech32 from 'bech32';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
@ -135,10 +135,10 @@ export default class LNDCreateInvoice extends Component {
|
||||
);
|
||||
};
|
||||
|
||||
renderScanButton = () => {
|
||||
renderScanClickable = () => {
|
||||
return (
|
||||
<View style={{ marginHorizontal: 56, marginVertical: 4, minHeight: 25, alignContent: 'center', backgroundColor: '#FFFFFF' }}>
|
||||
<BlueReadQRButton
|
||||
<View style={{ marginHorizontal: 0, marginVertical: 16, minHeight: 25, alignContent: 'center' }}>
|
||||
<BlueReadQR
|
||||
onBarScanned={this.processLnurl}
|
||||
suffix="lnurl"
|
||||
/>
|
||||
@ -210,9 +210,9 @@ export default class LNDCreateInvoice extends Component {
|
||||
</View>
|
||||
<BlueDismissKeyboardInputAccessory />
|
||||
{this.renderCreateButton()}
|
||||
{this.renderScanButton()}
|
||||
</KeyboardAvoidingView>
|
||||
</View>
|
||||
{this.state.lnurlParams ? null : this.renderScanClickable()}
|
||||
</View>
|
||||
</TouchableWithoutFeedback>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user