Merge pull request #588 from lbryio/wallet-send-paste

add paste button beside wallet address input
This commit is contained in:
Akinwale Ariwodola 2019-06-21 10:17:59 +01:00 committed by GitHub
commit aa285f90ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 18 deletions

View file

@ -1,7 +1,4 @@
import { connect } from 'react-redux';
import Button from './view';
export default connect(
null,
null
)(Button);
export default connect()(Button);

View file

@ -1,7 +1,7 @@
import React from 'react';
import { Text, TouchableOpacity } from 'react-native';
import buttonStyle from '../../styles/button';
import Colors from '../../styles/colors';
import buttonStyle from 'styles/button';
import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5';
export default class Button extends React.PureComponent {

View file

@ -1,9 +1,10 @@
// @flow
import React from 'react';
import { regexAddress } from 'lbry-redux';
import { Alert, TextInput, Text, View } from 'react-native';
import Button from '../button';
import walletStyle from '../../styles/wallet';
import { Alert, Clipboard, TextInput, Text, View } from 'react-native';
import Button from 'component/button';
import Colors from 'styles/colors';
import walletStyle from 'styles/wallet';
type DraftTransaction = {
address: string,
@ -99,10 +100,16 @@ class WalletSend extends React.PureComponent<Props> {
onBlur={this.handleAddressInputBlur}
onSubmitEditing={this.handleAddressInputSubmit}
placeholder={'bbFxRyXXXXXXXXXXXZD8nE7XTLUxYnddTs'}
underlineColorAndroid={Colors.NextLbryGreen}
value={this.state.address}
returnKeyType={'next'}
style={[walletStyle.input, walletStyle.addressInput, walletStyle.bottomMarginMedium]}
/>
<Button
icon={'paste'}
style={walletStyle.button}
onPress={() => Clipboard.getString().then(value => this.setState({ address: value, addressChanged: true }))}
/>
</View>
<Text style={walletStyle.text}>Amount</Text>
<View style={walletStyle.row}>
@ -112,6 +119,7 @@ class WalletSend extends React.PureComponent<Props> {
onChangeText={value => this.setState({ amount: value })}
keyboardType={'numeric'}
placeholder={'0'}
underlineColorAndroid={Colors.NextLbryGreen}
value={this.state.amount}
style={[walletStyle.input, walletStyle.amountInput]}
/>

View file

@ -865,7 +865,8 @@ class FilePage extends React.PureComponent {
/>
</View>
<View style={filePageStyle.subscriptionRow}>
{false && ((isPlayable && !fileInfo) || (isPlayable && fileInfo && !fileInfo.download_path)) && (
{false &&
((isPlayable && !fileInfo) || (isPlayable && fileInfo && !fileInfo.download_path)) && (
<Button
style={[filePageStyle.actionButton, filePageStyle.saveFileButton]}
theme={'light'}

View file

@ -101,7 +101,11 @@ class WalletPage extends React.PureComponent {
return (
<View style={walletStyle.container}>
<UriBar navigation={navigation} />
<ScrollView style={walletStyle.scrollContainer} keyboardShouldPersistTaps={'handled'}>
<ScrollView
style={walletStyle.scrollContainer}
keyboardShouldPersistTaps={'handled'}
removeClippedSubviews={false}
>
<WalletSyncDriver navigation={navigation} />
{!rewardsNotInterested && (!balance || balance === 0) && <WalletRewardsDriver navigation={navigation} />}
<WalletBalance />

View file

@ -138,6 +138,7 @@ const walletStyle = StyleSheet.create({
flex: 1,
fontSize: 16,
letterSpacing: 1.5,
marginRight: 8,
},
warning: {
backgroundColor: Colors.Orange,