OPS: Upgrade RN elements

This commit is contained in:
Marcos Rodriguez Vélez 2020-05-03 14:17:49 -04:00 committed by GitHub
parent 9232d344e3
commit 13572c8775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 304 additions and 372 deletions

View file

@ -2,7 +2,7 @@
import React, { Component, useEffect, useState } from 'react'; import React, { Component, useEffect, useState } from 'react';
import Ionicons from 'react-native-vector-icons/Ionicons'; import Ionicons from 'react-native-vector-icons/Ionicons';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Icon, FormLabel, FormInput, Text, Header, List, ListItem } from 'react-native-elements'; import { Icon, Input, Text, Header, ListItem } from 'react-native-elements';
import { import {
TouchableOpacity, TouchableOpacity,
TouchableWithoutFeedback, TouchableWithoutFeedback,
@ -20,6 +20,7 @@ import {
InputAccessoryView, InputAccessoryView,
Clipboard, Clipboard,
Platform, Platform,
FlatList,
TextInput, TextInput,
} from 'react-native'; } from 'react-native';
import LinearGradient from 'react-native-linear-gradient'; import LinearGradient from 'react-native-linear-gradient';
@ -587,7 +588,7 @@ export class BlueListItem extends Component {
paddingBottom: 16, paddingBottom: 16,
}} }}
titleStyle={{ titleStyle={{
color: BlueApp.settings.foregroundColor, color: this.props.disabled ? BlueApp.settings.buttonDisabledTextColor : BlueApp.settings.foregroundColor,
fontSize: 16, fontSize: 16,
fontWeight: '500', fontWeight: '500',
marginLeft: 16, marginLeft: 16,
@ -595,6 +596,7 @@ export class BlueListItem extends Component {
subtitleStyle={{ color: BlueApp.settings.alternativeTextColor, marginLeft: 16, fontWeight: '400', width: 230 }} subtitleStyle={{ color: BlueApp.settings.alternativeTextColor, marginLeft: 16, fontWeight: '400', width: 230 }}
subtitleNumberOfLines={1} subtitleNumberOfLines={1}
titleNumberOfLines={0} titleNumberOfLines={0}
Component={TouchableOpacity}
{...this.props} {...this.props}
/> />
); );
@ -603,14 +605,14 @@ export class BlueListItem extends Component {
export class BlueFormLabel extends Component { export class BlueFormLabel extends Component {
render() { render() {
return <FormLabel {...this.props} labelStyle={{ color: BlueApp.settings.foregroundColor, fontWeight: '400' }} />; return <Text {...this.props} style={{ color: BlueApp.settings.foregroundColor, fontWeight: '400', marginLeft: 20 }} />;
} }
} }
export class BlueFormInput extends Component { export class BlueFormInput extends Component {
render() { render() {
return ( return (
<FormInput <Input
{...this.props} {...this.props}
inputStyle={{ color: BlueApp.settings.foregroundColor, maxWidth: width - 105 }} inputStyle={{ color: BlueApp.settings.foregroundColor, maxWidth: width - 105 }}
containerStyle={{ containerStyle={{
@ -684,6 +686,7 @@ export class BlueHeaderDefaultSub extends Component {
<SafeAreaView style={{ backgroundColor: BlueApp.settings.brandingColor }}> <SafeAreaView style={{ backgroundColor: BlueApp.settings.brandingColor }}>
<Header <Header
backgroundColor={BlueApp.settings.brandingColor} backgroundColor={BlueApp.settings.brandingColor}
leftContainerStyle={{ minWidth: '100%' }}
outerContainerStyles={{ outerContainerStyles={{
borderBottomColor: 'transparent', borderBottomColor: 'transparent',
borderBottomWidth: 0, borderBottomWidth: 0,
@ -732,11 +735,8 @@ export class BlueHeaderDefaultMain extends Component {
<Header <Header
{...this.props} {...this.props}
backgroundColor={BlueApp.settings.brandingColor} backgroundColor={BlueApp.settings.brandingColor}
outerContainerStyles={{
borderBottomColor: 'transparent',
borderBottomWidth: 0,
}}
statusBarProps={{ barStyle: 'default' }} statusBarProps={{ barStyle: 'default' }}
leftContainerStyle={{ minWidth: '100%' }}
leftComponent={ leftComponent={
<Text <Text
numberOfLines={0} numberOfLines={0}
@ -813,17 +813,7 @@ export class BlueSpacing10 extends Component {
export class BlueList extends Component { export class BlueList extends Component {
render() { render() {
return ( return <FlatList {...this.props} />;
<List
{...this.props}
containerStyle={{
backgroundColor: BlueApp.settings.brandingColor,
borderTopColor: 'transparent',
borderTopWidth: 0,
flex: 1,
}}
/>
);
} }
} }
@ -999,6 +989,7 @@ const stylesBlueIcon = StyleSheet.create({
borderRadius: 15, borderRadius: 15,
backgroundColor: '#d2f8d6', backgroundColor: '#d2f8d6',
transform: [{ rotate: '-45deg' }], transform: [{ rotate: '-45deg' }],
justifyContent: 'center',
}, },
ballIncomingWithoutRotate: { ballIncomingWithoutRotate: {
width: 30, width: 30,
@ -1019,6 +1010,7 @@ const stylesBlueIcon = StyleSheet.create({
borderRadius: 15, borderRadius: 15,
backgroundColor: '#f8d2d2', backgroundColor: '#f8d2d2',
transform: [{ rotate: '225deg' }], transform: [{ rotate: '225deg' }],
justifyContent: 'center',
}, },
ballOutgoingWithoutRotate: { ballOutgoingWithoutRotate: {
width: 30, width: 30,
@ -1031,6 +1023,7 @@ const stylesBlueIcon = StyleSheet.create({
height: 30, height: 30,
borderRadius: 15, borderRadius: 15,
backgroundColor: '#EEF0F4', backgroundColor: '#EEF0F4',
justifyContent: 'center',
}, },
ballTransparrent: { ballTransparrent: {
width: 30, width: 30,
@ -1075,14 +1068,7 @@ export class BlueTransactionIncomingIcon extends Component {
<View {...this.props}> <View {...this.props}>
<View style={stylesBlueIcon.boxIncoming}> <View style={stylesBlueIcon.boxIncoming}>
<View style={stylesBlueIcon.ballIncoming}> <View style={stylesBlueIcon.ballIncoming}>
<Icon <Icon {...this.props} name="arrow-down" size={16} type="font-awesome" color={BlueApp.settings.incomingForegroundColor} />
{...this.props}
name="arrow-down"
size={16}
type="font-awesome"
color={BlueApp.settings.incomingForegroundColor}
iconStyle={{ left: 0, top: 8 }}
/>
</View> </View>
</View> </View>
</View> </View>
@ -1152,14 +1138,7 @@ export class BlueTransactionOffchainIcon extends Component {
<View {...this.props}> <View {...this.props}>
<View style={stylesBlueIcon.boxIncoming}> <View style={stylesBlueIcon.boxIncoming}>
<View style={stylesBlueIcon.ballOutgoingWithoutRotate}> <View style={stylesBlueIcon.ballOutgoingWithoutRotate}>
<Icon <Icon {...this.props} name="bolt" size={16} type="font-awesome" color={BlueApp.settings.outgoingForegroundColor} />
{...this.props}
name="bolt"
size={16}
type="font-awesome"
color={BlueApp.settings.outgoingForegroundColor}
iconStyle={{ left: 0, top: 7 }}
/>
</View> </View>
</View> </View>
</View> </View>
@ -1173,14 +1152,7 @@ export class BlueTransactionOffchainIncomingIcon extends Component {
<View {...this.props}> <View {...this.props}>
<View style={stylesBlueIcon.boxIncoming}> <View style={stylesBlueIcon.boxIncoming}>
<View style={stylesBlueIcon.ballIncomingWithoutRotate}> <View style={stylesBlueIcon.ballIncomingWithoutRotate}>
<Icon <Icon {...this.props} name="bolt" size={16} type="font-awesome" color={BlueApp.settings.incomingForegroundColor} />
{...this.props}
name="bolt"
size={16}
type="font-awesome"
color={BlueApp.settings.incomingForegroundColor}
iconStyle={{ left: 0, top: 7 }}
/>
</View> </View>
</View> </View>
</View> </View>
@ -1194,14 +1166,7 @@ export class BlueTransactionOutgoingIcon extends Component {
<View {...this.props}> <View {...this.props}>
<View style={stylesBlueIcon.boxIncoming}> <View style={stylesBlueIcon.boxIncoming}>
<View style={stylesBlueIcon.ballOutgoing}> <View style={stylesBlueIcon.ballOutgoing}>
<Icon <Icon {...this.props} name="arrow-down" size={16} type="font-awesome" color={BlueApp.settings.outgoingForegroundColor} />
{...this.props}
name="arrow-down"
size={16}
type="font-awesome"
color={BlueApp.settings.outgoingForegroundColor}
iconStyle={{ left: 0, top: 8 }}
/>
</View> </View>
</View> </View>
</View> </View>
@ -1571,19 +1536,15 @@ export const BlueTransactionListItem = ({ item, itemPriceUnit = BitcoinUnit.BTC,
return ( return (
<BlueListItem <BlueListItem
avatar={avatar()} leftAvatar={avatar()}
title={transactionTimeToReadable} title={transactionTimeToReadable}
titleNumberOfLines={subtitleNumberOfLines} titleNumberOfLines={subtitleNumberOfLines}
subtitle={subtitle()} subtitle={subtitle()}
subtitleNumberOfLines={subtitleNumberOfLines} subtitleNumberOfLines={subtitleNumberOfLines}
onPress={onPress} onPress={onPress}
onLongPress={onLongPress} onLongPress={onLongPress}
badge={{ chevron
value: 3, Component={TouchableOpacity}
textStyle: { color: 'orange' },
containerStyle: { marginTop: 0 },
}}
hideChevron
rightTitle={rowTitle()} rightTitle={rowTitle()}
rightTitleStyle={rowTitleStyle()} rightTitleStyle={rowTitleStyle()}
/> />
@ -1766,11 +1727,6 @@ export class BlueListTransactionItem extends Component {
title={loc.transactionTimeToReadable(this.props.item.received)} title={loc.transactionTimeToReadable(this.props.item.received)}
subtitle={this.subtitle()} subtitle={this.subtitle()}
onPress={this.onPress} onPress={this.onPress}
badge={{
value: 3,
textStyle: { color: 'orange' },
containerStyle: { marginTop: 0 },
}}
hideChevron hideChevron
rightTitle={this.rowTitle()} rightTitle={this.rowTitle()}
rightTitleStyle={this.rowTitleStyle()} rightTitleStyle={this.rowTitleStyle()}

276
package-lock.json generated
View file

@ -1935,6 +1935,37 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
}, },
"@types/prop-types": {
"version": "15.7.3",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
},
"@types/react": {
"version": "16.9.34",
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.34.tgz",
"integrity": "sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow==",
"requires": {
"@types/prop-types": "*",
"csstype": "^2.2.0"
}
},
"@types/react-native": {
"version": "0.62.5",
"resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.62.5.tgz",
"integrity": "sha512-x6ZBbo752yAw5XUarOyh53oNgMuafL4EhWEbd4ARSMK6Y7nTRm2a1tBHy8Fp7h7ji0XXJrxNRTXGJRRP3+MWzg==",
"requires": {
"@types/react": "*"
}
},
"@types/react-native-vector-icons": {
"version": "6.4.5",
"resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.5.tgz",
"integrity": "sha512-JBpcjWQE4n0GlE0p6HpDDclT+uXpFC453T5k4h+B38q0utlGJhvgNr8899BoJGc1xOktA2cgqFKmFMJd0h7YaA==",
"requires": {
"@types/react": "*",
"@types/react-native": "*"
}
},
"@types/stack-utils": { "@types/stack-utils": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
@ -2679,23 +2710,6 @@
"babel-runtime": "^6.22.0" "babel-runtime": "^6.22.0"
} }
}, },
"babel-polyfill": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz",
"integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=",
"requires": {
"babel-runtime": "^6.22.0",
"core-js": "^2.4.0",
"regenerator-runtime": "^0.10.0"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg="
}
}
},
"babel-preset-fbjs": { "babel-preset-fbjs": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz", "resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz",
@ -2779,6 +2793,7 @@
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"requires": { "requires": {
"core-js": "^2.4.0", "core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0" "regenerator-runtime": "^0.11.0"
@ -2787,7 +2802,8 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.11.1", "version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
} }
} }
}, },
@ -3777,6 +3793,15 @@
"object-visit": "^1.0.0" "object-visit": "^1.0.0"
} }
}, },
"color": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz",
"integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==",
"requires": {
"color-convert": "^1.9.1",
"color-string": "^1.5.2"
}
},
"color-convert": { "color-convert": {
"version": "1.9.3", "version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@ -3790,6 +3815,15 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
}, },
"color-string": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz",
"integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==",
"requires": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
}
},
"color-support": { "color-support": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
@ -4170,6 +4204,11 @@
"cssom": "0.3.x" "cssom": "0.3.x"
} }
}, },
"csstype": {
"version": "2.6.10",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.10.tgz",
"integrity": "sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w=="
},
"dashdash": { "dashdash": {
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@ -6747,6 +6786,7 @@
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
}, },
@ -6754,7 +6794,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
} }
} }
}, },
@ -8477,11 +8518,6 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}, },
"lodash.isempty": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz",
"integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4="
},
"lodash.memoize": { "lodash.memoize": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@ -8505,11 +8541,6 @@
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ="
}, },
"lodash.times": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/lodash.times/-/lodash.times-4.3.2.tgz",
"integrity": "sha1-Ph8lZcQxdU1Uq1fy7RdBk5KFyh0="
},
"lodash.unescape": { "lodash.unescape": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",
@ -9953,118 +9984,10 @@
"is-wsl": "^1.1.0" "is-wsl": "^1.1.0"
} }
}, },
"opencollective": { "opencollective-postinstall": {
"version": "1.0.3", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=", "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw=="
"requires": {
"babel-polyfill": "6.23.0",
"chalk": "1.1.3",
"inquirer": "3.0.6",
"minimist": "1.2.0",
"node-fetch": "1.6.3",
"opn": "4.0.2"
},
"dependencies": {
"ansi-escapes": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
"integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"chardet": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz",
"integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I="
},
"external-editor": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
"requires": {
"chardet": "^0.4.0",
"iconv-lite": "^0.4.17",
"tmp": "^0.0.33"
}
},
"inquirer": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz",
"integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=",
"requires": {
"ansi-escapes": "^1.1.0",
"chalk": "^1.0.0",
"cli-cursor": "^2.1.0",
"cli-width": "^2.0.0",
"external-editor": "^2.0.1",
"figures": "^2.0.0",
"lodash": "^4.3.0",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rx": "^4.1.0",
"string-width": "^2.0.0",
"strip-ansi": "^3.0.0",
"through": "^2.3.6"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"node-fetch": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz",
"integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=",
"requires": {
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"opn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz",
"integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=",
"requires": {
"object-assign": "^4.0.1",
"pinkie-promise": "^2.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
}, },
"opn": { "opn": {
"version": "5.5.0", "version": "5.5.0",
@ -10359,12 +10282,14 @@
"pinkie": { "pinkie": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
"dev": true
}, },
"pinkie-promise": { "pinkie-promise": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"dev": true,
"requires": { "requires": {
"pinkie": "^2.0.0" "pinkie": "^2.0.0"
} }
@ -11728,20 +11653,29 @@
"from": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa" "from": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa"
}, },
"react-native-elements": { "react-native-elements": {
"version": "0.19.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-0.19.0.tgz", "resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-2.0.0.tgz",
"integrity": "sha1-c3xRmL90h/mYbiAjgmzQvXpQA2Y=", "integrity": "sha512-xViTU/JlabYX94fDL2iu17gvMtgEOq2lFAToYlU3RBkwb/J13cdwSr8Ti9z6v6Iui4f8S3FjkpRJnFaOsZrK7w==",
"requires": { "requires": {
"lodash.isempty": "^4.4.0", "@types/react-native-vector-icons": "^6.4.4",
"lodash.times": "^4.3.2", "color": "^3.1.0",
"opencollective": "^1.0.3", "deepmerge": "^3.1.0",
"prop-types": "^15.5.8" "hoist-non-react-statics": "^3.1.0",
} "opencollective-postinstall": "^2.0.0",
"prop-types": "^15.7.2",
"react-native-ratings": "^6.5.0",
"react-native-status-bar-height": "^2.2.0"
}, },
"react-native-flexi-radio-button": { "dependencies": {
"version": "0.2.2", "hoist-non-react-statics": {
"resolved": "https://registry.npmjs.org/react-native-flexi-radio-button/-/react-native-flexi-radio-button-0.2.2.tgz", "version": "3.3.2",
"integrity": "sha1-oBgDk8UxujR3cixuQqMc6xwRYjs=" "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
}
}
}
}, },
"react-native-fs": { "react-native-fs": {
"version": "2.16.6", "version": "2.16.6",
@ -11858,6 +11792,15 @@
"resolved": "https://registry.npmjs.org/react-native-rate/-/react-native-rate-1.1.10.tgz", "resolved": "https://registry.npmjs.org/react-native-rate/-/react-native-rate-1.1.10.tgz",
"integrity": "sha512-07L5923RpL+AdnsZCQSkiMbRi/7N/OJtZ6AWAl5bZyhncDD7L1ap94H3jtV7uFW5WGBNxMnGiC4fPLzn426mMw==" "integrity": "sha512-07L5923RpL+AdnsZCQSkiMbRi/7N/OJtZ6AWAl5bZyhncDD7L1ap94H3jtV7uFW5WGBNxMnGiC4fPLzn426mMw=="
}, },
"react-native-ratings": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-6.5.0.tgz",
"integrity": "sha512-YMcfQ7UQCmXGEc/WPlukHSHs5yvckTwjq5fTRk1FG8gaO7fZCNygEUGPuw4Dbvvp3IlsCUn0bOQd63RYsb7NDQ==",
"requires": {
"lodash": "^4.17.4",
"prop-types": "^15.5.10"
}
},
"react-native-safe-area-view": { "react-native-safe-area-view": {
"version": "0.14.8", "version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz", "resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
@ -11908,6 +11851,11 @@
"prop-types": "^15.5.10" "prop-types": "^15.5.10"
} }
}, },
"react-native-status-bar-height": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/react-native-status-bar-height/-/react-native-status-bar-height-2.5.0.tgz",
"integrity": "sha512-sYBCPYA/NapBSHkdm/IVL4ID3LLlIuLqINi2FBDyMkc2BU9pfSGOtkz9yfxoK39mYJuTrlTOQ7mManARUsYDSA=="
},
"react-native-svg": { "react-native-svg": {
"version": "9.13.6", "version": "9.13.6",
"resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-9.13.6.tgz", "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-9.13.6.tgz",
@ -12624,11 +12572,6 @@
"integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==",
"dev": true "dev": true
}, },
"rx": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz",
"integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I="
},
"rx-lite": { "rx-lite": {
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
@ -12905,6 +12848,21 @@
"plist": "^3.0.1" "plist": "^3.0.1"
} }
}, },
"simple-swizzle": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
"integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
"requires": {
"is-arrayish": "^0.3.1"
},
"dependencies": {
"is-arrayish": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
}
}
},
"sisteransi": { "sisteransi": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",

View file

@ -106,8 +106,7 @@
"react-native-default-preference": "1.4.1", "react-native-default-preference": "1.4.1",
"react-native-device-info": "4.0.1", "react-native-device-info": "4.0.1",
"react-native-document-picker": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa", "react-native-document-picker": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa",
"react-native-elements": "0.19.0", "react-native-elements": "2.0.0",
"react-native-flexi-radio-button": "0.2.2",
"react-native-fs": "2.16.6", "react-native-fs": "2.16.6",
"react-native-gesture-handler": "1.6.1", "react-native-gesture-handler": "1.6.1",
"react-native-handoff": "git+https://github.com/marcosrdz/react-native-handoff.git", "react-native-handoff": "git+https://github.com/marcosrdz/react-native-handoff.git",

View file

@ -655,10 +655,8 @@ export default class SendDetails extends Component {
{this.state.fromWallet.type === HDSegwitBech32Wallet.type && ( {this.state.fromWallet.type === HDSegwitBech32Wallet.type && (
<BlueListItem <BlueListItem
title="Allow Fee Bump" title="Allow Fee Bump"
hideChevron Component={TouchableWithoutFeedback}
switchButton switch={{ value: this.state.isTransactionReplaceable, onValueChange: this.onReplaceableFeeSwitchValueChanged }}
switched={this.state.isTransactionReplaceable}
onSwitch={this.onReplaceableFeeSwitchValueChanged}
/> />
)} )}
{this.state.fromWallet.type === WatchOnlyWallet.type && {this.state.fromWallet.type === WatchOnlyWallet.type &&

View file

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { ScrollView, Platform, TouchableOpacity } from 'react-native'; import { ScrollView, Platform, TouchableWithoutFeedback, TouchableOpacity } from 'react-native';
import { BlueLoading, BlueText, BlueSpacing20, BlueListItem, SafeBlueArea, BlueNavigationStyle, BlueCard } from '../../BlueComponents'; import { BlueLoading, BlueText, BlueSpacing20, BlueListItem, SafeBlueArea, BlueNavigationStyle, BlueCard } from '../../BlueComponents';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { AppStorage } from '../../class'; import { AppStorage } from '../../class';
@ -38,12 +38,17 @@ const GeneralSettings = () => {
<ScrollView> <ScrollView>
{BlueApp.getWallets().length > 1 && ( {BlueApp.getWallets().length > 1 && (
<> <>
<BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title="On Launch" /> <BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title="On Launch" chevron />
</> </>
)} )}
{Platform.OS === 'ios' ? ( {Platform.OS === 'ios' ? (
<> <>
<BlueListItem hideChevron title={'Continuity'} switchButton onSwitch={onHandOffEnabledSwitch} switched={isHandoffUseEnabled} /> <BlueListItem
hideChevron
title={'Continuity'}
Component={TouchableWithoutFeedback}
switch={{ onValueChange: onHandOffEnabledSwitch, value: isHandoffUseEnabled }}
/>
<BlueCard> <BlueCard>
<BlueText> <BlueText>
When enabled, you will be able to view selected wallets, and transactions, using your other Apple iCloud connected devices. When enabled, you will be able to view selected wallets, and transactions, using your other Apple iCloud connected devices.
@ -53,11 +58,9 @@ const GeneralSettings = () => {
</> </>
) : null} ) : null}
<BlueListItem <BlueListItem
hideChevron Component={TouchableWithoutFeedback}
title={loc.settings.enable_advanced_mode} title={loc.settings.enable_advanced_mode}
switchButton switch={{ onValueChange: onAdvancedModeSwitch, value: isAdancedModeEnabled }}
onSwitch={onAdvancedModeSwitch}
switched={isAdancedModeEnabled}
/> />
<BlueCard> <BlueCard>
<BlueText> <BlueText>

View file

@ -133,6 +133,7 @@ const About = () => {
type: 'font-awesome', type: 'font-awesome',
color: '#9AA0AA', color: '#9AA0AA',
}} }}
chevron
onPress={handleOnReleaseNotesPress} onPress={handleOnReleaseNotesPress}
title="Release notes" title="Release notes"
/> />
@ -142,6 +143,7 @@ const About = () => {
type: 'octicon', type: 'octicon',
color: 'black', color: 'black',
}} }}
chevron
onPress={handleOnLicensingPress} onPress={handleOnLicensingPress}
title="MIT License" title="MIT License"
/> />
@ -151,6 +153,7 @@ const About = () => {
type: 'font-awesome', type: 'font-awesome',
color: '#FC0D44', color: '#FC0D44',
}} }}
chevron
onPress={handleOnSelfTestPress} onPress={handleOnSelfTestPress}
title="Run self test" title="Run self test"
testID="RunSelfTestButton" testID="RunSelfTestButton"

