This commit is contained in:
Marcos Rodriguez Vélez 2018-09-18 02:48:53 -04:00
parent c963e5206e
commit 418e69cdc7
No known key found for this signature in database
GPG key ID: 2C5D5738B268636C
8 changed files with 56 additions and 52 deletions

View file

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

View file

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

10
package-lock.json generated
View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
/* global alert */ /* global alert */
import React from 'react'; import React from 'react';
import { Text, ActivityIndicator, Button, View, TouchableOpacity } from 'react-native'; 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'; import PropTypes from 'prop-types';
let EV = require('../../events'); let EV = require('../../events');
@ -28,13 +28,14 @@ export default class CameraExample extends React.Component {
} // end } // end
async componentWillMount() { async componentWillMount() {
console.warn('here')
const { status } = await Permissions.askAsync(Permissions.CAMERA); const { status } = await Permissions.askAsync(Permissions.CAMERA);
this.setState({ this.setState({
hasCameraPermission: status === 'granted', hasCameraPermission: status === 'granted',
onCameraReady: function() { onCameraReady: function() {
alert('onCameraReady'); 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 () => { onPress={async () => {
this.setState({ isLoading: true }); 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) { if (!p1) {
this.setState({ isLoading: false }); this.setState({ isLoading: false });
return; 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) { if (p1 === p2) {
await BlueApp.encryptStorage(p1); await BlueApp.encryptStorage(p1);
this.setState({ this.setState({

View file

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