Skip to content

Commit

Permalink
feat(rn): added an (almost) empty devtools screen
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddi committed Sep 21, 2018
1 parent 2596177 commit f913545
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 13 deletions.
28 changes: 28 additions & 0 deletions client/react-native/common/components/Screens/Settings/Devtools.js
@@ -0,0 +1,28 @@
import React, { PureComponent } from 'react'
import { Image } from 'react-native'
import { Flex, Header } from '../../Library'

export default class Devtools extends PureComponent {
static navigationOptions = ({ navigation }) => ({
header: (
<Header
navigation={navigation}
title='Developer Tools'
titleIcon='terminal'
backBtn
/>
),
})
render () {
return (
<Flex.Cols size={1} align='center' justify='between'>
<Flex.Rows size={1} align='center' justify='between'>
<Image
style={{ width: 300, height: 550 }}
source='https://imgs.xkcd.com/comics/tasks_2x.png'
/>
</Flex.Rows>
</Flex.Cols>
)
}
}
14 changes: 7 additions & 7 deletions client/react-native/common/components/Screens/Settings/List.js
@@ -1,14 +1,9 @@
import React, { PureComponent } from 'react'
import { Menu, Header } from '../../Library'
import { Menu } from '../../Library'

export default class List extends PureComponent {
static navigationOptions = ({ navigation }) => ({
header: (
<Header navigation={navigation} title='Settings' titleIcon='settings' />
),
tabBarVisible: false,
})
render () {
const { navigation } = this.props
return (
<Menu absolute>
<Menu.Section>
Expand Down Expand Up @@ -48,6 +43,11 @@ export default class List extends PureComponent {
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='terminal'
title='Dev tools'
onPress={() => navigation.push('Devtools')}
/>
<Menu.Item
icon='life-buoy'
title='Support'
Expand Down
27 changes: 21 additions & 6 deletions client/react-native/common/components/Screens/Settings/index.js
@@ -1,12 +1,27 @@
import React from 'react'
import { createStackNavigator } from 'react-navigation'
import { Header } from '../../Library'
import List from './List'
import Devtools from './Devtools'
import MyAccount from './MyAccount'
import MyPublicKey from './MyPublicKey'
import MyQRCode from './MyQRCode'

export default createStackNavigator({
List,
MyAccount,
MyPublicKey,
MyQRCode,
})
export default createStackNavigator(
{
List,
Devtools,
MyAccount,
MyPublicKey,
MyQRCode,
},
{
initialRouteName: 'List',
navigationOptions: ({ navigation }) => ({
header: (
<Header navigation={navigation} title='Settings' titleIcon='settings' />
),
tabBarVisible: false,
}),
}
)

0 comments on commit f913545

Please sign in to comment.