Compare commits

..

2 commits

Author SHA1 Message Date
docjyJ
d5e1e6c7eb Update Proxiwash Mascot popup 2020-09-13 16:12:07 +02:00
docjyJ
bc14d4cd8d Add proxiwashChangeWash lang key for the setting 2020-09-13 16:03:49 +02:00
4 changed files with 28 additions and 9 deletions

View file

@ -99,8 +99,9 @@
}, },
"mascotDialog": { "mascotDialog": {
"title": "Small tips", "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.", "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": "Got it!" "ok": "Settings",
"cancel": "Later"
} }
}, },
"home": { "home": {
@ -339,6 +340,8 @@
"dashboardSub": "Edit what services to display on the dashboard", "dashboardSub": "Edit what services to display on the dashboard",
"proxiwashNotifReminder": "Machine running reminder", "proxiwashNotifReminder": "Machine running reminder",
"proxiwashNotifReminderSub": "How many minutes before", "proxiwashNotifReminderSub": "How many minutes before",
"proxiwashChangeWash": "Laundromat selection",
"proxiwashChangeWashSub": "Which laundromat to display",
"information": "Information", "information": "Information",
"dashboardEdit": { "dashboardEdit": {
"title": "Edit dashboard", "title": "Edit dashboard",

View file

@ -99,8 +99,9 @@
}, },
"mascotDialog": { "mascotDialog": {
"title": "Pour info", "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.", "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": "Mercé" "ok": "Paramètres",
"cancel": "Plus tard"
} }
}, },
"home": { "home": {
@ -339,6 +340,8 @@
"dashboardSub": "Choisis les services à afficher sur la dashboard", "dashboardSub": "Choisis les services à afficher sur la dashboard",
"proxiwashNotifReminder": "Rappel de machine en cours", "proxiwashNotifReminder": "Rappel de machine en cours",
"proxiwashNotifReminderSub": "Combien de minutes avant", "proxiwashNotifReminderSub": "Combien de minutes avant",
"proxiwashChangeWash": "Sélection de la laverie",
"proxiwashChangeWashSub": "Quel laverie à afficher",
"information": "Informations", "information": "Informations",
"dashboardEdit": { "dashboardEdit": {
"title": "Modifier la dashboard", "title": "Modifier la dashboard",

View file

@ -338,8 +338,8 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
{this.getProxiwashNotifPicker()} {this.getProxiwashNotifPicker()}
</View> </View>
<List.Item <List.Item
title="Test" title={i18n.t('screens.settings.proxiwashChangeWash')}
description="Test" description={i18n.t('screens.settings.proxiwashChangeWashSub')}
left={(props: ListIconPropsType): React.Node => ( left={(props: ListIconPropsType): React.Node => (
<List.Icon <List.Icon
color={props.color} color={props.color}

View file

@ -406,6 +406,15 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
]; ];
}; };
/**
* 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 * Shows a modal for the given item
* *
@ -499,10 +508,14 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
message={i18n.t('screens.proxiwash.mascotDialog.message')} message={i18n.t('screens.proxiwash.mascotDialog.message')}
icon="information" icon="information"
buttons={{ buttons={{
action: null, action: {
cancel: {
message: i18n.t('screens.proxiwash.mascotDialog.ok'), 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} emotion={MASCOT_STYLE.NORMAL}