-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from terrysahaidak/room-info
Add room info screen; room users list screen
- Loading branch information
Showing
65 changed files
with
1,488 additions
and
53 deletions.
There are no files selected for viewing
Binary file added
BIN
+487 Bytes
android/app/src/main/res/drawable-hdpi/ic_info_outline_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+485 Bytes
android/app/src/main/res/drawable-hdpi/ic_info_outline_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+323 Bytes
android/app/src/main/res/drawable-mdpi/ic_info_outline_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+320 Bytes
android/app/src/main/res/drawable-mdpi/ic_info_outline_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+640 Bytes
android/app/src/main/res/drawable-xhdpi/ic_info_outline_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+655 Bytes
android/app/src/main/res/drawable-xhdpi/ic_info_outline_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+940 Bytes
android/app/src/main/res/drawable-xxhdpi/ic_info_outline_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+953 Bytes
android/app/src/main/res/drawable-xxhdpi/ic_info_outline_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
android/app/src/main/res/drawable-xxxhdpi/ic_info_outline_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.25 KB
android/app/src/main/res/drawable-xxxhdpi/ic_info_outline_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+311 Bytes
android/app/src/main/res/drawable-xxxhdpi/ic_textsms_black_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+338 Bytes
android/app/src/main/res/drawable-xxxhdpi/ic_textsms_white_24dp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React, { | ||
Component, | ||
PropTypes, | ||
TextInput, | ||
Image, | ||
View | ||
} from 'react-native' | ||
import s from '../styles/components/CustomSearchStyles' | ||
import Button from './Button' | ||
|
||
class CustomSearch extends Component { | ||
constructor(props) { | ||
super(props) | ||
|
||
this.focus = this.focus.bind(this) | ||
this.blur = this.blur.bind(this) | ||
} | ||
|
||
focus() { | ||
this.refs.textInput.focus() | ||
} | ||
|
||
blur() { | ||
this.refs.textInput.blur() | ||
} | ||
|
||
render() { | ||
const {value, onChange, onBackPress, onClearPress} = this.props | ||
return ( | ||
<View style={s.container}> | ||
<Button | ||
styles={s.button} | ||
onPress={() => onBackPress()}> | ||
<Image | ||
style={s.buttonIcon} | ||
source={require('image!ic_arrow_back_black_24dp')} /> | ||
</Button> | ||
<View style={s.innerContainer}> | ||
<TextInput | ||
ref="textInput" | ||
style={s.textInput} | ||
value={value} | ||
keyboardShouldPersistTaps={false} | ||
underlineColorAndroid="white" | ||
placeholderTextColor="gray" | ||
onChange={onChange} | ||
placeholder="Search" /> | ||
</View> | ||
{!!value && value.length !== 0 && ( | ||
<Button | ||
styles={s.button} | ||
onPress={() => onClearPress()}> | ||
<Image | ||
style={s.buttonIcon} | ||
source={require('image!ic_close_black_24dp')} /> | ||
</Button> | ||
)} | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
CustomSearch.propTypes = { | ||
value: PropTypes.string, | ||
onChange: PropTypes.func, | ||
onBackPress: PropTypes.func, | ||
onClearPress: PropTypes.func | ||
} | ||
|
||
export default CustomSearch |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { | ||
PropTypes, | ||
View | ||
} from 'react-native'; | ||
|
||
const Divider = ({inset, style, light}) => { | ||
return ( | ||
<View | ||
style={[ | ||
{height: 1}, | ||
{marginLeft: inset ? 72 : 0}, | ||
{backgroundColor: light ? 'rgba(0,0,0,.12)' : 'rgba(255,255,255,.12)'}, | ||
style | ||
]} /> | ||
) | ||
} | ||
|
||
Divider.defaultProps = { | ||
light: true | ||
} | ||
|
||
Divider.propTypes = { | ||
inset: PropTypes.bool, | ||
style: PropTypes.object, | ||
light: PropTypes.bool | ||
} | ||
|
||
export default Divider |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { | ||
PropTypes, | ||
View, | ||
Text | ||
} from 'react-native' | ||
|
||
const Heading = ({text, color, styles}) => { | ||
return ( | ||
<View style={[ | ||
{ | ||
height: 24, | ||
padding: 16 | ||
}, | ||
styles | ||
]}> | ||
<Text style={{ | ||
fontWeight: 'bold', | ||
color | ||
}}> | ||
{text} | ||
</Text> | ||
</View> | ||
) | ||
} | ||
|
||
Heading.defaultProps = { | ||
color: 'black' | ||
} | ||
|
||
Heading.propTypes = { | ||
text: PropTypes.string.isRequired, | ||
color: PropTypes.string, | ||
styles: PropTypes.object | ||
} | ||
|
||
export default Heading |
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
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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import React, { | ||
PropTypes, | ||
View, | ||
Text | ||
} from 'react-native' | ||
import s from '../../styles/screens/RoomInfo/RepoInfoStyles' | ||
|
||
import Avatar from '../Avatar' | ||
import Divider from '../Divider' | ||
import Heading from '../Heading' | ||
import Button from '../Button' | ||
import ParsedText from '../ParsedText' | ||
|
||
const RepoInfo = ({name, owner, description, open_issues_count, | ||
stargazers_count, watchers_count, html_url, handleUrlPress, onStatItemPress}) => { | ||
return ( | ||
<View style={s.container}> | ||
<View style={s.header}> | ||
<Avatar | ||
src={owner.avatar_url} | ||
size={50} /> | ||
<View style={s.headerTextContainer}> | ||
<Text style={s.name}>{name}</Text> | ||
<Text style={s.owner}>by {owner.login}</Text> | ||
</View> | ||
</View> | ||
<Divider /> | ||
{!!description && ( | ||
<View style={s.descriptionBlock}> | ||
<Heading | ||
text="Description" /> | ||
<View style={s.itemContainer}> | ||
<ParsedText | ||
text={description} | ||
handleUrlPress={handleUrlPress} /> | ||
</View> | ||
<Divider /> | ||
</View> | ||
)} | ||
<Heading | ||
text="Statistics" /> | ||
<View style={s.itemContainer}> | ||
<View style={s.statContainer}> | ||
<Button | ||
styles={s.button} | ||
onPress={() => onStatItemPress(html_url, 'issues')}> | ||
<View style={s.statItemContainer}> | ||
<Text style={s.statTop}>{open_issues_count}</Text> | ||
<Text style={s.statBotoom}>issues</Text> | ||
</View> | ||
</Button> | ||
<Button | ||
styles={s.button} | ||
onPress={() => onStatItemPress(html_url, 'watchers')}> | ||
<View style={s.statItemContainer}> | ||
<Text style={s.statTop}>{watchers_count}</Text> | ||
<Text style={s.statBotoom}>watchers</Text> | ||
</View> | ||
</Button> | ||
<Button | ||
styles={s.button} | ||
onPress={() => onStatItemPress(html_url, 'stargazers')}> | ||
<View style={s.statItemContainer}> | ||
<Text style={s.statTop}>{stargazers_count}</Text> | ||
<Text style={s.statBotoom}>star</Text> | ||
</View> | ||
</Button> | ||
</View> | ||
</View> | ||
<Divider /> | ||
</View> | ||
) | ||
} | ||
|
||
RepoInfo.propTypes = { | ||
name: PropTypes.string, | ||
owner: PropTypes.object, | ||
description: PropTypes.string, | ||
open_issues_count: PropTypes.number, | ||
stargazers_count: PropTypes.number, | ||
watchers_count: PropTypes.number, | ||
html_url: PropTypes.string, | ||
handleUrlPress: PropTypes.func, | ||
onStatItemPress: PropTypes.func | ||
} | ||
|
||
export default RepoInfo |
Oops, something went wrong.