forked from vergnet/application-amicale
Updated libs to latest compatible version
This commit is contained in:
parent
8026f8b223
commit
daae4984ad
5 changed files with 90 additions and 86 deletions
9
App.js
9
App.js
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Platform, StatusBar} from 'react-native';
|
import {StatusBar} from 'react-native';
|
||||||
import LocaleManager from './managers/LocaleManager';
|
import LocaleManager from './managers/LocaleManager';
|
||||||
import AsyncStorageManager from "./managers/AsyncStorageManager";
|
import AsyncStorageManager from "./managers/AsyncStorageManager";
|
||||||
import CustomIntroSlider from "./components/Custom/CustomIntroSlider";
|
import CustomIntroSlider from "./components/Custom/CustomIntroSlider";
|
||||||
|
@ -60,14 +60,12 @@ export default class App extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
setupStatusBar() {
|
setupStatusBar() {
|
||||||
if (Platform.OS === 'ios') {
|
|
||||||
if (ThemeManager.getNightMode()) {
|
if (ThemeManager.getNightMode()) {
|
||||||
StatusBar.setBarStyle('light-content', true);
|
StatusBar.setBarStyle('light-content', true);
|
||||||
} else {
|
} else {
|
||||||
StatusBar.setBarStyle('dark-content', true);
|
StatusBar.setBarStyle('dark-content', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback when user ends the intro. Save in preferences to avaoid showing back the introSlides
|
* Callback when user ends the intro. Save in preferences to avaoid showing back the introSlides
|
||||||
|
@ -109,8 +107,11 @@ export default class App extends React.Component<Props, State> {
|
||||||
showUpdate: AsyncStorageManager.getInstance().preferences.updateNumber.current !== Update.number.toString(),
|
showUpdate: AsyncStorageManager.getInstance().preferences.updateNumber.current !== Update.number.toString(),
|
||||||
showAprilFools: AprilFoolsManager.getInstance().isAprilFoolsEnabled() && AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.current === '1',
|
showAprilFools: AprilFoolsManager.getInstance().isAprilFoolsEnabled() && AsyncStorageManager.getInstance().preferences.showAprilFoolsStart.current === '1',
|
||||||
});
|
});
|
||||||
// Status bar goes dark if set too fast
|
// Status bar goes dark if set too fast on ios
|
||||||
|
if (Platform.OS === 'ios')
|
||||||
setTimeout(this.setupStatusBar, 1000);
|
setTimeout(this.setupStatusBar, 1000);
|
||||||
|
else
|
||||||
|
this.setupStatusBar();
|
||||||
SplashScreen.hide();
|
SplashScreen.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
app.json
1
app.json
|
@ -4,7 +4,6 @@
|
||||||
"description": "Application mobile compatible Android et iOS pour l'Amicale INSA Toulouse. Grâce à cette application, vous avez facilement accès aux news du campus, aux emplois du temps, à l'état de la laverie, et bien d'autres services ! Ceci est une version Beta, Toutes les fonctionnalités ne sont pas encore implémentées, et il est possible de rencontrer quelques bugs.",
|
"description": "Application mobile compatible Android et iOS pour l'Amicale INSA Toulouse. Grâce à cette application, vous avez facilement accès aux news du campus, aux emplois du temps, à l'état de la laverie, et bien d'autres services ! Ceci est une version Beta, Toutes les fonctionnalités ne sont pas encore implémentées, et il est possible de rencontrer quelques bugs.",
|
||||||
"slug": "application-amicale",
|
"slug": "application-amicale",
|
||||||
"privacy": "public",
|
"privacy": "public",
|
||||||
"sdkVersion": "36.0.0",
|
|
||||||
"platforms": [
|
"platforms": [
|
||||||
"ios",
|
"ios",
|
||||||
"android",
|
"android",
|
||||||
|
|
|
@ -142,7 +142,7 @@ export default class CustomIntroSlider extends React.Component<Props> {
|
||||||
return (
|
return (
|
||||||
<AppIntroSlider
|
<AppIntroSlider
|
||||||
renderItem={CustomIntroSlider.getIntroRenderItem}
|
renderItem={CustomIntroSlider.getIntroRenderItem}
|
||||||
slides={slides}
|
data={slides}
|
||||||
onDone={this.props.onDone}
|
onDone={this.props.onDone}
|
||||||
bottomButton
|
bottomButton
|
||||||
showSkipButton
|
showSkipButton
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Avatar, Button, Card, withTheme} from 'react-native-paper';
|
import {Avatar, Button, Card, Text, withTheme} from 'react-native-paper';
|
||||||
import {View} from "react-native";
|
import {View} from "react-native";
|
||||||
import Autolink from "react-native-autolink";
|
import Autolink from "react-native-autolink";
|
||||||
import i18n from "i18n-js";
|
import i18n from "i18n-js";
|
||||||
|
@ -8,64 +8,68 @@ import ImageModal from 'react-native-image-modal';
|
||||||
const ICON_AMICALE = require('../../assets/amicale.png');
|
const ICON_AMICALE = require('../../assets/amicale.png');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Component used to display a feed item
|
||||||
|
*/
|
||||||
|
class FeedItem extends React.Component {
|
||||||
|
|
||||||
|
shouldComponentUpdate() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
* Gets the amicale INSAT logo
|
* Gets the amicale INSAT logo
|
||||||
*
|
*
|
||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
function getAvatar() {
|
getAvatar() {
|
||||||
return (
|
return (
|
||||||
<Avatar.Image size={48} source={ICON_AMICALE}
|
<Avatar.Image size={48} source={ICON_AMICALE}
|
||||||
style={{backgroundColor: 'transparent'}}/>
|
style={{backgroundColor: 'transparent'}}/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
render() {
|
||||||
* Component used to display a feed item
|
|
||||||
*
|
|
||||||
* @param props Props to pass to the component
|
|
||||||
* @return {*}
|
|
||||||
*/
|
|
||||||
function FeedItem(props) {
|
|
||||||
const {colors} = props.theme;
|
|
||||||
return (
|
return (
|
||||||
<Card style={{margin: 10}}>
|
<Card style={{margin: 10}}>
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title={props.title}
|
title={this.props.title}
|
||||||
subtitle={props.subtitle}
|
subtitle={this.props.subtitle}
|
||||||
left={getAvatar}
|
left={this.getAvatar}
|
||||||
/>
|
/>
|
||||||
{props.full_picture !== '' && props.full_picture !== undefined ?
|
{this.props.full_picture !== '' && this.props.full_picture !== undefined ?
|
||||||
<View style={{marginLeft: 'auto', marginRight: 'auto'}}>
|
<View style={{marginLeft: 'auto', marginRight: 'auto'}}>
|
||||||
<ImageModal
|
<ImageModal
|
||||||
resizeMode="contain"
|
resizeMode="contain"
|
||||||
imageBackgroundColor={colors.background}
|
imageBackgroundColor={"#000"}
|
||||||
style={{
|
style={{
|
||||||
width: 250,
|
width: 250,
|
||||||
height: 250,
|
height: 250,
|
||||||
}}
|
}}
|
||||||
source={{
|
source={{
|
||||||
uri: props.full_picture,
|
uri: this.props.full_picture,
|
||||||
}}
|
}}
|
||||||
/></View> : <View/>}
|
/></View> : <View/>}
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
{props.message !== undefined ?
|
{this.props.message !== undefined ?
|
||||||
<Autolink
|
<Autolink
|
||||||
text={props.message}
|
text={this.props.message}
|
||||||
hashtag="facebook"
|
hashtag="facebook"
|
||||||
style={{color: colors.text}}
|
component={Text}
|
||||||
/> : <View/>
|
/> : <View/>
|
||||||
}
|
}
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
<Card.Actions>
|
<Card.Actions>
|
||||||
<Button
|
<Button
|
||||||
color={'#57aeff'}
|
color={'#57aeff'}
|
||||||
onPress={props.onOutLinkPress}
|
onPress={this.props.onOutLinkPress}
|
||||||
icon={'facebook'}>
|
icon={'facebook'}>
|
||||||
{i18n.t('homeScreen.dashboard.seeMore')}
|
{i18n.t('homeScreen.dashboard.seeMore')}
|
||||||
</Button>
|
</Button>
|
||||||
</Card.Actions>
|
</Card.Actions>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withTheme(FeedItem);
|
export default withTheme(FeedItem);
|
||||||
|
|
36
package.json
36
package.json
|
@ -20,42 +20,42 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/vector-icons": "~10.0.0",
|
"@expo/vector-icons": "^10.0.0",
|
||||||
"@react-native-community/masked-view": "0.1.5",
|
"@react-native-community/masked-view": "0.1.6",
|
||||||
"@react-navigation/bottom-tabs": "^5.1.1",
|
"@react-navigation/bottom-tabs": "^5.1.1",
|
||||||
"@react-navigation/drawer": "^5.1.1",
|
"@react-navigation/drawer": "^5.1.1",
|
||||||
"@react-navigation/material-bottom-tabs": "^5.1.1",
|
"@react-navigation/material-bottom-tabs": "^5.1.1",
|
||||||
"@react-navigation/native": "^5.0.9",
|
"@react-navigation/native": "^5.0.9",
|
||||||
"@react-navigation/stack": "^5.1.1",
|
"@react-navigation/stack": "^5.1.1",
|
||||||
"expo": "^36.0.0",
|
"expo": "^37.0.0",
|
||||||
"expo-linear-gradient": "~8.0.0",
|
"expo-linear-gradient": "~8.1.0",
|
||||||
"expo-localization": "~8.0.0",
|
"expo-localization": "~8.1.0",
|
||||||
"expo-permissions": "~8.0.0",
|
"expo-permissions": "~8.1.0",
|
||||||
"expo-secure-store": "~8.0.0",
|
"expo-secure-store": "~8.1.0",
|
||||||
"expo-web-browser": "~8.0.0",
|
"expo-web-browser": "~8.1.0",
|
||||||
"i18n-js": "^3.3.0",
|
"i18n-js": "^3.3.0",
|
||||||
"react": "16.9.0",
|
"react": "16.9.0",
|
||||||
"react-dom": "16.9.0",
|
"react-dom": "16.9.0",
|
||||||
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
|
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz",
|
||||||
"react-native-app-intro-slider": "^3.0.0",
|
"react-native-app-intro-slider": "^4.0.0",
|
||||||
"react-native-appearance": "~0.3.1",
|
"react-native-appearance": "~0.3.3",
|
||||||
"react-native-autolink": "^1.8.1",
|
"react-native-autolink": "^3.0.0",
|
||||||
"react-native-calendars": "^1.260.0",
|
"react-native-calendars": "^1.260.0",
|
||||||
"react-native-gesture-handler": "~1.5.0",
|
"react-native-gesture-handler": "~1.6.0",
|
||||||
"react-native-image-modal": "^1.0.1",
|
"react-native-image-modal": "^1.0.1",
|
||||||
"react-native-modalize": "^1.3.6",
|
"react-native-modalize": "^1.3.6",
|
||||||
"react-native-paper": "^3.6.0",
|
"react-native-paper": "^3.6.0",
|
||||||
"react-native-reanimated": "~1.4.0",
|
"react-native-reanimated": "~1.7.0",
|
||||||
"react-native-render-html": "^4.1.2",
|
"react-native-render-html": "^4.1.2",
|
||||||
"react-native-safe-area-context": "0.6.0",
|
"react-native-safe-area-context": "0.7.3",
|
||||||
"react-native-screens": "2.0.0-alpha.12",
|
"react-native-screens": "~2.2.0",
|
||||||
"react-native-webview": "7.4.3"
|
"react-native-webview": "8.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.8.4",
|
"@babel/cli": "^7.8.4",
|
||||||
"@babel/core": "^7.9.0",
|
"@babel/core": "^7.9.0",
|
||||||
"@babel/preset-flow": "^7.9.0",
|
"@babel/preset-flow": "^7.9.0",
|
||||||
"babel-preset-expo": "^8.0.0",
|
"babel-preset-expo": "^8.1.0",
|
||||||
"flow-bin": "^0.122.0",
|
"flow-bin": "^0.122.0",
|
||||||
"jest": "^25.1.0",
|
"jest": "^25.1.0",
|
||||||
"jest-extended": "^0.11.5",
|
"jest-extended": "^0.11.5",
|
||||||
|
|
Loading…
Reference in a new issue