-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rn): fix Contacts Details instead of Chats Details, Settings pan…
…el added
- Loading branch information
Showing
4 changed files
with
129 additions
and
51 deletions.
There are no files selected for viewing
48 changes: 2 additions & 46 deletions
48
client/react-native/common/components/Screens/Chats/Detail.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 46 additions & 2 deletions
48
client/react-native/common/components/Screens/Contacts/Detail.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
82
client/react-native/common/components/Screens/Settings/List.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} | ||
} |