Skip to content

Commit

Permalink
feat(rn): fix Contacts Details instead of Chats Details, Settings pan…
Browse files Browse the repository at this point in the history
…el added
  • Loading branch information
aeddi authored and 90dy committed Sep 6, 2018
1 parent e0620ef commit 472bd12
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 51 deletions.
48 changes: 2 additions & 46 deletions client/react-native/common/components/Screens/Chats/Detail.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,7 @@
import React, { PureComponent } from 'react'
import { Menu } from '../../Library'
import { colors } from '../../../constants'
import { PureComponent } from 'react'

export default class Detail extends PureComponent {
render () {
return (
<Menu absolute>
<Menu.Section>
<Menu.Item
icon='message-circle'
title='Send a message'
onPress={() => console.log('Send')}
/>
<Menu.Item
icon='phone'
title='Call'
onPress={() => console.log('Call')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='eye'
title='View public key'
onPress={() => console.log('Public')}
/>
<Menu.Item
icon='share'
title='Share this contact'
onPress={() => console.log('Share')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='slash'
title='Block this contact'
onPress={() => console.log('Block')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='trash-2'
title='Delete this contact'
color={colors.error}
onPress={() => console.log('Delete')}
/>
</Menu.Section>
</Menu>
)
return null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Header = ({ navigation }) => (
]}
>
<Flex.Cols size={1} align='start' space='between'>
<Text icon='feather-users' large color={colors.black}>
<Text icon='message-circle' large color={colors.black}>
Chats
</Text>
</Flex.Cols>
Expand Down
48 changes: 46 additions & 2 deletions client/react-native/common/components/Screens/Contacts/Detail.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,54 @@
import { PureComponent } from 'react'
import React, { PureComponent } from 'react'
import { Menu } from '../../Library'
import { colors } from '../../../constants'

export default class Detail extends PureComponent {
static navigationOptions = ({ navigation }) => ({
tabBarVisible: false,
})
render () {
return null
return (
<Menu absolute>
<Menu.Section>
<Menu.Item
icon='message-circle'
title='Send a message'
onPress={() => console.log('Send')}
/>
<Menu.Item
icon='phone'
title='Call'
onPress={() => console.log('Call')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='eye'
title='View public key'
onPress={() => console.log('Public')}
/>
<Menu.Item
icon='share'
title='Share this contact'
onPress={() => console.log('Share')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='slash'
title='Block this contact'
onPress={() => console.log('Block')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='trash-2'
title='Delete this contact'
color={colors.error}
onPress={() => console.log('Delete')}
/>
</Menu.Section>
</Menu>
)
}
}
82 changes: 80 additions & 2 deletions client/react-native/common/components/Screens/Settings/List.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,85 @@
import { PureComponent } from 'react'
import React, { PureComponent } from 'react'
import { colors } from '../../../constants'
import { Menu, Flex, Text } from '../../Library'
import {
padding,
borderBottom,
} from '../../../styles'

const Header = ({ navigation }) => (
<Flex.Rows
size={1}
style={[
{ backgroundColor: colors.white, height: 72 },
borderBottom,
padding,
]}
>
<Flex.Cols size={1} align='start' space='between'>
<Text icon='settings' large color={colors.black}>
Settings
</Text>
</Flex.Cols>
</Flex.Rows>
)

export default class List extends PureComponent {
static navigationOptions = ({ navigation }) => ({
header: <Header navigation={navigation} />,
tabBarVisible: false,
})
render () {
return null
return (
<Menu absolute>
<Menu.Section>
<Menu.Item
icon='user'
title='My account'
onPress={() => console.log('Account')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='lock'
title='Security & Privacy'
onPress={() => console.log('Security')}
/>
<Menu.Item
icon='send'
title='Message settings'
onPress={() => console.log('Message')}
/>
<Menu.Item
icon='bell'
title='Notifications'
onPress={() => console.log('Notifications')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='info'
title='About Berty'
onPress={() => console.log('About')}
/>
<Menu.Item
icon='activity'
title='News'
onPress={() => console.log('News')}
/>
</Menu.Section>
<Menu.Section>
<Menu.Item
icon='life-buoy'
title='Support'
onPress={() => console.log('Support')}
/>
<Menu.Item
icon='layers'
title='Legal mentions'
onPress={() => console.log('Legal')}
/>
</Menu.Section>
</Menu>
)
}
}

0 comments on commit 472bd12

Please sign in to comment.