Updated expo and other libs to newer version

This commit is contained in:
keplyx 2020-01-26 17:51:15 +01:00
parent e6e4e9f822
commit a1a0e0b7f0
9 changed files with 35 additions and 31 deletions

7
App.js
View file

@ -7,9 +7,6 @@ import {createAppContainerWithInitialRoute} from './navigation/AppNavigator';
import ThemeManager from './utils/ThemeManager'; import ThemeManager from './utils/ThemeManager';
import LocaleManager from './utils/LocaleManager'; import LocaleManager from './utils/LocaleManager';
import * as Font from 'expo-font'; import * as Font from 'expo-font';
// edited native-base-shoutem-theme according to
// https://github.com/GeekyAnts/theme/pull/5/files/91f67c55ca6e65fe3af779586b506950c9f331be#diff-4cfc2dd4d5dae7954012899f2268a422
// to allow for dynamic theme switching
import {clearThemeCache} from 'native-base-shoutem-theme'; import {clearThemeCache} from 'native-base-shoutem-theme';
import AsyncStorageManager from "./utils/AsyncStorageManager"; import AsyncStorageManager from "./utils/AsyncStorageManager";
import CustomIntroSlider from "./components/CustomIntroSlider"; import CustomIntroSlider from "./components/CustomIntroSlider";
@ -81,6 +78,7 @@ export default class App extends React.Component<Props, State> {
await Font.loadAsync({ await Font.loadAsync({
'Roboto': require('native-base/Fonts/Roboto.ttf'), 'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'), 'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
'material-community': require('native-base/Fonts/MaterialCommunityIcons.ttf'),
}); });
await AsyncStorageManager.getInstance().loadPreferences(); await AsyncStorageManager.getInstance().loadPreferences();
ThemeManager.getInstance().setUpdateThemeCallback(() => this.updateTheme()); ThemeManager.getInstance().setUpdateThemeCallback(() => this.updateTheme());
@ -118,7 +116,8 @@ export default class App extends React.Component<Props, State> {
); );
} }
if (this.state.showIntro || this.state.showUpdate) { if (this.state.showIntro || this.state.showUpdate) {
return <CustomIntroSlider onDone={() => this.onIntroDone()} isUpdate={this.state.showUpdate && !this.state.showIntro}/>; return <CustomIntroSlider onDone={() => this.onIntroDone()}
isUpdate={this.state.showUpdate && !this.state.showIntro}/>;
} else { } else {
const AppNavigator = createAppContainerWithInitialRoute(AsyncStorageManager.getInstance().preferences.defaultStartScreen.current); const AppNavigator = createAppContainerWithInitialRoute(AsyncStorageManager.getInstance().preferences.defaultStartScreen.current);
return ( return (

View file

@ -4,7 +4,7 @@
"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": "33.0.0", "sdkVersion": "36.0.0",
"platforms": [ "platforms": [
"ios", "ios",
"android", "android",

1
clear-node-cache.sh Executable file
View file

@ -0,0 +1 @@
rm -rf node_modules/ && rm -f package-lock.json && rm -f yarn.lock && npm cache verify && npm install && expo r -c

View file

@ -31,13 +31,15 @@ function createMaterialBottomTabNavigatorWithInitialRoute(initialRoute: string)
return { return {
tabBarVisible: showTabBar, tabBarVisible: showTabBar,
}; };
},}, },
},
}, { }, {
defaultNavigationOptions: ({navigation}) => ({ defaultNavigationOptions: ({navigation}) => ({
tabBarIcon: ({focused, horizontal, tintColor}) => { tabBarIcon: ({focused, tintColor}) => {
let icon = TAB_ICONS[navigation.state.routeName]; let icon = TAB_ICONS[navigation.state.routeName];
// tintColor is ignoring activeColor et inactiveColor for some reason
return <CustomMaterialIcon icon={icon} color={tintColor}/>; let color = focused ? "#f0edf6" : "#4e1108";
return <CustomMaterialIcon icon={icon} color={color}/>;
}, },
tabBarVisible: true, tabBarVisible: true,
}), }),

View file

@ -8,38 +8,40 @@
"eject": "expo eject" "eject": "expo eject"
}, },
"dependencies": { "dependencies": {
"@expo/vector-icons": "^10.0.2", "@expo/vector-icons": "^10.0.0",
"@react-native-community/status-bar": "^1.0.3", "@react-native-community/status-bar": "^1.0.3",
"@shoutem/theme": "^0.11.3", "@shoutem/theme": "^0.11.3",
"expo": "^33.0.7", "expo": "^36.0.0",
"expo-font": "^5.0.1", "expo-font": "~8.0.0",
"expo-linear-gradient": "^5.0.1", "expo-linear-gradient": "~8.0.0",
"expo-localization": "^5.0.1", "expo-localization": "~8.0.0",
"expo-permissions": "^5.0.1", "expo-permissions": "~8.0.0",
"i18n-js": "^3.3.0", "i18n-js": "^3.3.0",
"native-base": "^2.12.1", "native-base": "^2.12.1",
"native-base-shoutem-theme": "^0.2.3", "native-base-shoutem-theme": "^0.3.1",
"react": "^16.8.6", "react": "16.9.0",
"react-dom": "^16.8.6", "react-dom": "16.9.0",
"react-native": "^0.59.9", "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-app-intro-slider": "^3.0.0", "react-native-app-intro-slider": "^3.0.0",
"react-native-autolink": "^1.8.1", "react-native-autolink": "^1.8.1",
"react-native-calendars": "^1.212.0", "react-native-calendars": "^1.212.0",
"react-native-gesture-handler": "~1.5.0",
"react-native-material-menu": "^0.6.7",
"react-native-modal": "^11.3.1", "react-native-modal": "^11.3.1",
"react-native-modalize": "^1.2.1", "react-native-modalize": "^1.3.6",
"react-native-paper": "^2.16.0", "react-native-paper": "^2.16.0",
"react-native-platform-touchable": "^1.1.1", "react-native-platform-touchable": "^1.1.1",
"react-native-reanimated": "~1.4.0",
"react-native-render-html": "^4.1.2", "react-native-render-html": "^4.1.2",
"react-native-side-menu": "^1.1.3", "react-native-side-menu": "^1.1.3",
"react-native-status-bar-height": "^2.3.1", "react-native-status-bar-height": "^2.3.1",
"react-native-webview": "^5.8.1", "react-native-webview": "7.4.3",
"react-navigation": "^3.11.0", "react-navigation": "^3.13.0",
"react-navigation-material-bottom-tabs": "^1.0.0", "react-navigation-material-bottom-tabs": "^1.1.1",
"react-navigation-transitions": "^1.0.12" "react-navigation-transitions": "^1.0.12"
}, },
"devDependencies": { "devDependencies": {
"babel-preset-expo": "^5.1.1", "babel-preset-expo": "^8.0.0"
"react-native-material-menu": "^0.6.3"
}, },
"private": true "private": true
} }

