Jelajahi Sumber

new menu screen, remove action button

David 9 tahun lalu
induk
melakukan
18bc6becf3

+ 5 - 4
src/Router.js

@@ -11,6 +11,8 @@ import Clase from './scenes/Clase.js';
 import Profesor from './scenes/Profesor';
 import Menu from './scenes/Menu';
 import Teoria from './scenes/Clase/Teoria';
+import LSListaClases from './scenes/LSListaClases';
+import MyAbout from './scenes/MyAbout';
 
 const scenes = Actions.create(
 	<Scene key="container">
@@ -22,11 +24,10 @@ const scenes = Actions.create(
 
 		<Scene key="Menu" hideNavBar={false}>
 			<Scene key="MenuScene" title="Menu" component={Menu} panHandlers={null} direction="vertical" />
+			<Scene key="LSClases" title="Clases descargadas" component={LSListaClases} />
 			<Scene key="Teoria" title="Teoria" component={Teoria} />
-		</Scene>
-
-		<Scene key="main" hideNavBar={false}>
-			<Scene key="ListaCursadas" rightTitle="test" onRight={ () => Actions.Live() } component={ListaCursadas} title="Cursadas" />
+			<Scene key="About" title="Acerca de" component={MyAbout} />
+			<Scene key="ListaCursadas" component={ListaCursadas} title="Cursadas" />
 			<Scene key="ViewCursada" component={ListaClases} title="Clases" />
 			<Scene key="ViewClase" component={Clase} title="Clase" />
 			<Scene key="ViewProf" component={Profesor} title="Profesor" />

+ 0 - 5
src/scenes/LSListaClases.js

@@ -67,11 +67,6 @@ class LSListaClases extends Component  {
 
 		return (
 			<View style={{flex:1}}>
-				<CardSection>
-					<Text style={{textAlign:'center', flex: 1, fontSize:18}}>
-						Clases Descargadas
-					</Text>
-				</CardSection>
 				<ListView
 				  enableEmptySections
 				  dataSource={this.dataSource}

+ 1 - 3
src/scenes/ListaClases.js

@@ -5,7 +5,6 @@ import { connect } from 'react-redux';
 import { Actions } from 'react-native-router-flux';
 import { cursadaFetch } from '../actions/';
 import { Card, CardSection, Button } from '../components/common/';
-import MyActionButton from '../components/ActionButton';
 import { ConnectionError } from '../components/common';
 
 class ListaClases extends Component  {
@@ -69,7 +68,7 @@ class ListaClases extends Component  {
           <Text style={{flex:1}}>{fecha}</Text>
         </CardSection>
 
-				{this.renderButton(data)}
+		{this.renderButton(data)}
       </Card>
     );
 	}
@@ -90,7 +89,6 @@ class ListaClases extends Component  {
           dataSource={this.dataSource}
           renderRow={this.renderRow.bind(this)}
         />
-		<MyActionButton />
       </View>
 		);
 	}

+ 0 - 2
src/scenes/ListaCursadas.js

@@ -3,7 +3,6 @@ import { View, Text, ListView } from 'react-native';
 import { connect } from 'react-redux';
 import { cursadasFetch } from '../actions/';
 import ItemCursada from './Cursada/ItemCursada';
-import MyActionButton from '../components/ActionButton';
 import { ConnectionError } from '../components/common';
 
 class ListaCursadas extends Component  {
@@ -38,7 +37,6 @@ class ListaCursadas extends Component  {
 		        enableEmptySections
 		        dataSource={this.dataSource}
 		        renderRow={this.renderRow} />
-					<MyActionButton />
 		</View>
 		);
 	}

+ 14 - 1
src/scenes/Menu.js

@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
-import { View, Text } from 'react-native';
+import { View, Text, TouchableOpacity } from 'react-native';
 import { connect } from 'react-redux';
+import { Actions } from 'react-native-router-flux';
 
 import { initLSClase } from '../actions/';
 import MyAbout from './MyAbout';
@@ -14,38 +15,50 @@ class Menu extends Component  {
 	componentWillReceiveProps() {
 		this.props.initLSClase();
 	}
+
 	render() {
 		return (
 			<View style={{flex:1}}>
+				<TouchableOpacity onPress={() => Actions.ListaCursadas()}>
 				<Card>
 					<CardSection>
 						<Text>Cursadas</Text>
 					</CardSection>
 				</Card>
+				</TouchableOpacity>
 
+				<TouchableOpacity onPress={() => Actions.Live()}>
 				<Card>
 					<CardSection>
 						<Text>Curso en vivo</Text>
 					</CardSection>
 				</Card>
+				</TouchableOpacity>
 
+				<TouchableOpacity onPress={() => Actions.LSClases()}>
 				<Card>
 					<CardSection>
 						<Text>Clases descargadas</Text>
 					</CardSection>
 				</Card>
+				</TouchableOpacity>
 
+				<TouchableOpacity>
 				<Card>
 					<CardSection>
 					<Text>Perfil</Text>
 					</CardSection>
 				</Card>
+				</TouchableOpacity>
 
+				<TouchableOpacity onPress={() => Actions.About()}>
 				<Card>
 					<CardSection>
 					<Text>Como llegar / acerca de / ??</Text>
 					</CardSection>
 				</Card>
+				</TouchableOpacity>
+
 			</View>
 		);
 	};