View file

@ -38,8 +38,13 @@ const Currency = () => {
extraData={data} extraData={data}
renderItem={({ item }) => { renderItem={({ item }) => {
return ( return (
<TouchableOpacity <BlueListItem
disabled={isSavingNewPreferredCurrency} disabled={isSavingNewPreferredCurrency}
title={`${item.endPointKey} (${item.symbol})`}
{...(selectedCurrency.endPointKey === item.endPointKey
? { rightIcon: <Icon name="check" type="font-awesome" color="#0c2550" /> }
: { hideChevron: true })}
Component={TouchableOpacity}
onPress={async () => { onPress={async () => {
setIsSavingNewPreferredCurrency(true); setIsSavingNewPreferredCurrency(true);
setSelectedCurrency(item); setSelectedCurrency(item);
@ -47,14 +52,7 @@ const Currency = () => {
await currency.startUpdater(); await currency.startUpdater();
setIsSavingNewPreferredCurrency(false); setIsSavingNewPreferredCurrency(false);
}} }}
>
<BlueListItem
title={`${item.endPointKey} (${item.symbol})`}
{...(selectedCurrency.endPointKey === item.endPointKey
? { rightIcon: <Icon name="check" type="font-awesome" color="#0c2550" /> }
: { hideChevron: true })}
/> />
</TouchableOpacity>
); );
}} }}
/> />

View file

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { TouchableOpacity, View } from 'react-native'; import { TouchableOpacity, View, TouchableWithoutFeedback } from 'react-native';
import { SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueListItem } from '../../BlueComponents'; import { SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueListItem } from '../../BlueComponents';
import OnAppLaunch from '../../class/onAppLaunch'; import OnAppLaunch from '../../class/onAppLaunch';
import { useNavigation } from 'react-navigation-hooks'; import { useNavigation } from 'react-navigation-hooks';
@ -52,17 +52,18 @@ const DefaultView = () => {
<View> <View>
<BlueListItem <BlueListItem
title="View All Wallets" title="View All Wallets"
hideChevron Component={TouchableWithoutFeedback}
switchButton switch={{
swithchEnabled={BlueApp.getWallets().length > 0} onValueChange: onViewAllWalletsSwitchValueChanged,
switched={viewAllWalletsEnabled} value: viewAllWalletsEnabled,
onSwitch={onViewAllWalletsSwitchValueChanged} disabled: BlueApp.getWallets().length <= 0,
}}
/> />
<BlueCard> <BlueCard>
<BlueText>When disabled, BlueWallet will immediately open the selected wallet at launch.</BlueText> <BlueText>When disabled, BlueWallet will immediately open the selected wallet at launch.</BlueText>
</BlueCard> </BlueCard>
{!viewAllWalletsEnabled && ( {!viewAllWalletsEnabled && (
<BlueListItem title="Default into" component={TouchableOpacity} onPress={selectWallet} rightTitle={defaultWalletLabel} /> <BlueListItem title="Default into" component={TouchableOpacity} onPress={selectWallet} rightTitle={defaultWalletLabel} chevron />
)} )}
</View> </View>
</SafeBlueArea> </SafeBlueArea>

View file

@ -5,7 +5,6 @@ import { AppStorage } from '../../class';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import { ScrollView } from 'react-native-gesture-handler'; import { ScrollView } from 'react-native-gesture-handler';
import { BlueLoading, BlueSpacing20, BlueButton, SafeBlueArea, BlueCard, BlueNavigationStyle, BlueText } from '../../BlueComponents'; import { BlueLoading, BlueSpacing20, BlueButton, SafeBlueArea, BlueCard, BlueNavigationStyle, BlueText } from '../../BlueComponents';
import { Badge } from 'react-native-elements';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
let loc = require('../../loc'); let loc = require('../../loc');
let BlueElectrum = require('../../BlueElectrum'); let BlueElectrum = require('../../BlueElectrum');
@ -92,8 +91,8 @@ export default class ElectrumSettings extends Component {
<BlueCard> <BlueCard>
<BlueText style={{ textAlign: 'center', color: '#9AA0AA', marginBottom: 4 }}>Status</BlueText> <BlueText style={{ textAlign: 'center', color: '#9AA0AA', marginBottom: 4 }}>Status</BlueText>
<View style={{ width: 'auto', height: 34, flexWrap: 'wrap', justifyContent: 'center', flexDirection: 'row' }}> <View style={{ width: 'auto', height: 34, flexWrap: 'wrap', justifyContent: 'center', flexDirection: 'row' }}>
<Badge <View
containerStyle={{ style={{
backgroundColor: this.state.config.status === 1 ? '#D2F8D6' : '#F8D2D2', backgroundColor: this.state.config.status === 1 ? '#D2F8D6' : '#F8D2D2',
paddingTop: 6, paddingTop: 6,
paddingBottom: 6, paddingBottom: 6,
@ -105,7 +104,7 @@ export default class ElectrumSettings extends Component {
<BlueText style={{ fontWeight: '600', color: this.state.config.status === 1 ? '#37C0A1' : '#D0021B' }}> <BlueText style={{ fontWeight: '600', color: this.state.config.status === 1 ? '#37C0A1' : '#D0021B' }}>
{(this.state.config.status === 1 && 'Connected') || 'Not Connected'} {(this.state.config.status === 1 && 'Connected') || 'Not Connected'}
</BlueText> </BlueText>
</Badge> </View>
</View> </View>
<BlueSpacing20 /> <BlueSpacing20 />
<BlueText style={{ textAlign: 'center', color: '#0C2550' }} onPress={this.checkServer}> <BlueText style={{ textAlign: 'center', color: '#0C2550' }} onPress={this.checkServer}>

View file

@ -1,6 +1,6 @@
/* global alert */ /* global alert */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { ScrollView, Alert, Platform, TouchableOpacity } from 'react-native'; import { ScrollView, Alert, Platform, TouchableOpacity, TouchableWithoutFeedback } from 'react-native';
import { import {
BlueLoading, BlueLoading,
BlueHeaderDefaultSub, BlueHeaderDefaultSub,
@ -140,11 +140,9 @@ export default class EncryptStorage extends Component {
<> <>
<BlueHeaderDefaultSub leftText="biometrics" rightComponent={null} /> <BlueHeaderDefaultSub leftText="biometrics" rightComponent={null} />
<BlueListItem <BlueListItem
hideChevron
title={`Use ${this.state.biometrics.biometricsType}`} title={`Use ${this.state.biometrics.biometricsType}`}
switchButton Component={TouchableWithoutFeedback}
onSwitch={this.onUseBiometricSwitch} switch={{ value: this.state.biometrics.isBiometricUseEnabled, onValueChange: this.onUseBiometricSwitch }}
switched={this.state.biometrics.isBiometricsEnabled}
/> />
<BlueCard> <BlueCard>
<BlueText> <BlueText>
@ -160,32 +158,31 @@ export default class EncryptStorage extends Component {
testID="EncyptedAndPasswordProtected" testID="EncyptedAndPasswordProtected"
hideChevron hideChevron
title="Encypted and Password protected" title="Encypted and Password protected"
switchButton Component={TouchableWithoutFeedback}
onSwitch={this.onEncryptStorageSwitch} switch={{ onValueChange: this.onEncryptStorageSwitch, value: this.state.storageIsEncrypted }}
switched={this.state.storageIsEncrypted}
/> />
{Platform.OS === 'ios' && this.state.storageIsEncrypted && ( {Platform.OS === 'ios' && this.state.storageIsEncrypted && (
<BlueListItem <BlueListItem
hideChevron hideChevron
disabled={!this.state.storageIsEncrypted} disabled={!this.state.storageIsEncrypted}
switchDisabled={!this.state.storageIsEncrypted}
title="Delete if BlueWallet is uninstalled" title="Delete if BlueWallet is uninstalled"
switchButton Component={TouchableWithoutFeedback}
onSwitch={this.onDeleteWalletsAfterUninstallSwitch} switch={{
switched={this.state.deleteWalletsAfterUninstall} onValueChange: this.onDeleteWalletsAfterUninstallSwitch,
value: this.state.deleteWalletsAfterUninstall,
disabled: !this.state.storageIsEncrypted,
}}
/> />
)} )}
{this.state.storageIsEncrypted && ( {this.state.storageIsEncrypted && (
<TouchableOpacity
disabled={!this.state.storageIsEncrypted}
onPress={() => this.props.navigation.navigate('PlausibleDeniability')}
>
<BlueListItem <BlueListItem
onPress={() => this.props.navigation.navigate('PlausibleDeniability')}
disabled={!this.state.storageIsEncrypted} disabled={!this.state.storageIsEncrypted}
title={loc.settings.plausible_deniability} title={loc.settings.plausible_deniability}
chevron
testID="PlausibleDeniabilityButton" testID="PlausibleDeniabilityButton"
Component={TouchableOpacity}
/> />
</TouchableOpacity>
)} )}
</ScrollView> </ScrollView>
</SafeBlueArea> </SafeBlueArea>

View file

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { FlatList, TouchableOpacity } from 'react-native'; import { FlatList } from 'react-native';
import { BlueLoading, BlueText, SafeBlueArea, BlueListItem, BlueCard, BlueNavigationStyle } from '../../BlueComponents'; import { BlueLoading, BlueText, SafeBlueArea, BlueListItem, BlueCard, BlueNavigationStyle } from '../../BlueComponents';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Icon } from 'react-native-elements'; import { Icon } from 'react-native-elements';
@ -56,14 +56,12 @@ export default class Language extends Component {
renderItem = ({ item }) => { renderItem = ({ item }) => {
return ( return (
<TouchableOpacity <BlueListItem
onPress={() => { onPress={() => {
console.log('setLanguage', item.value); console.log('setLanguage', item.value);
loc.saveLanguage(item.value); loc.saveLanguage(item.value);
return this.setState({ language: item.value }); return this.setState({ language: item.value });
}} }}
>
<BlueListItem
title={item.label} title={item.label}
{...(this.state.language === item.value {...(this.state.language === item.value
? { ? {
@ -71,7 +69,6 @@ export default class Language extends Component {
} }
: { hideChevron: true })} : { hideChevron: true })}
/> />
</TouchableOpacity>
); );
}; };

View file

@ -68,10 +68,11 @@ export default class LightningSettings extends Component {
onPress={() => { onPress={() => {
Linking.openURL('https://github.com/BlueWallet/LndHub'); Linking.openURL('https://github.com/BlueWallet/LndHub');
}} }}
titleStyle={{ color: BlueApp.settings.buttonAlternativeTextColor }}
title="github.com/BlueWallet/LndHub" title="github.com/BlueWallet/LndHub"
color={BlueApp.settings.buttonTextColor} color={BlueApp.settings.buttonTextColor}
buttonStyle={{ buttonStyle={{
backgroundColor: '#FFFFFF', backgroundColor: 'transparent',
}} }}
/> />

View file

@ -16,14 +16,26 @@ const Settings = () => {
<BlueLoading /> <BlueLoading />
) : ( ) : (
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}> <SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<BlueHeaderDefaultSub leftText={loc.settings.header} rightComponent={null} />
<ScrollView> <ScrollView>
<BlueListItem title={'General'} component={TouchableOpacity} onPress={() => navigate('GeneralSettings')} /> <BlueHeaderDefaultSub leftText={loc.settings.header} rightComponent={null} />
<BlueListItem title={loc.settings.currency} component={TouchableOpacity} onPress={() => navigate('Currency')} /> <BlueListItem title={'General'} component={TouchableOpacity} onPress={() => navigate('GeneralSettings')} chevron />
<BlueListItem title={loc.settings.language} component={TouchableOpacity} onPress={() => navigate('Language')} /> <BlueListItem title={loc.settings.currency} component={TouchableOpacity} onPress={() => navigate('Currency')} chevron />
<BlueListItem title="Security" onPress={() => navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" /> <BlueListItem title={loc.settings.language} component={TouchableOpacity} onPress={() => navigate('Language')} chevron />
<BlueListItem title="Network" component={TouchableOpacity} onPress={() => navigate('NetworkSettings')} /> <BlueListItem
<BlueListItem title={loc.settings.about} component={TouchableOpacity} onPress={() => navigate('About')} testID="AboutButton" /> title="Security"
onPress={() => navigate('EncryptStorage')}
component={TouchableOpacity}
testID="SecurityButton"
chevron
/>
<BlueListItem title="Network" component={TouchableOpacity} onPress={() => navigate('NetworkSettings')} chevron />
<BlueListItem
title={loc.settings.about}
component={TouchableOpacity}
onPress={() => navigate('About')}
testID="AboutButton"
chevron
/>
</ScrollView> </ScrollView>
</SafeBlueArea> </SafeBlueArea>
); );

View file

@ -15,6 +15,7 @@ import AsyncStorage from '@react-native-community/async-storage';
import { import {
BlueTextCentered, BlueTextCentered,
BlueText, BlueText,
BlueListItem,
LightningButton, LightningButton,
BitcoinButton, BitcoinButton,
BlueFormLabel, BlueFormLabel,
@ -24,12 +25,12 @@ import {
BlueButtonLink, BlueButtonLink,
BlueSpacing20, BlueSpacing20,
} from '../../BlueComponents'; } from '../../BlueComponents';
import { RadioGroup, RadioButton } from 'react-native-flexi-radio-button';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { HDSegwitP2SHWallet } from '../../class/hd-segwit-p2sh-wallet'; import { HDSegwitP2SHWallet } from '../../class/hd-segwit-p2sh-wallet';
import { LightningCustodianWallet } from '../../class/lightning-custodian-wallet'; import { LightningCustodianWallet } from '../../class/lightning-custodian-wallet';
import { AppStorage, HDSegwitBech32Wallet, SegwitP2SHWallet } from '../../class'; import { AppStorage, HDSegwitBech32Wallet, SegwitP2SHWallet } from '../../class';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import { Icon } from 'react-native-elements';
let EV = require('../../events'); let EV = require('../../events');
let A = require('../../analytics'); let A = require('../../analytics');
let BlueApp: AppStorage = require('../../BlueApp'); let BlueApp: AppStorage = require('../../BlueApp');
@ -46,6 +47,7 @@ export default class WalletsAdd extends Component {
this.state = { this.state = {
isLoading: true, isLoading: true,
walletBaseURI: '', walletBaseURI: '',
selectedIndex: 0,
}; };
} }
@ -53,7 +55,6 @@ export default class WalletsAdd extends Component {
let walletBaseURI = await AsyncStorage.getItem(AppStorage.LNDHUB); let walletBaseURI = await AsyncStorage.getItem(AppStorage.LNDHUB);
let isAdvancedOptionsEnabled = await BlueApp.isAdancedModeEnabled(); let isAdvancedOptionsEnabled = await BlueApp.isAdancedModeEnabled();
walletBaseURI = walletBaseURI || ''; walletBaseURI = walletBaseURI || '';
this.setState({ this.setState({
isLoading: false, isLoading: false,
activeBitcoin: undefined, activeBitcoin: undefined,
@ -69,10 +70,9 @@ export default class WalletsAdd extends Component {
}); /* also, a hack to make screen update new typed text */ }); /* also, a hack to make screen update new typed text */
} }
onSelect(index, value) { onSelect(index) {
this.setState({ this.setState({
selectedIndex: index, selectedIndex: index,
selectedValue: value,
}); });
} }
@ -178,17 +178,39 @@ export default class WalletsAdd extends Component {
<View> <View>
<BlueSpacing20 /> <BlueSpacing20 />
<Text style={{ color: '#0c2550', fontWeight: '500' }}>{loc.settings.advanced_options}</Text> <Text style={{ color: '#0c2550', fontWeight: '500' }}>{loc.settings.advanced_options}</Text>
<RadioGroup onSelect={(index, value) => this.onSelect(index, value)} selectedIndex={0}> <BlueListItem
<RadioButton value={HDSegwitBech32Wallet.type}> onPress={() => {
<BlueText>{HDSegwitBech32Wallet.typeReadable} - Multiple addresses</BlueText> this.onSelect(0, HDSegwitBech32Wallet.type);
</RadioButton> }}
<RadioButton value={SegwitP2SHWallet.type}> title={HDSegwitBech32Wallet.typeReadable}
<BlueText>{SegwitP2SHWallet.typeReadable} - Single address</BlueText> {...(this.state.selectedIndex === 0
</RadioButton> ? {
<RadioButton value={HDSegwitP2SHWallet.type}> rightIcon: <Icon name="check" type="font-awesome" color="#0c2550" />,
<BlueText>{HDSegwitP2SHWallet.typeReadable} - Multiple addresses</BlueText> }
</RadioButton> : { hideChevron: true })}
</RadioGroup> />
<BlueListItem
onPress={() => {
this.onSelect(1, SegwitP2SHWallet.type);
}}
title={SegwitP2SHWallet.typeReadable}
{...(this.state.selectedIndex === 1
? {
rightIcon: <Icon name="check" type="font-awesome" color="#0c2550" />,
}
: { hideChevron: true })}
/>
<BlueListItem
onPress={() => {
this.onSelect(2, HDSegwitP2SHWallet.typeReadable.type);
}}
title={HDSegwitP2SHWallet.typeReadable}
{...(this.state.selectedIndex === 2
? {
rightIcon: <Icon name="check" type="font-awesome" color="#0c2550" />,
}
: { hideChevron: true })}
/>
</View> </View>
); );
} else if (this.state.activeLightning && this.state.isAdvancedOptionsEnabled) { } else if (this.state.activeLightning && this.state.isAdvancedOptionsEnabled) {

View file

@ -1,16 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { import { View, StatusBar, TouchableOpacity, Text, StyleSheet, InteractionManager, RefreshControl, ScrollView, Alert } from 'react-native';
View,
StatusBar,
TouchableOpacity,
Text,
StyleSheet,
FlatList,
InteractionManager,
RefreshControl,
ScrollView,
Alert,
} from 'react-native';
import { BlueLoading, SafeBlueArea, WalletsCarousel, BlueList, BlueHeaderDefaultMain, BlueTransactionListItem } from '../../BlueComponents'; import { BlueLoading, SafeBlueArea, WalletsCarousel, BlueList, BlueHeaderDefaultMain, BlueTransactionListItem } from '../../BlueComponents';
import { Icon } from 'react-native-elements'; import { Icon } from 'react-native-elements';
import { NavigationEvents } from 'react-navigation'; import { NavigationEvents } from 'react-navigation';
@ -420,9 +409,8 @@ export default class WalletsList extends Component {
}} }}
ref={c => (this.walletsCarousel = c)} ref={c => (this.walletsCarousel = c)}
/> />
<BlueList>
{this.renderLocalTrader()} {this.renderLocalTrader()}
<FlatList <BlueList
ListHeaderComponent={this.renderListHeaderComponent} ListHeaderComponent={this.renderListHeaderComponent}
ListEmptyComponent={ ListEmptyComponent={
<View style={{ top: 80, height: 160 }}> <View style={{ top: 80, height: 160 }}>
@ -452,7 +440,6 @@ export default class WalletsList extends Component {
keyExtractor={this._keyExtractor} keyExtractor={this._keyExtractor}
renderItem={this._renderItem} renderItem={this._renderItem}
/> />
</BlueList>
</ScrollView> </ScrollView>
</View> </View>
</ViewPager> </ViewPager>

View file

@ -1,7 +1,6 @@
import React, { useEffect, useState, useCallback } from 'react'; import React, { useEffect, useState, useCallback } from 'react';
import { ActivityIndicator, View, BackHandler, Text, ScrollView } from 'react-native'; import { ActivityIndicator, View, BackHandler, Text, ScrollView } from 'react-native';
import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueText, BlueButton } from '../../BlueComponents'; import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueText, BlueButton } from '../../BlueComponents';
import { Badge } from 'react-native-elements';
import Privacy from '../../Privacy'; import Privacy from '../../Privacy';
import { useNavigation, useNavigationParam } from 'react-navigation-hooks'; import { useNavigation, useNavigationParam } from 'react-navigation-hooks';
const loc = require('../../loc'); const loc = require('../../loc');
@ -29,9 +28,11 @@ const PleaseBackup = () => {
let component = []; let component = [];
for (const [index, secret] of words.entries()) { for (const [index, secret] of words.entries()) {
component.push( component.push(
<View style={{ width: 'auto', marginRight: 8, marginBottom: 8 }} key={`${secret}${index}`}> <View
<Badge style={{
containerStyle={{ width: 'auto',
marginRight: 8,
marginBottom: 8,
backgroundColor: '#f5f5f5', backgroundColor: '#f5f5f5',
paddingTop: 6, paddingTop: 6,
paddingBottom: 6, paddingBottom: 6,
@ -39,11 +40,11 @@ const PleaseBackup = () => {
paddingRight: 8, paddingRight: 8,
borderRadius: 4, borderRadius: 4,
}} }}
key={`${secret}${index}`}
> >
<Text style={{ color: '#81868E', fontWeight: 'bold' }}> <Text style={{ color: '#81868E', fontWeight: 'bold' }}>
{`${index}`}. {secret} {`${index}`}. {secret}
</Text> </Text>
</Badge>
</View>, </View>,
); );
} }