diff --git a/mobile/src/screens/Home.js b/mobile/src/screens/Home.js index 02c3b03..9b002a6 100644 --- a/mobile/src/screens/Home.js +++ b/mobile/src/screens/Home.js @@ -12,14 +12,14 @@ export class Home extends React.Component { static navigatorButtons = { rightButtons: [ { + id: 'viewer', icon: require('./images/ar-glases.png'), - id: 'arview', } ], leftButtons: [ { - icon: require('./images/logout.png'), id: 'logout', + icon: require('./images/logout.png'), } ] } @@ -55,13 +55,20 @@ export class Home extends React.Component { api.logout().then(() => { this.props.navigator.showModal({ screen: 'app.Login' }) }) + break + case 'viewer': + this.props.navigator.push({ + screen: 'app.Viewer', + animation: 'slide-horizontal', + }) + break case 'willAppear': break case 'didAppear': if (!api.loggedInUser) { this.props.navigator.showModal({ screen: 'app.Login' }) } - break; + break case 'willDisappear': break case 'didDisappear': diff --git a/mobile/src/screens/Viewer.js b/mobile/src/screens/Viewer.js index e69de29..6d814b0 100644 --- a/mobile/src/screens/Viewer.js +++ b/mobile/src/screens/Viewer.js @@ -0,0 +1,43 @@ +import React from 'react' +import { StyleSheet, View, TouchableOpacity, Image } from 'react-native' +import backImage from './images/back.png' + +export class Viewer extends React.Component { + static navigatorStyle = { + navBarHidden: true, + } + + static styles = StyleSheet.create({ + container: { + height: '100%', + width: '100%', + justifyContent: 'flex-start', + backgroundColor: '#AAAAAA', + }, + button: { + marginTop: 40, + marginLeft: 20, + width: 45, + height: 45, + } + }) + + constructor(props) { + super(props) + this._handlePressButton = this._handlePressButton.bind(this) + } + + _handlePressButton() { + this.props.navigator.pop() + } + + render() { + return ( + + + + + + ); + } +} diff --git a/mobile/src/screens/images/back.png b/mobile/src/screens/images/back.png new file mode 100644 index 0000000..1fd82ca Binary files /dev/null and b/mobile/src/screens/images/back.png differ diff --git a/mobile/src/screens/index.js b/mobile/src/screens/index.js index c92144c..947bf9a 100644 --- a/mobile/src/screens/index.js +++ b/mobile/src/screens/index.js @@ -1,7 +1,7 @@ import { Home } from './Home' import { Login } from './Login' import { Error } from './Error' -import { View } from './Viewer' +import { Viewer } from './Viewer' import { Navigation } from 'react-native-navigation' export function registerScreens() {