Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
the-gatekeeper committed May 20, 2017
2 parents 388c34f + 8ef6736 commit bda0a52
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
32 changes: 16 additions & 16 deletions components/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class VRTextReader extends React.Component {
//$FlowFixMe
this._start = this._start.bind(this);
//$FlowFixMe
//this._pauze - this._pauze.bind(this);
this._pauze - this._pauze.bind(this);

this.state = {
intervalId: 0,
Expand Down Expand Up @@ -127,6 +127,20 @@ export default class VRTextReader extends React.Component {
render() {
return (
<View>
<View style={{
flex: 1,
flexDirection: "row",
width: 5,
alignItems: "left",
transform: [{ translate: [-4, 1, -5] }],
marginBottom: 0.1
}}>
<VrButton
style={{ width: 1.7, height: 0.3 }}
onClick={this.props.backPressed}>
<Text style={{ fontSize: 0.2, textAlign: "left" }}>Back</Text>
</VrButton>
</View>
<Profile speaker={this.props.speaker} />
<View
style={{
Expand Down Expand Up @@ -164,7 +178,7 @@ export default class VRTextReader extends React.Component {
backgroundColour: 'white',
transform: [{ translate: [-4, 1, -5] }]
}}>
<View style={{ margin: 0, height: 1, width: 2 }}>
<View style={{ marginLeft: 0.3, height: 1, width: 2 }}>
<Text style={{ fontSize: 0.6, textAlign: 'right', color: 'white' }}>{this.state.leftPartOfWord}</Text>
</View>
<View style={{ margin: 0, height: 1 }}>
Expand All @@ -174,20 +188,6 @@ export default class VRTextReader extends React.Component {
<Text style={{ fontSize: 0.6, textAlign: 'left', color: 'white' }}>{this.state.rightPartOfWord}</Text>
</View>
</View>
<View style={{
flex: 1,
flexDirection: "row",
width: 5,
alignItems: "stretch",
transform: [{ translate: [-4, 1, -5] }],
marginBottom: 0.1
}}>
<VrButton
style={{ width: 1.7, height: 0.3, backgroundColor: "grey" }}
onClick={this.props.backPressed}>
<Text style={{ fontSize: 0.2, textAlign: "center" }}>Back</Text>
</VrButton>
</View>
</View>
);
}
Expand Down
12 changes: 7 additions & 5 deletions components/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export default class ViewColoredBoxesWithText extends Component {
props: Props;

render() {
const { avatarUrl, name } = this.props.speaker;

const { avatarUrl, name, talks } = this.props.speaker;
return (
<View
style={{
Expand All @@ -38,13 +37,16 @@ export default class ViewColoredBoxesWithText extends Component {
marginBottom: 0.1
}}
>
<View style={{ marginRight: 1, height: 2, width: 2, backgroundColor: "white" }}>
<View style={{ marginRight: 0.2, height: 2, width: 2 }}>
<Image source={{ uri: avatarUrl }} style={{ width: 2, height: 2 }}/>
</View>
<View
style={{ width: 2, height: 2, backgroundColor: "grey" }}
style={{ width: 3, height: 2}}
>
<Text style={{ fontSize: 0.2, textAlign: "center" }}>{name}</Text>
<Text style={{ fontSize: 0.2, textAlign: "left" }}>Name:</Text>
<Text style={{ fontSize: 0.2, textAlign: "left", marginBottom: 0.1 }}>{name}</Text>
<Text style={{ fontSize: 0.2, textAlign: "left" }}>Talk:</Text>
<Text style={{ fontSize: 0.2, textAlign: "left" }}>{talks[0].title}</Text>
</View>
</View>
);
Expand Down
4 changes: 2 additions & 2 deletions components/speaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default class Speaker extends Component {
render() {
const { props } = this;
const { selected } = this.state;
console.log("render");
const url = props.profileUrl ? props.profileUrl : defaultURL;
return (
<View
Expand All @@ -49,12 +48,12 @@ export default class Speaker extends Component {
>
<VrButton onClick={props.onClick}>
<View>
<View style={{backgroundColor:'black'}}>
<Image
source={{ uri: url }}
style={{
width: 1,
height: 1,
backgroundColor: "black",
opacity: selected ? 1 : 0.5
}}
/>
Expand Down Expand Up @@ -89,6 +88,7 @@ export default class Speaker extends Component {
>
{props.title}
</Text>
</View>
</View>
</View>
</VrButton>
Expand Down
4 changes: 1 addition & 3 deletions components/speakerList.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,14 @@ export default class VRTextReader extends React.Component {
delta = -1;
} else if (index > selectedSpeakerIndex + 2) {
delta = 1;
} else {
delta = 0;
}

return {
profileUrl,
title,
name,
onLook: () => {
if (delta !== 0) {
if (delta) {
this.setState({
offset: this.state.offset - delta
});
Expand Down

0 comments on commit bda0a52

Please sign in to comment.