From d5e1e6c7eb40d0b8b4ab79fbcab746155083c167 Mon Sep 17 00:00:00 2001 From: docjyJ Date: Sun, 13 Sep 2020 16:12:07 +0200 Subject: [PATCH] Update Proxiwash Mascot popup --- locales/en.json | 5 +++-- locales/fr.json | 5 +++-- src/screens/Proxiwash/ProxiwashScreen.js | 19 ++++++++++++++++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/locales/en.json b/locales/en.json index ef69dc1..1b0de35 100644 --- a/locales/en.json +++ b/locales/en.json @@ -99,8 +99,9 @@ }, "mascotDialog": { "title": "Small tips", - "message": "No need for queues anymore, you will be notified when machines are ready !\n\nIf you have your head in the clouds, you can turn on notifications for your machine by clicking on it.", - "ok": "Got it!" + "message": "No need for queues anymore, you will be notified when machines are ready !\n\nIf you have your head in the clouds, you can turn on notifications for your machine by clicking on it.\n\nIf you live off campus we have other laundromat available, check the settings !!!!", + "ok": "Settings", + "cancel": "Later" } }, "home": { diff --git a/locales/fr.json b/locales/fr.json index 8c89677..092b1d4 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -99,8 +99,9 @@ }, "mascotDialog": { "title": "Pour info", - "message": "Plus besoin de faire la queue, tu seras informé des machines disponibles !\n\nSi tu es tête en l'air, tu peux activer les notifications pour ta machine en cliquant dessus.", - "ok": "Mercé" + "message": "Plus besoin de faire la queue, tu seras informé des machines disponibles !\n\nSi tu es tête en l'air, tu peux activer les notifications pour ta machine en cliquant dessus.\n\nSi tu habites hors du campus on a d'autre laverie disponible, vas voir dans les paramètres !!!!", + "ok": "Paramètres", + "cancel": "Plus tard" } }, "home": { diff --git a/src/screens/Proxiwash/ProxiwashScreen.js b/src/screens/Proxiwash/ProxiwashScreen.js index f1129bc..39b4e82 100644 --- a/src/screens/Proxiwash/ProxiwashScreen.js +++ b/src/screens/Proxiwash/ProxiwashScreen.js @@ -406,6 +406,15 @@ class ProxiwashScreen extends React.Component { ]; }; + /** + * Callback used when the user clicks on the navigate to settings button. + * This will hide the banner and open the SettingsScreen + */ + onGoToSettings = () => { + const {navigation} = this.props; + navigation.navigate('settings'); + }; + /** * Shows a modal for the given item * @@ -499,10 +508,14 @@ class ProxiwashScreen extends React.Component { message={i18n.t('screens.proxiwash.mascotDialog.message')} icon="information" buttons={{ - action: null, - cancel: { + action: { message: i18n.t('screens.proxiwash.mascotDialog.ok'), - icon: 'check', + icon: 'cog', + onPress: this.onGoToSettings, + }, + cancel: { + message: i18n.t('screens.proxiwash.mascotDialog.cancel'), + icon: 'close', }, }} emotion={MASCOT_STYLE.NORMAL}