This commit is contained in:
Marcos Rodriguez Vélez 2018-09-18 02:48:53 -04:00 committed by Igor Korsakov
parent 2abb30c100
commit 6637d2d380
8 changed files with 56 additions and 52 deletions

View File

@ -137,7 +137,7 @@ export class BlueButtonLink extends Component {
borderColor: 'transparent',
}}
buttonStyle={{
height: 25,
height: 45,
width: width / 1.5,
}}
backgroundColor="transparent"

View File

@ -1,4 +1,4 @@
import { createBottomTabNavigator } from 'react-navigation';
import { createStackNavigator } from 'react-navigation';
import transactions from './screen/transactions';
import wallets from './screen/wallets';
@ -9,43 +9,33 @@ import receive from './screen/receive';
/** @type {AppStorage} */
let BlueApp = require('./BlueApp');
const Tabs = createBottomTabNavigator(
{
Wallets: {
screen: wallets,
path: 'wallets',
},
Transactions: {
screen: transactions,
path: 'trans',
},
Send: {
screen: send,
path: 'cart',
},
Receive: {
screen: receive,
path: 'receive',
},
Settings: {
screen: settings,
path: 'settings',
},
//
},
{
tabBarPosition: 'bottom',
animationEnabled: true,
tabBarVisible: false,
tabBarOptions: {
showLabel: false,
activeTintColor: BlueApp.settings.foregroundColor,
activeBackgroundColor: '#33bdf1',
inactiveBackgroundColor: BlueApp.settings.brandingColor,
inactiveTintColor: BlueApp.settings.foregroundColor,
const Tabs = createStackNavigator({
Wallets: {
screen: wallets,
path: 'wallets',
navigationOptions: {
title: 'Wallets',
},
},
);
Transactions: {
screen: transactions,
path: 'trans',
},
Send: {
screen: send,
path: 'cart',
},
Receive: {
screen: receive,
path: 'receive',
},
Settings: {
screen: settings,
path: 'settings',
},
},
{
headerMode: 'none'
});
export default Tabs;

10
package-lock.json generated
View File

@ -12515,12 +12515,12 @@
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"resolved": "http://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",
"resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz",
"integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=",
"requires": {
"encoding": "^0.1.11",
@ -13716,9 +13716,9 @@
}
},
"react-native-elements": {
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-0.18.5.tgz",
"integrity": "sha1-nZpYQ5X+pj+MrXkE+yHB6sfMY88=",
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-0.19.1.tgz",
"integrity": "sha1-+Stp2GShUCFdAfgf48UqnK2oPkU=",
"requires": {
"lodash.isempty": "^4.4.0",
"lodash.times": "^4.3.2",

View File

@ -61,7 +61,7 @@
"react-localization": "^1.0.10",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-camera": "^0.12.0",
"react-native-elements": "^0.18.5",
"react-native-elements": "^0.19.0",
"react-native-flexi-radio-button": "^0.2.2",
"react-native-level-fs": "^3.0.0",
"react-native-material-dropdown": "^0.11.1",

View File

@ -1,11 +1,18 @@
import { AlertIOS } from 'react-native';
module.exports = function(title, text) {
return new Promise(function(resolve, reject) {
module.exports = (title, text) => {
return new Promise((resolve, reject) => {
AlertIOS.prompt(
title,
text,
[
{
text: 'Cancel',
onPress: () => {
reject(Error('Cancel Pressed'));
},
style: 'cancel',
},
{
text: 'OK',
onPress: password => {

View File

@ -1,7 +1,7 @@
/* global alert */
import React from 'react';
import { Text, ActivityIndicator, Button, View, TouchableOpacity } from 'react-native';
import { Camera, Permissions } from 'expo';
import { Camera, Permissions, BarCodeScanner } from 'expo';
import PropTypes from 'prop-types';
let EV = require('../../events');
@ -28,13 +28,14 @@ export default class CameraExample extends React.Component {
} // end
async componentWillMount() {
console.warn('here')
const { status } = await Permissions.askAsync(Permissions.CAMERA);
this.setState({
hasCameraPermission: status === 'granted',
onCameraReady: function() {
alert('onCameraReady');
},
barCodeTypes: [Camera.Constants.BarCodeType.qr],
barCodeTypes: [BarCodeScanner.Constants.BarCodeType.qr],
});
}

View File

@ -63,12 +63,18 @@ export default class Settings extends Component {
}}
onPress={async () => {
this.setState({ isLoading: true });
let p1 = await prompt(loc.settings.password, loc.settings.password_explain);
let p1 = await prompt(loc.settings.password, loc.settings.password_explain).catch(() => {
this.setState({ isLoading: false });
this.props.navigation.goBack();
});
if (!p1) {
this.setState({ isLoading: false });
return;
}
let p2 = await prompt(loc.settings.password, loc.settings.retype_password);
let p2 = await prompt(loc.settings.password, loc.settings.retype_password).catch(() => {
this.setState({ isLoading: false });
this.props.navigation.goBack();
});
if (p1 === p2) {
await BlueApp.encryptStorage(p1);
this.setState({

View File

@ -2,7 +2,7 @@
import React from 'react';
import { Text, ActivityIndicator, Button, View, TouchableOpacity } from 'react-native';
import { BlueText, SafeBlueArea, BlueButton } from '../../BlueComponents';
import { Camera, Permissions } from 'expo';
import { Camera, Permissions, BarCodeScanner } from 'expo';
import { SegwitP2SHWallet, LegacyWallet, WatchOnlyWallet } from '../../class';
import PropTypes from 'prop-types';
/** @type {AppStorage} */
@ -123,7 +123,7 @@ export default class ScanQrWif extends React.Component {
onCameraReady: function() {
alert('onCameraReady');
},
barCodeTypes: [Camera.Constants.BarCodeType.qr],
barCodeTypes: [BarCodeScanner.Constants.BarCodeType.qr],
});
}