From 593c1aa76099e05e1780ec5ff827d479adb8a671 Mon Sep 17 00:00:00 2001 From: alain Date: Thu, 26 Mar 2020 09:45:08 +0100 Subject: [PATCH] fix --- web/package-lock.json | 89 ++++++----------------- web/src/Config.js | 2 +- web/src/pages/Home.js | 32 ++++++-- web/src/redux/reducers/options_reducer.js | 11 +-- 4 files changed, 57 insertions(+), 77 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 3c3f519..957be89 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -6097,8 +6097,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -6116,13 +6115,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6135,18 +6132,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -6249,8 +6243,7 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -6260,7 +6253,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6273,20 +6265,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.9.0", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6303,7 +6292,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6384,8 +6372,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -6395,7 +6382,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6471,8 +6457,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -6502,7 +6487,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6520,7 +6504,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6559,13 +6542,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.1.1", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -15512,8 +15493,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -15886,8 +15866,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -15935,7 +15914,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -15974,13 +15952,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.1.1", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -16337,8 +16313,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -16362,7 +16337,6 @@ "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -16375,8 +16349,7 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", @@ -16385,8 +16358,7 @@ }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -16489,8 +16461,7 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -16500,7 +16471,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -16513,20 +16483,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.9.0", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -16543,7 +16510,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -16624,8 +16590,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -16635,7 +16600,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -16711,8 +16675,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -16742,7 +16705,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -16760,7 +16722,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -16799,13 +16760,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.1.1", - "bundled": true, - "optional": true + "bundled": true } } }, diff --git a/web/src/Config.js b/web/src/Config.js index 0ba565f..c60e9a6 100644 --- a/web/src/Config.js +++ b/web/src/Config.js @@ -1,5 +1,5 @@ const local_api_path = "localhost:1110"; -const remote_api_path = "88.190.14.12:1110"; +const remote_api_path = "82.66.14.12:1110"; let api_path = "http://"; let static_path = "http://"; diff --git a/web/src/pages/Home.js b/web/src/pages/Home.js index 9ba2d3d..8601916 100644 --- a/web/src/pages/Home.js +++ b/web/src/pages/Home.js @@ -53,7 +53,12 @@ export default class Home extends Component { } validateForm() { - return this.state.identifiant && this.state.password && this.state.identifiant.length > 0 && this.state.password.length > 0; + return ( + this.state.identifiant && + this.state.password && + this.state.identifiant.length > 0 && + this.state.password.length > 0 + ); } handleSubmit = event => { @@ -67,7 +72,11 @@ export default class Home extends Component { bake_cookie(cookie_id, this.state.identifiant); bake_cookie(cookie_pwd, this.state.password); bake_cookie(cookie_token, res.data.token); - this.setState({ connected: true, token: res.data.token, loginError: false }); + this.setState({ + connected: true, + token: res.data.token, + loginError: false + }); this.props.setConnected(true); this.props.setToken(res.data.token); } else { @@ -83,6 +92,7 @@ export default class Home extends Component { render() { let { connected, identifiant, password } = this.state; + identifiant = tools.upperFirstLetter(identifiant); return (
{connected ? ( @@ -92,7 +102,8 @@ export default class Home extends Component {

- Plateforme gratuite de rééducation pour patients aphasiques bilingues franco-arabes à destination des orthophonistes non + Plateforme gratuite de rééducation pour patients aphasiques + bilingues franco-arabes à destination des orthophonistes non arabophones.

@@ -113,7 +124,8 @@ export default class Home extends Component {
- Plateforme gratuite de rééducation pour patients aphasiques bilingues franco-arabes à destination des orthophonistes non + Plateforme gratuite de rééducation pour patients aphasiques + bilingues franco-arabes à destination des orthophonistes non arabophone.

@@ -140,10 +152,18 @@ export default class Home extends Component { Vous n'avez pas de compte ? contactez moi sur{" "} - +
- {this.state.loginError && ( diff --git a/web/src/redux/reducers/options_reducer.js b/web/src/redux/reducers/options_reducer.js index e935b3a..8ee9878 100644 --- a/web/src/redux/reducers/options_reducer.js +++ b/web/src/redux/reducers/options_reducer.js @@ -2,13 +2,13 @@ import Config from "Config"; import { UPDATE_OPTION, RESET_OPTION } from "redux/types"; const initState = { - nbrOfItemPerSerie: 10, // nombre d'item par défaut par catégorie - nbrOfImagePerItem: 4, // nombre d'image par item + nbrOfItemPerSerie: 20, // nombre d'item par défaut par catégorie + nbrOfImagePerItem: 2, // nombre d'image par item imageByImage: false, // on ne fait que un mot à la fois par test imageByImageDisplayName: true, // si on est en mode image par image on peut soit afficher le nom soit des _ _ _ à la place - showClueReversed: true, // affiche la traduction du mot retourné à 90 degrés pour une lettre d'en face + showClueReversed: false, // affiche la traduction du mot retourné à 90 degrés pour une lettre d'en face interfaceSize: Config.textSize.md, - playSoundAfterXWrong: 2, + playSoundAfterXWrong: 8, displayLg: Config._const.ar, level: Config._const.easy, manualChooseImage: false, // choisi les images d'une catégorie à la main @@ -22,7 +22,8 @@ export default function(state = initState, action) { if (action.payload.subkey == null) { newState[action.payload.key] = action.payload.value; } else { - newState[action.payload.key][action.payload.subkey] = action.payload.value; + newState[action.payload.key][action.payload.subkey] = + action.payload.value; } return newState; case RESET_OPTION: