mirror of
https://github.com/Blair-SGA-Dev-Team/blazerapp.git
synced 2024-11-21 20:41:16 -05:00
Deployment fix
This commit is contained in:
parent
f327c92573
commit
92686182d5
16
app/App.js
16
app/App.js
|
@ -27,17 +27,17 @@ import Staff from './Staff'
|
|||
import OpeningPage from './OpeningPage';
|
||||
import OpenPage from './OpenPage';
|
||||
import Ionicons from 'react-native-vector-icons/Ionicons';
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
import AsyncStorage from '@react-native-community/async-storage'
|
||||
|
||||
const Tab = createBottomTabNavigator();
|
||||
|
||||
AsyncStorage.getItem('language')
|
||||
/*AsyncStorage.getItem('language')
|
||||
.then((token) => {
|
||||
console.log("lang: " + token);
|
||||
I18n.locale = token;
|
||||
});
|
||||
|
||||
*/
|
||||
AsyncStorage.getItem('announcementNotifs')
|
||||
.then((token) => {
|
||||
console.log("announcementNotifs: " + token);
|
||||
|
@ -86,11 +86,11 @@ class App extends React.Component {
|
|||
fontSize:16
|
||||
}}}
|
||||
>
|
||||
<Tab.Screen name={I18n.t('app.home')} component={Home}/>
|
||||
<Tab.Screen name={I18n.t('app.calendar')} component={Calendar}/>
|
||||
<Tab.Screen name={I18n.t('app.clubs')} component={Clubs}/>
|
||||
<Tab.Screen name={I18n.t('app.staff')} component={Staff}/>
|
||||
<Tab.Screen name={I18n.t('app.more')} component={More}/>
|
||||
<Tab.Screen name="Home" component={Home}/>
|
||||
<Tab.Screen name="Calendar" component={Calendar}/>
|
||||
<Tab.Screen name="Clubs" component={Clubs}/>
|
||||
<Tab.Screen name="Staff" component={Staff}/>
|
||||
<Tab.Screen name="More" component={More}/>
|
||||
</Tab.Navigator>
|
||||
: <OpenPage />}
|
||||
</NavigationContainer>
|
||||
|
|
149
app/Calendar.js
149
app/Calendar.js
|
@ -1,4 +1,4 @@
|
|||
import React, {useState} from 'react';
|
||||
/*import React, {useState} from 'react';
|
||||
import {
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
|
@ -16,7 +16,7 @@ import {
|
|||
} from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
import styles from './styles/liststyles'
|
||||
import { url } from './resources/fetchInfo.json'
|
||||
|
||||
|
@ -125,6 +125,7 @@ class Calendar extends React.Component {
|
|||
.then((json) => {
|
||||
const data = JSON.parse(json).data
|
||||
data.sort((a,b)=>new Date(b.date).getTime()-new Date(a.date).getTime())
|
||||
console.log(data);
|
||||
this.setState({data: data});
|
||||
})
|
||||
.catch((error) => console.error(error))
|
||||
|
@ -138,7 +139,149 @@ class Calendar extends React.Component {
|
|||
colors={['#f99', 'white']}
|
||||
style = {{height: '100%', borderBottomColor:'black', borderBottomWidth:0.5, display: 'flex', justifyContent: 'flex-end', paddingBottom: '2.5%'}}
|
||||
>
|
||||
<Text style = {{fontSize: 24, fontWeight: 'bold', alignSelf: 'center'}}>{I18n.t('calendar.calendarEvents')}</Text>
|
||||
<Text style = {{fontSize: 24, fontWeight: 'bold', alignSelf: 'center'}}>Calendar Events</Text>
|
||||
</LinearGradient>
|
||||
|
||||
</View>
|
||||
<FlatList
|
||||
data={this.state.data}
|
||||
renderItem={item=><Event item={item}/>}
|
||||
keyExtractor={item=>JSON.stringify(item)}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Calendar;*/
|
||||
|
||||
import React, {useState} from 'react';
|
||||
import {
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
ScrollView,
|
||||
View,
|
||||
Text,
|
||||
StatusBar,
|
||||
FlatList,
|
||||
TouchableOpacity,
|
||||
Image,
|
||||
} from 'react-native';
|
||||
|
||||
import {
|
||||
ReloadInstructions,
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
|
||||
import styles from './styles/liststyles'
|
||||
import { url } from './resources/fetchInfo.json'
|
||||
|
||||
const getCurrentDate=()=>{
|
||||
var date = new Date().getDate();
|
||||
var month = new Date().getMonth() + 1;
|
||||
var year = new Date().getFullYear();
|
||||
|
||||
return year + '-' + month + '-' + date;
|
||||
}
|
||||
|
||||
const Event = ({item}) => {
|
||||
const [visible, setVisible] = useState(false)
|
||||
const date = item.item.date.split('-')
|
||||
const today = new Date(getCurrentDate())
|
||||
const week = new Date().setDate(new Date().getDate() - 8)
|
||||
const itemDate = new Date(item.item.date)
|
||||
|
||||
const extra = (
|
||||
<>
|
||||
<Text style={{fontSize:20}}>{item.item.text}</Text>
|
||||
<Text style={{fontSize:20}}>Location: {item.item.location}</Text>
|
||||
</>
|
||||
)
|
||||
if (itemDate >= today) {
|
||||
return (
|
||||
<TouchableOpacity style={styles.item1} onPress={()=>setVisible(!visible)} activeOpacity={0.8}>
|
||||
<View style = {{display: 'flex', flexDirection: 'row', alignContent: 'center', justifyContent: 'space-between'}}>
|
||||
<View style = {{display: 'flex', flexDirection: 'row', alignContent: 'center', width: '60%'}}>
|
||||
<Image source ={require('./assets/calendar.png')} style = {{height: 40, width: 40, marginRight: 15}}/>
|
||||
<Text style={styles.title3}>{item.item.title}</Text>
|
||||
</View>
|
||||
<View style = {{display: 'flex', flexDirection: 'row', alignContent: 'center'}}>
|
||||
<Text style = {{fontSize: 16, alignSelf: 'center'}}>{`${date[1]}/${date[2]}/${date[0]}`}</Text>
|
||||
</View>
|
||||
</View>
|
||||
{visible?extra:<></>}
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
else if (itemDate >= week){
|
||||
return (
|
||||
<TouchableOpacity style={{backgroundColor: '#e3e3e3', padding: 15, borderBottomWidth: 1, borderColor: 'black', width: '100%',}} onPress={()=>setVisible(!visible)} activeOpacity={0.8}>
|
||||
<View style = {{display: 'flex', flexDirection: 'row', alignContent: 'center', justifyContent: 'space-between'}}>
|
||||
<View style = {{display: 'flex', flexDirection: 'row', alignContent: 'center', width: '60%'}}>
|
||||
<Image source ={require('./assets/calendar.png')} style = {{height: 40, width: 40, marginRight: 15}}/>
|
||||
<Text style={styles.title3}>{item.item.title}</Text>
|
||||
</View>
|
||||
<View style = {{display: 'flex', flexDirection: 'row', alignContent: 'center'}}>
|
||||
<Text style = {{fontSize: 16, alignSelf: 'center'}}>{`${date[1]}/${date[2]}/${date[0]}`}</Text>
|
||||
</View>
|
||||
</View>
|
||||
{visible?extra:<></>}
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
else {
|
||||
return (
|
||||
null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class Calendar extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getData()
|
||||
this.props.navigation.addListener(
|
||||
'focus',
|
||||
() => {
|
||||
this.getData()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
getData() {
|
||||
fetch(`${url}/api/en/events`,{
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache'
|
||||
} })
|
||||
.then((response) => {
|
||||
return response.text();
|
||||
})
|
||||
.then((json) => {
|
||||
const data = JSON.parse(json).data
|
||||
data.sort((a,b)=>new Date(b.date).getTime()-new Date(a.date).getTime())
|
||||
console.log(data);
|
||||
this.setState({data: data});
|
||||
})
|
||||
.catch((error) => console.error(error))
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<View style = {{height: 56, display: 'flex'}}>
|
||||
<LinearGradient
|
||||
colors={['#f99', 'white']}
|
||||
style = {{height: '100%', borderBottomColor:'black', borderBottomWidth:0.5, display: 'flex', justifyContent: 'flex-end', paddingBottom: '2.5%'}}
|
||||
>
|
||||
<Text style = {{fontSize: 24, fontWeight: 'bold', alignSelf: 'center'}}>Calendar Events</Text>
|
||||
</LinearGradient>
|
||||
|
||||
</View>
|
||||
|
|
|
@ -160,7 +160,7 @@ class Clubs extends React.Component {
|
|||
<SafeAreaView style={styles.container}>
|
||||
<SearchBar
|
||||
lightTheme
|
||||
placeholder={I18n.t('clubs.searchClubs')}
|
||||
placeholder={'Search Clubs'}
|
||||
onChangeText={this.updateSearch}
|
||||
onCancel={this.clearSearch}
|
||||
onClear={this.clearSearch}
|
||||
|
|
20
app/Home.js
20
app/Home.js
|
@ -30,7 +30,7 @@ import { NavigationContainer } from '@react-navigation/native'
|
|||
import { createStackNavigator } from '@react-navigation/stack'
|
||||
import Announcements from './Announcements'
|
||||
import AsyncStorage from '@react-native-community/async-storage'
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
|
||||
|
||||
const getCurrentDate=()=>{
|
||||
|
@ -339,9 +339,9 @@ function HomeScreen (props) {
|
|||
<ScrollView style={{height: '100%', backgroundColor: 'white'}}>
|
||||
<View style={{height: 275, backgroundColor: 'white', padding: '2%'}}>
|
||||
<View style={{display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: '2%'}}>
|
||||
<Text style={liststyles.homeTitle}>{I18n.t('home.whatsNew')}</Text>
|
||||
<Text style={liststyles.homeTitle}>Whats New</Text>
|
||||
<TouchableOpacity onPress={()=>props.navigation.navigate('new', {data:props.data})}>
|
||||
<Text style={{color: 'blue', textDecorationLine: 'underline'}}>{I18n.t('home.viewAll')}</Text>
|
||||
<Text style={{color: 'blue', textDecorationLine: 'underline'}}>View All</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<ScrollView horizontal='true' style={{display: 'flex', flexDirection: 'row', paddingHorizontal: '2%'}}></ScrollView>
|
||||
|
@ -357,7 +357,7 @@ function HomeScreen (props) {
|
|||
</View>
|
||||
|
||||
<View style={{height: 275, backgroundColor: 'white', padding: '2%'}}>
|
||||
<Text style={liststyles.homeTitle}>{I18n.t('home.SOTW')}</Text>
|
||||
<Text style={liststyles.homeTitle}>Student of the Week</Text>
|
||||
<View style={{display: 'flex', flexDirection: 'row', paddingTop: '5%', paddingHorizontal: '2%', justifyContent: 'space-between'}}>
|
||||
<View style={{display: 'flex', borderWidth: 1, borderColor: 'black', borderRadius: 8, width: '32%', height: '100%'}}>
|
||||
<View style={{height:'70%'}}>
|
||||
|
@ -365,22 +365,22 @@ function HomeScreen (props) {
|
|||
</View>
|
||||
<View style ={{paddingHorizontal: '2%', height: '15%', borderTopWidth: 1}}>
|
||||
<Text style={{fontWeight: 'bold', fontSize: 18}}>{props.studentData.name}</Text>
|
||||
<Text>{I18n.t('home.Grade')} {props.studentData.year}</Text>
|
||||
<Text>Grade {props.studentData.year}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={{borderWidth: 1, borderColor: 'black', borderRadius: 8, width: '64%', height: '100%', padding: '2%'}}>
|
||||
<Text style={{fontSize: 16}}><Text style={{fontWeight: 'bold'}}>{I18n.t('home.Hobbies')}: </Text>{props.studentData.hobbies}</Text>
|
||||
<Text style={{fontSize: 16}}><Text style={{fontWeight: 'bold'}}>{I18n.t('home.Achievements')}: </Text>{props.studentData.achievements}</Text>
|
||||
<Text style={{fontSize: 16}}><Text style={{fontWeight: 'bold'}}>{I18n.t('home.Messages')}: </Text>{props.studentData.messages}</Text>
|
||||
<Text style={{fontSize: 16}}><Text style={{fontWeight: 'bold'}}>Hobbies: </Text>{props.studentData.hobbies}</Text>
|
||||
<Text style={{fontSize: 16}}><Text style={{fontWeight: 'bold'}}>Achievements: </Text>{props.studentData.achievements}</Text>
|
||||
<Text style={{fontSize: 16}}><Text style={{fontWeight: 'bold'}}>Messages: </Text>{props.studentData.messages}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={{padding: '2%'}}>
|
||||
<View style ={{display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: '2%'}}>
|
||||
<Text style={liststyles.homeTitle}>{I18n.t('home.Announcements')}</Text>
|
||||
<Text style={liststyles.homeTitle}>Announcements</Text>
|
||||
<TouchableOpacity onPress={()=>props.navigation.navigate(Announcements)}>
|
||||
<Text style={{color: 'blue', textDecorationLine: 'underline'}}>{I18n.t('home.viewAll')}</Text>
|
||||
<Text style={{color: 'blue', textDecorationLine: 'underline'}}>View All</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<FlatList
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component } from 'react';
|
||||
/*import React, { Component } from 'react';
|
||||
import { DevSettings } from 'react-native';
|
||||
import { Platform, StyleSheet, TouchableOpacity, Text, ScrollView, View } from 'react-native';
|
||||
import I18n from './i18n';
|
||||
|
@ -71,4 +71,4 @@ export default class extends Component {
|
|||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
}*/
|
22
app/More.js
22
app/More.js
|
@ -33,7 +33,7 @@ import Settings from './Settings'
|
|||
import Poll from './Poll'
|
||||
import Images from './Images'
|
||||
import LinearGradient from 'react-native-linear-gradient'
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
|
||||
const Stack = createStackNavigator()
|
||||
|
||||
|
@ -61,7 +61,7 @@ class MoreSwitch extends React.Component {
|
|||
|
||||
<TouchableOpacity style={styles.moreitem} onPress={()=>this.props.navigation.navigate(item.key)}>
|
||||
<Image source = {item.img} style = {{height: 40, width: 40, marginRight: 10, tintColor: '#e3e3e3'}}/>
|
||||
<Text style={styles.moretext}>{I18n.t('more.'+item.name)}</Text>
|
||||
<Text style={styles.moretext}>{item.name}</Text>
|
||||
</TouchableOpacity>
|
||||
}
|
||||
/>
|
||||
|
@ -84,7 +84,7 @@ class More extends React.Component {
|
|||
name="Chooser"
|
||||
component={MoreSwitch}
|
||||
options={{
|
||||
title:I18n.t('more.More'),
|
||||
title:"More",
|
||||
headerTitleStyle:styles.headerTitle,
|
||||
headerBackground: ()=>background
|
||||
}}
|
||||
|
@ -93,7 +93,7 @@ class More extends React.Component {
|
|||
name="announce"
|
||||
component={Announcements}
|
||||
options={{
|
||||
title:I18n.t('more.Announcements'),
|
||||
title:"Announcements",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -103,7 +103,7 @@ class More extends React.Component {
|
|||
name="resources"
|
||||
component={Resources}
|
||||
options={{
|
||||
title:I18n.t('more.Resources'),
|
||||
title:"Resources",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -113,7 +113,7 @@ class More extends React.Component {
|
|||
name="studentweek"
|
||||
component={StudentWeek}
|
||||
options={{
|
||||
title:I18n.t('more.SOTW'),
|
||||
title:"Student of the Week",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -123,7 +123,7 @@ class More extends React.Component {
|
|||
name="lunchevent"
|
||||
component={LunchEvents}
|
||||
options={{
|
||||
title:I18n.t('more.lunch'),
|
||||
title:"Lunch",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -133,7 +133,7 @@ class More extends React.Component {
|
|||
name="sslopps"
|
||||
component={SSLOps}
|
||||
options={{
|
||||
title:I18n.t('more.ssl'),
|
||||
title:"SSL Ops",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -143,7 +143,7 @@ class More extends React.Component {
|
|||
name="challengeweek"
|
||||
component={ChallengeWeek}
|
||||
options={{
|
||||
title:I18n.t('more.COTW'),
|
||||
title:"Challenge of the Week",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -153,7 +153,7 @@ class More extends React.Component {
|
|||
name="polls"
|
||||
component={Poll}
|
||||
options={{
|
||||
title:I18n.t('more.Polls'),
|
||||
title:"Polls",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
@ -163,7 +163,7 @@ class More extends React.Component {
|
|||
name="settings"
|
||||
component={Settings}
|
||||
options={{
|
||||
title:I18n.t('more.Settings'),
|
||||
title:"Settings",
|
||||
headerTitleStyle:[styles.headerTitle,{alignSelf:'center'}],
|
||||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component, useState } from 'react';
|
||||
/*import React, { Component, useState } from 'react';
|
||||
import {
|
||||
Platform,
|
||||
StyleSheet,
|
||||
|
@ -119,4 +119,4 @@ class Notifications extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Notifications
|
||||
export default Notifications*/
|
44
app/Poll.js
44
app/Poll.js
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
/*import React from 'react';
|
||||
import {
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
|
@ -21,7 +21,7 @@ import {WebView} from 'react-native-webview';
|
|||
import LinearGradient from 'react-native-linear-gradient';
|
||||
import { Linking } from 'react-native';
|
||||
import { url } from './resources/fetchInfo.json'
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
|
||||
class Poll extends React.Component {
|
||||
|
||||
|
@ -47,7 +47,7 @@ componentDidMount() {
|
|||
})
|
||||
.catch((error) => console.error(error))
|
||||
}*/
|
||||
|
||||
/*
|
||||
render() {
|
||||
return (
|
||||
<View style = {{backgroundColor: 'white'}}>
|
||||
|
@ -55,11 +55,47 @@ componentDidMount() {
|
|||
<TouchableOpacity onPress={()=>Linking.openURL("https://google.com")}>
|
||||
<Image source={require('./assets/polls.png')} style={{marginTop: 50, height: 300, width: 300, tintColor: 'red'}}/>
|
||||
</TouchableOpacity>
|
||||
<Text style ={{fontSize: 20, marginTop: 30}}>{I18n.t('polls.textInPoll')}</Text>
|
||||
<Text style ={{fontSize: 20, marginTop: 30}}>Take A Poll!</Text>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Poll;*/
|
||||
import React from 'react';
|
||||
import {
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
ScrollView,
|
||||
View,
|
||||
Text,
|
||||
StatusBar,
|
||||
} from 'react-native';
|
||||
|
||||
import {
|
||||
Header,
|
||||
LearnMoreLinks,
|
||||
Colors,
|
||||
DebugInstructions,
|
||||
ReloadInstructions,
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
import {WebView} from 'react-native-webview';
|
||||
class Poll extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<WebView
|
||||
source = {{uri: 'https://docs.google.com/forms/d/e/1FAIpQLSfR0XP2yo3TV3egz7aMok56wnP9kG4FQt2v3rHrrayf8uC7Vw/viewform?usp=sf_link'}}
|
||||
javaScriptEnabled={true}
|
||||
domStorageEnabled={true}
|
||||
startInLoadingState={true}
|
||||
style={{marginTop: 20}}
|
||||
cacheEnabled={true}
|
||||
|
||||
/>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Poll;
|
|
@ -22,7 +22,7 @@ import { NavigationContainer } from '@react-navigation/native'
|
|||
import { createStackNavigator } from '@react-navigation/stack'
|
||||
import styles from './styles/liststyles';
|
||||
import { url } from './resources/fetchInfo.json';
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
|
||||
const Stack = createStackNavigator();
|
||||
|
||||
|
|
|
@ -26,13 +26,31 @@ import LinearGradient from 'react-native-linear-gradient'
|
|||
import Images from './Images'
|
||||
import { NavigationContainer } from '@react-navigation/native'
|
||||
import { createStackNavigator } from '@react-navigation/stack'
|
||||
import I18n from './i18n';
|
||||
import Language from './Language'
|
||||
import Notifications from './Notifications'
|
||||
//import I18n from './i18n';
|
||||
//import Language from './Language'
|
||||
//import Notifications from './Notifications'
|
||||
|
||||
const Stack = createStackNavigator()
|
||||
|
||||
class SettingSwitch extends React.Component {
|
||||
|
||||
|
||||
|
||||
class placeHoldingForNow extends React.Component{
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.props = props
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<View style={{flex:1,backgroundColor:'red'}}>
|
||||
<Text>
|
||||
Coming Soon...
|
||||
</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
/*class SettingSwitch extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.props = props
|
||||
|
@ -43,8 +61,8 @@ class SettingSwitch extends React.Component {
|
|||
<View style={{flex:1,backgroundColor:'red'}}>
|
||||
<FlatList
|
||||
data={[
|
||||
{name:"Language",key:"language", img:Images.lang},
|
||||
{name:"Notifications",key:"notifications", img:Images.notifs},
|
||||
//{name:"Language",key:"language", img:Images.lang}
|
||||
//{name:"Notifications",key:"notifications", img:Images.notifs},
|
||||
]}
|
||||
renderItem={({item})=>
|
||||
<TouchableOpacity style={styles.moreitem} onPress={()=>this.props.navigation.navigate(item.key)}>
|
||||
|
@ -57,7 +75,7 @@ class SettingSwitch extends React.Component {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
const background = (<LinearGradient
|
||||
colors={['#f99', 'white']}
|
||||
style = {{flex:1,borderBottomColor:'black',borderBottomWidth:0.5}}
|
||||
|
@ -70,14 +88,14 @@ class Settings extends React.Component {
|
|||
<Stack.Navigator>
|
||||
<Stack.Screen
|
||||
name="Chooser"
|
||||
component={SettingSwitch}
|
||||
component={placeHoldingForNow}
|
||||
options={{
|
||||
title:'Settings',
|
||||
headerTitleStyle:styles.headerTitle,
|
||||
headerBackground: ()=>background
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
{/*<Stack.Screen
|
||||
name="language"
|
||||
component={Language}
|
||||
options={{
|
||||
|
@ -86,8 +104,8 @@ class Settings extends React.Component {
|
|||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
/>*/}
|
||||
{/*<Stack.Screen
|
||||
name="notifications"
|
||||
component={Notifications}
|
||||
options={{
|
||||
|
@ -96,7 +114,7 @@ class Settings extends React.Component {
|
|||
headerLeft:null,
|
||||
headerBackground: ()=>background
|
||||
}}
|
||||
/>
|
||||
/>*/}
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
)
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
import { SearchBar } from 'react-native-elements';
|
||||
import styles from './styles/liststyles'
|
||||
import { url } from './resources/fetchInfo.json'
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
|
||||
const StaffElement = ({item}) => {
|
||||
const [visible, setVisible] = useState(false)
|
||||
|
@ -108,7 +108,7 @@ class Staff extends React.Component {
|
|||
<SafeAreaView style={styles.container}>
|
||||
<SearchBar
|
||||
lightTheme
|
||||
placeholder={I18n.t('staff.searchStaff')}
|
||||
placeholder="Staff Search"
|
||||
onChangeText={this.updateSearch}
|
||||
onCancel={this.clearSearch}
|
||||
onClear={this.clearSearch}
|
||||
|
|
|
@ -16,7 +16,7 @@ import {
|
|||
DebugInstructions,
|
||||
ReloadInstructions,
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
import I18n from './i18n';
|
||||
//import I18n from './i18n';
|
||||
import { url } from './resources/fetchInfo.json'
|
||||
|
||||
class StudentWeek extends React.Component {
|
||||
|
@ -49,7 +49,7 @@ class StudentWeek extends React.Component {
|
|||
<View style = {{display: 'flex', flexDirection: 'row', justifyContent: 'space-between'}}>
|
||||
<View>
|
||||
<Text style={{fontSize:28,marginBottom:'10%',textAlign:'center'}}>{this.state.data.name}</Text>
|
||||
<Text style={{fontSize:20}}>{'\t'}{I18n.t('student.Grade')} {this.state.data.year}</Text>
|
||||
<Text style={{fontSize:20}}>{'\t'}Grade: {this.state.data.year}</Text>
|
||||
</View>
|
||||
<View style = {{height: 150, width: 150}}>
|
||||
<Image style = {{height: '100%', width:'100%', borderRadius: 6}}source={{iconURI}} />
|
||||
|
@ -59,15 +59,15 @@ class StudentWeek extends React.Component {
|
|||
|
||||
<View style = {{paddingTop:'10%', height: '55%', display: 'flex', flexDirection: 'column', justifyContent: 'space-between'}}>
|
||||
<View>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>{"\n"}{I18n.t('student.Hobbies')}</Text>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>{"\n"}Hobbies:</Text>
|
||||
<Text style={{fontSize: 20}}>{'\t'}{this.state.data.hobbies}</Text>
|
||||
</View>
|
||||
<View>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>{"\n"}{I18n.t('student.Achievements')} </Text>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>{"\n"}Achievements: </Text>
|
||||
<Text style={{fontSize: 20}}>{'\t'}{this.state.data.achievements}</Text>
|
||||
</View>
|
||||
<View>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>{"\n"}{I18n.t('student.Messages')}</Text>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>{"\n"}Messages:</Text>
|
||||
<Text style={{fontSize: 20}}>{'\t'}{this.state.data.messages}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
|
20
app/i18n.js
20
app/i18n.js
|
@ -1,12 +1,12 @@
|
|||
'use strict';
|
||||
import I18n from 'react-native-i18n';
|
||||
import en from './Languages/en'
|
||||
import es from './Languages/es'
|
||||
//'use strict';
|
||||
//import I18n from 'react-native-i18n';
|
||||
//import en from './Languages/en'
|
||||
//import es from './Languages/es'
|
||||
|
||||
I18n.fallbacks = true;
|
||||
I18n.translations = {
|
||||
en,
|
||||
es,
|
||||
};
|
||||
//I18n.fallbacks = true;
|
||||
//I18n.translations = {
|
||||
//en,
|
||||
//es,
|
||||
//};
|
||||
|
||||
export default I18n;
|
||||
//export default I18n;
|
|
@ -1 +1 @@
|
|||
{"url":"http://127.0.0.1:5000"}
|
||||
{"url":"https://24d524eaf8f5.ngrok.io"}
|
|
@ -18,15 +18,11 @@
|
|||
"@react-navigation/stack": "^5.9.0",
|
||||
"@vitalets/google-translate-api": "^4.0.0",
|
||||
"events": "^3.2.0",
|
||||
"i18next": "^19.8.4",
|
||||
"i18next-react-native-language-detector": "^1.0.2",
|
||||
"querystring": "^0.2.0",
|
||||
"react": "16.13.1",
|
||||
"react-i18next": "^11.8.5",
|
||||
"react-native": "^0.63.2",
|
||||
"react-native-elements": "^2.2.0",
|
||||
"react-native-gesture-handler": "^1.7.0",
|
||||
"react-native-i18n": "^2.0.15",
|
||||
"react-native-linear-gradient": "^2.5.6",
|
||||
"react-native-locale-detector": "^1.0.1",
|
||||
"react-native-reanimated": "^1.10.2",
|
||||
|
|
63
yarn.lock
63
yarn.lock
|
@ -711,13 +711,6 @@
|
|||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.12.0", "@babel/runtime@^7.3.1":
|
||||
version "7.12.5"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e"
|
||||
integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/template@^7.0.0", "@babel/template@^7.10.4", "@babel/template@^7.3.3":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
|
||||
|
@ -3651,13 +3644,6 @@ html-escaper@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
|
||||
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
|
||||
|
||||
html-parse-stringify2@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz#dc5670b7292ca158b7bc916c9a6735ac8872834a"
|
||||
integrity sha1-3FZwtyksoVi3vJFsmmc1rIhyg0o=
|
||||
dependencies:
|
||||
void-elements "^2.0.1"
|
||||
|
||||
http-cache-semantics@^4.0.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
||||
|
@ -3696,23 +3682,6 @@ human-signals@^1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
|
||||
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
|
||||
|
||||
i18n-js@3.0.11:
|
||||
version "3.0.11"
|
||||
resolved "https://registry.yarnpkg.com/i18n-js/-/i18n-js-3.0.11.tgz#f9e96bdb641c5b9d6be12759d7c422089987ef02"
|
||||
integrity sha512-v7dG3kYJTQTyox3NqDabPDE/ZotWntyMI9kh4cYi+XlCSnsIR+KBTS2opPyObL8WndnklcLzbNU92FP/mLge3Q==
|
||||
|
||||
i18next-react-native-language-detector@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/i18next-react-native-language-detector/-/i18next-react-native-language-detector-1.0.2.tgz#5c47482611a44262302a363d5be34a42b11ddfc6"
|
||||
integrity sha1-XEdIJhGkQmIwKjY9W+NKQrEd38Y=
|
||||
|
||||
i18next@^19.8.4:
|
||||
version "19.8.4"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.8.4.tgz#447718f2a26319b8debdbcc6fbc1a9761be7316b"
|
||||
integrity sha512-FfVPNWv+felJObeZ6DSXZkj9QM1Ivvh7NcFCgA8XPtJWHz0iXVa9BUy+QY8EPrCLE+vWgDfV/sc96BgXVo6HAA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.0"
|
||||
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
|
@ -5437,11 +5406,6 @@ mkdirp@^0.5.1:
|
|||
dependencies:
|
||||
minimist "^1.2.5"
|
||||
|
||||
mkdirp@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
|
@ -6055,13 +6019,6 @@ prop-types@^15.6.2, prop-types@^15.7.2:
|
|||
object-assign "^4.1.1"
|
||||
react-is "^16.8.1"
|
||||
|
||||
properties-reader@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/properties-reader/-/properties-reader-2.2.0.tgz#41d837fe143d8d5f2386b6a869a1975c0b2c595c"
|
||||
integrity sha512-CgVcr8MwGoBKK24r9TwHfZkLLaNFHQ6y4wgT9w/XzdpacOOi5ciH4hcuLechSDAwXsfrGQtI2JTutY2djOx2Ow==
|
||||
dependencies:
|
||||
mkdirp "^1.0.4"
|
||||
|
||||
pseudomap@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
||||
|
@ -6127,14 +6084,6 @@ react-devtools-core@^4.6.0:
|
|||
shell-quote "^1.6.1"
|
||||
ws "^7"
|
||||
|
||||
react-i18next@^11.8.5:
|
||||
version "11.8.5"
|
||||
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.8.5.tgz#a093335822e36252cda6efc0f55facef6253643f"
|
||||
integrity sha512-2jY/8NkhNv2KWBnZuhHxTn13aMxAbvhiDUNskm+1xVVnrPId78l8fA7fCyVeO3XU1kptM0t4MtvxV1Nu08cjLw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.3.1"
|
||||
html-parse-stringify2 "2.0.1"
|
||||
|
||||
react-is@^16.12.0, react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6:
|
||||
version "16.13.1"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||
|
@ -6165,13 +6114,6 @@ react-native-gesture-handler@^1.7.0:
|
|||
invariant "^2.2.4"
|
||||
prop-types "^15.7.2"
|
||||
|
||||
react-native-i18n@^2.0.15:
|
||||
version "2.0.15"
|
||||
resolved "https://registry.yarnpkg.com/react-native-i18n/-/react-native-i18n-2.0.15.tgz#09b5a9836116fa7dbd0054c46e2d1014c1ef3c65"
|
||||
integrity sha512-V8VwUP0TLda3oJvgt5tdnFaOV7WXPhTjCTLO7sXI3C2SHggSbD4bCUryMzNJhesimJidH21V2Owvj4zAylHoQQ==
|
||||
dependencies:
|
||||
i18n-js "3.0.11"
|
||||
|
||||
react-native-iphone-x-helper@^1.2.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.0.tgz#84fd13e6b89cc3aa4daa80ec514bf15cb724d86d"
|
||||
|
@ -7588,11 +7530,6 @@ vlq@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.1.tgz#c003f6e7c0b4c1edd623fd6ee50bbc0d6a1de468"
|
||||
integrity sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==
|
||||
|
||||
void-elements@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
|
||||
integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=
|
||||
|
||||
w3c-hr-time@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"
|
||||
|
|
Loading…
Reference in New Issue
Block a user