View file

@ -9,7 +9,7 @@ import appJson from '../../app';
import packageJson from '../../package'; import packageJson from '../../package';
import CustomMaterialIcon from "../../components/CustomMaterialIcon"; import CustomMaterialIcon from "../../components/CustomMaterialIcon";
import AsyncStorageManager from "../../utils/AsyncStorageManager"; import AsyncStorageManager from "../../utils/AsyncStorageManager";
import Modalize from "react-native-modalize"; import {Modalize} from "react-native-modalize";
import ThemeManager from "../../utils/ThemeManager"; import ThemeManager from "../../utils/ThemeManager";
const links = { const links = {

View file

@ -28,7 +28,7 @@ import Touchable from "react-native-platform-touchable";
import {Alert, View, Clipboard, Image} from "react-native"; import {Alert, View, Clipboard, Image} from "react-native";
import AsyncStorageManager from "../utils/AsyncStorageManager"; import AsyncStorageManager from "../utils/AsyncStorageManager";
import NotificationsManager from "../utils/NotificationsManager"; import NotificationsManager from "../utils/NotificationsManager";
import Modalize from "react-native-modalize"; import {Modalize} from "react-native-modalize";
type Props = { type Props = {
navigation: Object, navigation: Object,

View file

@ -11,7 +11,7 @@ import BaseContainer from "../components/BaseContainer";
import {Agenda, LocaleConfig} from 'react-native-calendars'; import {Agenda, LocaleConfig} from 'react-native-calendars';
import HTML from 'react-native-render-html'; import HTML from 'react-native-render-html';
import Touchable from 'react-native-platform-touchable'; import Touchable from 'react-native-platform-touchable';
import Modalize from 'react-native-modalize'; import {Modalize} from 'react-native-modalize';
import WebDataManager from "../utils/WebDataManager"; import WebDataManager from "../utils/WebDataManager";
import CustomMaterialIcon from "../components/CustomMaterialIcon"; import CustomMaterialIcon from "../components/CustomMaterialIcon";

View file

@ -9,7 +9,7 @@ import Menu, {MenuItem} from 'react-native-material-menu';
import i18n from "i18n-js"; import i18n from "i18n-js";
import CustomMaterialIcon from "../../components/CustomMaterialIcon"; import CustomMaterialIcon from "../../components/CustomMaterialIcon";
import ThemeManager from "../../utils/ThemeManager"; import ThemeManager from "../../utils/ThemeManager";
import Modalize from 'react-native-modalize'; import {Modalize} from 'react-native-modalize';
const sortMode = { const sortMode = {
price: "0", price: "0",