Browse Source

Update Proxiwash Mascot popup

docjyJ 3 years ago
parent
commit
d5e1e6c7eb
3 changed files with 22 additions and 7 deletions
  1. 3
    2
      locales/en.json
  2. 3
    2
      locales/fr.json
  3. 16
    3
      src/screens/Proxiwash/ProxiwashScreen.js

+ 3
- 2
locales/en.json View File

99
       },
99
       },
100
       "mascotDialog": {
100
       "mascotDialog": {
101
         "title": "Small tips",
101
         "title": "Small tips",
102
-        "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.",
103
-        "ok": "Got it!"
102
+        "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 !!!!",
103
+        "ok": "Settings",
104
+        "cancel": "Later"
104
       }
105
       }
105
     },
106
     },
106
     "home": {
107
     "home": {

+ 3
- 2
locales/fr.json View File

99
       },
99
       },
100
       "mascotDialog": {
100
       "mascotDialog": {
101
         "title": "Pour info",
101
         "title": "Pour info",
102
-        "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.",
103
-        "ok": "Mercé"
102
+        "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 !!!!",
103
+        "ok": "Paramètres",
104
+        "cancel": "Plus tard"
104
       }
105
       }
105
     },
106
     },
106
     "home": {
107
     "home": {

+ 16
- 3
src/screens/Proxiwash/ProxiwashScreen.js View File

407
   };
407
   };
408
 
408
 
409
   /**
409
   /**
410
+   * Callback used when the user clicks on the navigate to settings button.
411
+   * This will hide the banner and open the SettingsScreen
412
+   */
413
+  onGoToSettings = () => {
414
+    const {navigation} = this.props;
415
+    navigation.navigate('settings');
416
+  };
417
+
418
+  /**
410
    * Shows a modal for the given item
419
    * Shows a modal for the given item
411
    *
420
    *
412
    * @param title The title to use
421
    * @param title The title to use
499
           message={i18n.t('screens.proxiwash.mascotDialog.message')}
508
           message={i18n.t('screens.proxiwash.mascotDialog.message')}
500
           icon="information"
509
           icon="information"
501
           buttons={{
510
           buttons={{
502
-            action: null,
503
-            cancel: {
511
+            action: {
504
               message: i18n.t('screens.proxiwash.mascotDialog.ok'),
512
               message: i18n.t('screens.proxiwash.mascotDialog.ok'),
505
-              icon: 'check',
513
+              icon: 'cog',
514
+              onPress: this.onGoToSettings,
515
+            },
516
+            cancel: {
517
+              message: i18n.t('screens.proxiwash.mascotDialog.cancel'),
518
+              icon: 'close',
506
             },
519
             },
507
           }}
520
           }}
508
           emotion={MASCOT_STYLE.NORMAL}
521
           emotion={MASCOT_STYLE.NORMAL}

Loading…
Cancel
Save