From 4228a5555d2c09e1ac5960628202cadce1ab8a1a Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Sun, 10 May 2020 13:41:12 +0200 Subject: [PATCH] Added update notes --- src/components/Overrides/CustomIntroSlider.js | 22 +++++++------ src/constants/Update.js | 31 ++++++++++++++----- translations/en.json | 16 ++++++++-- translations/fr.json | 16 ++++++++-- 4 files changed, 65 insertions(+), 20 deletions(-) diff --git a/src/components/Overrides/CustomIntroSlider.js b/src/components/Overrides/CustomIntroSlider.js index 8db628e..3633246 100644 --- a/src/components/Overrides/CustomIntroSlider.js +++ b/src/components/Overrides/CustomIntroSlider.js @@ -85,15 +85,19 @@ export default class CustomIntroSlider extends React.Component { colors: ['#37c13e', '#1a5a1d'], }, ]; - this.updateSlides = [ - { - key: '1', - title: Update.getInstance().title, - text: Update.getInstance().description, - icon: Update.icon, - colors: ['#e01928', '#be1522'], - }, - ]; + this.updateSlides = []; + for (let i = 0; i < Update.slidesNumber; i++) { + this.updateSlides.push( + { + key: i.toString(), + title: Update.getInstance().titleList[i], + text: Update.getInstance().descriptionList[i], + icon: Update.iconList[i], + colors: Update.colorsList[i], + }, + ); + } + this.aprilFoolsSlides = [ { key: '1', diff --git a/src/constants/Update.js b/src/constants/Update.js index eb54734..3ad9733 100644 --- a/src/constants/Update.js +++ b/src/constants/Update.js @@ -14,21 +14,38 @@ import i18n from "i18n-js"; export default class Update { // Increment the number to show the update slide - static number = 5; - // Change the icon to be displayed on the update slide - static icon = 'surround-sound-2-0'; + static number = 6; + // Change the number of slides to display + static slidesNumber = 4; + // Change the icons to be displayed on the update slide + static iconList = [ + 'star', + 'clock', + 'qrcode-scan', + 'account', + ]; + static colorsList = [ + ['#e01928', '#be1522'], + ['#7c33ec', '#5e11d1'], + ['#337aec', '#114ed1'], + ['#e01928', '#be1522'], + ] static instance: Update | null = null; - title: string; - description: string; + titleList: Array; + descriptionList: Array; /** * Init translations */ constructor() { - this.title = i18n.t('intro.updateSlide.title'); - this.description = i18n.t('intro.updateSlide.text'); + this.titleList = []; + this.descriptionList = []; + for (let i = 0; i < Update.slidesNumber; i++) { + this.titleList.push(i18n.t('intro.updateSlide'+ i + '.title')) + this.descriptionList.push(i18n.t('intro.updateSlide'+ i + '.text')) + } } /** diff --git a/translations/en.json b/translations/en.json index 0eb9685..27ac26a 100644 --- a/translations/en.json +++ b/translations/en.json @@ -56,9 +56,21 @@ "title": "More to come...", "text": "New features are coming soon, do not hesitate to give us feedback to improve the app" }, - "updateSlide": { + "updateSlide0": { "title": "New in this update!", - "text": "The app got a new UI ! Faster, prettier and more modern, we hope you'll love it!" + "text": "Faster than ever and easier to use!\nThis update includes lots of changes to improve your experience.\nUse the brand new feedback button on the home screen to talk to the developer!" + }, + "updateSlide1": { + "title": "Improved Planex!", + "text": "You now have access to new controls, improved display, and you can also mark groups as favorites." + }, + "updateSlide2": { + "title": "Scanotron 3000!", + "text": "Say hello to Scanotron 3000!\nAvailable from the Qr-Code button on the home screen, it will help you get information about clubs and events around the campus.\n(Useless right now but we have hope for next year)" + }, + "updateSlide3": { + "title": "Amicale Account!", + "text": "You can now connect to your Amicale INSAT account from within the app! See all available clubs and more to come!\nClick on the login button from the home screen." }, "aprilFoolsSlide": { "title": "New in this update!", diff --git a/translations/fr.json b/translations/fr.json index 1f11e95..3c098d0 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -56,9 +56,21 @@ "title": "Plus à venir...", "text": "D'autres fonctionnalités arrivent bientôt, n'hésitez pas à nous donner votre avis pour améliorer l'appli" }, - "updateSlide": { + "updateSlide0": { "title": "Nouveau dans cette mise à jour !", - "text": "L'appli fait peau neuve ! Avec une interface plus rapide, plus jolie et moderne, nous espérons que vous allez l'apprécier !" + "text": "Plus rapide que jamais et plus simple à utiliser !\nCette mise à jour contient de nombreux changements pour améliorer votre expérience.\nUtilisez le tout nouveau bouton de Feedback pour parler directement au développeur!" + }, + "updateSlide1": { + "title": "Planex tout beau !", + "text": "Vous avez maintenant accès à de nouveaux contrôles, un affichage amélioré, et vous pouvez marquer des groupes en favoris." + }, + "updateSlide2": { + "title": "Scanotron 3000 !", + "text": "Dites bonjour à Scanotron 3000 !\nDisponible depuis le bouton Qr-Code sur le menu principal, il vous aidera à avoir des informations sur les clubs et les événements du campus.\n(Inutile tout de suite mais on verra l'année pro)" + }, + "updateSlide3": { + "title": "Compte Amicale !", + "text": "Vous pouvez maintenant vous connecter à votre compte Amicale depuis l'appli ! Accédez à la liste des clubs et plus à venir !\nCliquez sur le bouton Se Connecter dans le menu principal." }, "aprilFoolsSlide": { "title": "Nouveau dans cette mise à jour !",