From 7ffa79481e3ac5d8d36a50e1f3ae748a38cb946e Mon Sep 17 00:00:00 2001 From: keplyx Date: Wed, 16 Oct 2019 16:57:37 +0200 Subject: [PATCH] Added update intro slides --- App.js | 4 ++-- components/CustomIntroSlider.js | 2 +- screens/HomeScreen.js | 4 +--- translations/en.json | 2 +- translations/fr.json | 2 +- utils/AsyncStorageManager.js | 4 ++-- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/App.js b/App.js index eb562a4..7c428b7 100644 --- a/App.js +++ b/App.js @@ -72,7 +72,7 @@ export default class App extends React.Component { showUpdate: false, }); AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showIntro.key, '0'); - AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showUpdate2.key, '0'); + AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.showUpdate3.key, '0'); } async loadAssetsAsync() { @@ -95,7 +95,7 @@ export default class App extends React.Component { isLoading: false, currentTheme: ThemeManager.getCurrentTheme(), showIntro: AsyncStorageManager.getInstance().preferences.showIntro.current === '1', - showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate2.current === '1' + showUpdate: AsyncStorageManager.getInstance().preferences.showUpdate3.current === '1' // showIntro: true }); // Status bar goes dark if set too fast diff --git a/components/CustomIntroSlider.js b/components/CustomIntroSlider.js index 4550a4b..23261ab 100644 --- a/components/CustomIntroSlider.js +++ b/components/CustomIntroSlider.js @@ -105,7 +105,7 @@ export default class CustomIntroSlider extends React.Component { key: '1', title: i18n.t('intro.updateSlide.title'), text: i18n.t('intro.updateSlide.text'), - icon: 'silverware-fork-knife', + icon: 'view-dashboard', colors: ['#e01928', '#be1522'], }, ] diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index 707a011..898ee42 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -12,8 +12,6 @@ import PlatformTouchable from "react-native-platform-touchable"; import HTML from 'react-native-render-html'; import {LinearGradient} from 'expo-linear-gradient'; -import DATA from '../data_test' - const ICON_AMICALE = require('../assets/amicale.png'); const NAME_AMICALE = 'Amicale INSA Toulouse'; @@ -24,7 +22,7 @@ const SECTIONS_ID = [ 'news_feed' ]; -const REFRESH_TIME = 1000 * 10; // Refresh every 10 seconds +const REFRESH_TIME = 1000 * 20; // Refresh every 20 seconds /** diff --git a/translations/en.json b/translations/en.json index 9fe3a73..3fd8c98 100644 --- a/translations/en.json +++ b/translations/en.json @@ -40,7 +40,7 @@ }, "updateSlide": { "title": "New in this update!", - "text": "The RU menu is new and fresh!\nAvailable in the left side menu!" + "text": "Say hello to the brand new dashboard!\nGet a quick look at the most important information right from the home screen!" }, "buttons": { "next": "Next", diff --git a/translations/fr.json b/translations/fr.json index 290abec..20fbc49 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -40,7 +40,7 @@ }, "updateSlide": { "title": "Nouveau dans cette mise à jour !", - "text": "Le menu du RU est tout beau tout neuf !\nAccessible depuis le menu à gauche" + "text": "Dites bonjour à la toute nouvelle Dashboard !\nAccédez rapidement aux informations les plus importantes depuis l'écran d'accueil !" }, "buttons": { "next": "Suivant", diff --git a/utils/AsyncStorageManager.js b/utils/AsyncStorageManager.js index b587b2d..8a344bd 100644 --- a/utils/AsyncStorageManager.js +++ b/utils/AsyncStorageManager.js @@ -29,8 +29,8 @@ export default class AsyncStorageManager { default: '1', current: '', }, - showUpdate2: { - key: 'showUpdate2', + showUpdate3: { + key: 'showUpdate3', default: '1', current: '', },