Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Overtorment committed Jan 30, 2018
1 parent 6447c0f commit 08a5749
Show file tree
Hide file tree
Showing 41 changed files with 15,113 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": ["babel-preset-expo"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}
75 changes: 75 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore templates for 'react-native init'
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.*

; Ignore RN jest
<PROJECT_ROOT>/node_modules/react-native/jest/.*

; Ignore RNTester
<PROJECT_ROOT>/node_modules/react-native/RNTester/.*

; Ignore the website subdir
<PROJECT_ROOT>/node_modules/react-native/website/.*

; Ignore the Dangerfile
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js

; Ignore Fbemitter
<PROJECT_ROOT>/node_modules/fbemitter/.*

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/node_modules/react-native/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore polyfills
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.*

; Ignore various node_modules
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.*
<PROJECT_ROOT>/node_modules/expo/.*
<PROJECT_ROOT>/node_modules/react-navigation/.*
<PROJECT_ROOT>/node_modules/xdl/.*
<PROJECT_ROOT>/node_modules/reqwest/.*
<PROJECT_ROOT>/node_modules/metro-bundler/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/expo/flow/

[options]
emoji=true

module.system=haste

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[version]
^0.56.0
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# expo
.expo/

# dependencies
/node_modules

# misc
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
77 changes: 77 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/** @type {AppStorage} */
let BlueApp = require('./BlueApp')
import './shim.js'
if (!Error.captureStackTrace) { // captureStackTrace is only available when debugging
Error.captureStackTrace = () => {};
}
import React from 'react'
import { Text, ScrollView, StyleSheet } from 'react-native'
import { DrawerNavigator } from 'react-navigation'
import MainBottomTabs from './MainBottomTabs'
// import SecondaryBottomTabs from './SecondaryBottomTabs';
import { SafeAreaView } from 'react-navigation'
const pkg = require('./package.json')

// <DrawerItems {...props} />

const CustomDrawerContentComponent = (props) => (
<ScrollView>
<SafeAreaView style={styles.container} forceInset={{ top: 'always', horizontal: 'never' }}>

<Text onPress={() => props.navigation.navigate('AddWallet')} style={styles.heading}> {pkg.name} v{pkg.version}</Text>
</SafeAreaView>
</ScrollView>
)

const styles = StyleSheet.create({
container: {
marginTop: 20,
flex: 1
},
heading: {
textAlign: 'center',
color: 'black',
fontWeight: 'bold',
fontSize: 20
}
})

/* import scanQrWifLegacyAddress from './screen/wallets/scanQrWifLegacyAddress'
import scanQrWifSegwitP2SHAddress from './screen/wallets/scanQrWifSegwitP2SHAddress' */

const TabsInDrawer = DrawerNavigator({
MainBottomTabs: {
screen: MainBottomTabs,
navigationOptions: {
drawer: () => ({
label: 'Tabs'
})
}
}

/* SecondaryBottomTabs: {
screen: SecondaryBottomTabs,
path: 'chat/aaa',
navigationOptions: {
drawer: () => ({
label: 'SecondaryBottomTabs',
icon: ({ tintColor }) => (
<MaterialIcons
name="filter-2"
size={24}
style={{ color: tintColor }}
/>
),
}),
},
}, */

}, {
contentComponent: CustomDrawerContentComponent,
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle',

})

export default TabsInDrawer
9 changes: 9 additions & 0 deletions App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'
import App from './App'

import renderer from 'react-test-renderer'

it('renders without crashing', () => {
const rendered = renderer.create(<App />).toJSON()
expect(rendered).toBeTruthy()
})
17 changes: 17 additions & 0 deletions BlueApp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @exports {AppStorage}
*/

import {AppStorage} from './class'
let EV = require('./events')

let BlueApp = new AppStorage()

;(async () => {
await BlueApp.loadFromDisk()
console.log('loaded from disk')
EV(EV.enum.WALLETS_COUNT_CHANGED)
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED)
})()

module.exports = BlueApp
Loading

0 comments on commit 08a5749

Please sign in to comment.