Merge pull request #113 from BlueWallet/smalluifixes

Remove Drawer.
This commit is contained in:
Marcos Rodriguez Vélez 2018-10-30 22:24:21 -04:00 committed by GitHub
commit 01ad4a8d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 76 deletions

75
App.js
View File

@ -1,12 +1,5 @@
import './shim.js';
import React from 'react';
import PropTypes from 'prop-types';
import { Text, ScrollView, StyleSheet } from 'react-native';
import { createDrawerNavigator, SafeAreaView } from 'react-navigation';
import MainBottomTabs from './MainBottomTabs';
import Selftest from './screen/selftest';
import About from './screen/settings/about';
import PlausibleDeniability from './screen/plausibledeniability';
import Sentry from 'sentry-expo';
Sentry.config('https://23377936131848ca8003448a893cb622@sentry.io/1295736').install();
@ -18,70 +11,4 @@ if (!Error.captureStackTrace) {
Error.captureStackTrace = () => {};
}
const pkg = require('./package.json');
const appjson = require('./app.json');
// <DrawerItems {...props} />
const CustomDrawerContentComponent = props => (
<ScrollView>
<SafeAreaView style={styles.container} forceInset={{ top: 'always', horizontal: 'never' }}>
<Text onPress={() => props.navigation.navigate('About')} style={styles.heading}>
{' '}
{pkg.name} v{pkg.version} (build {appjson.expo.ios.buildNumber})
</Text>
</SafeAreaView>
</ScrollView>
);
CustomDrawerContentComponent.propTypes = {
navigation: PropTypes.shape({
navigate: PropTypes.func,
}),
};
const styles = StyleSheet.create({
container: {
marginTop: 20,
flex: 1,
},
heading: {
textAlign: 'center',
color: 'black',
fontWeight: 'bold',
fontSize: 20,
},
});
const TabsInDrawer = createDrawerNavigator(
{
MainBottomTabs: {
screen: MainBottomTabs,
navigationOptions: {
drawer: () => ({
label: 'Tabs',
}),
},
},
Selftest: {
screen: Selftest,
navigationOptions: {},
},
About: {
screen: About,
navigationOptions: {},
},
PlausibleDeniability: {
screen: PlausibleDeniability,
navigationOptions: {},
},
},
{
contentComponent: CustomDrawerContentComponent,
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle',
},
);
export default TabsInDrawer;
export default MainBottomTabs;

View File

@ -15,7 +15,9 @@ import PropTypes from 'prop-types';
/** @type {AppStorage} */
let BlueApp = require('../../BlueApp');
const { width, height } = Dimensions.get('window');
let loc = require('../../loc/');
const loc = require('../../loc/');
const pkg = require('../../package.json');
const appjson = require('../../app.json');
export default class About extends Component {
static navigationOptions = () => ({
@ -45,7 +47,7 @@ export default class About extends Component {
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<ScrollView>
<BlueCard>
<BlueText h4>BlueWallet is free and opensource Bitcoin wallet. Licensed MIT.</BlueText>
<BlueText h4>BlueWallet is a free and open source Bitcoin wallet. Licensed MIT.</BlueText>
<BlueSpacing20 />
<BlueButton
@ -114,6 +116,11 @@ export default class About extends Component {
<BlueTextCentered>
{Constants.platform.ios.model} ({Constants.platform.ios.platform})
</BlueTextCentered>
<BlueSpacing20 />
<BlueTextCentered>
{pkg.name} v{pkg.version} (build {appjson.expo.ios.buildNumber})
</BlueTextCentered>
</BlueCard>
</ScrollView>
</SafeBlueArea>