From 98dc96ad7c2ac2cff9613375e9d2d6e169b46776 Mon Sep 17 00:00:00 2001 From: "BRUNET, Henry" Date: Tue, 21 Nov 2023 10:36:39 +0000 Subject: [PATCH 1/8] Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..156aa02 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# IHM + From 05ed4169440ef31847b994c6a44eec69342ad845 Mon Sep 17 00:00:00 2001 From: "LE CORRE, Laurent" Date: Tue, 21 Nov 2023 15:35:27 +0000 Subject: [PATCH 2/8] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Thu, 23 Nov 2023 17:11:40 +0100 Subject: [PATCH 3/8] =?UTF-8?q?Symbolique,=20pour=20v=C3=A9rifier=20que=20?= =?UTF-8?q?les=20repos=20sont=20=C3=A0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1aab573..4f73f3f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "nodemon --inspect app.js" + "start": "nodemon app.js" }, "author": "Laurent LE CORRE", "license": "ISC", From 71c6792c3d4bc31c40716e3783d311d7cf938902 Mon Sep 17 00:00:00 2001 From: "LE CORRE, Laurent" Date: Tue, 21 Nov 2023 15:35:27 +0000 Subject: [PATCH 4/8] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Thu, 23 Nov 2023 17:11:40 +0100 Subject: [PATCH 5/8] =?UTF-8?q?Symbolique,=20pour=20v=C3=A9rifier=20que=20?= =?UTF-8?q?les=20repos=20sont=20=C3=A0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1aab573..4f73f3f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "nodemon --inspect app.js" + "start": "nodemon app.js" }, "author": "Laurent LE CORRE", "license": "ISC", From bc9d345fd3f135705d394177cf74d93cad60cb40 Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Tue, 28 Nov 2023 11:47:19 +0100 Subject: [PATCH 6/8] Modif des fichiers .env --- .env.prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.prod b/.env.prod index 31e5a19..0bb158b 100644 --- a/.env.prod +++ b/.env.prod @@ -1,5 +1,5 @@ DATABASE = mia -DATABASE_HOST = db.thecoredev.fr +DATABASE_HOST = 127.0.0.1 DATABASE_PORT = 3306 DATABASE_USER = mia DATABASE_PASSWORD = CalomOk0t-ISvpw- From 8cc00eac0521ab785bed3d3ce2735b954816471a Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Tue, 28 Nov 2023 11:58:55 +0100 Subject: [PATCH 7/8] Renommage du fichier principal et init du ReadMe --- README.md | 301 ++++++++++++++++++++++++++++++++++++++++++- app.js => mia_ihm.js | 0 package.json | 4 +- 3 files changed, 302 insertions(+), 3 deletions(-) rename app.js => mia_ihm.js (100%) diff --git a/README.md b/README.md index 156aa02..aac9606 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,301 @@ -# IHM +# Création d'une IHM pour le projet MIA +### Introduction + +Ce projet couvre les IHM d'accès aux sessions de visio-conférence pour le projet MIA. +Ces IHM se découpent en deux étapes : +1 - connexion d'un utilisateur sur une session de visio +2 - identification de l'utilisateur sur la session + +### Architecture du module + +``` +. +├── ... +├── local/modules/ModuleCitation +│ ├── Config/ +│ │ ├── module.xml +│ │ └── config.xml +│ ├── Hook/ +│ │ └── BackHook.php +│ └── templates/ +│ │ ├── frontOffice/default/blocks/ +│ │ │ ├── blockCitation.html +│ │ │ └── ... +│ │ └── backOffice/default/ +│ │ │ ├── src/ +│ │ │ │ └── Citation.jsx +│ │ │ ├── tsup.config.js +│ │ │ └── index.js +│ ├── package.json +│ └── ModuleCitation.php +└── ... +``` + +### Installation des dépendances : + +```bash +npm install react tsup @openstudio/blocks-editor +``` + +### 1 - Création du composant + +Commençons par créer un fichier `Citation.jsx` et par définir les données initiales du plugin : + +```js +// ./templates/backOffice/default/src/Citation.jsx + +const initialData = { + author: "", + quote: "", +}; +``` + +Ensuite, nous allons pouvoir écrire le composant React permettant de visualiser le plugin dans l'éditeur de Thelia Blocks. + +:warning: Attention : un plugin Thelia Blocks prends toujours deux `props` : + +| Prop | Type | Description | +| :--------- | :--------- | :--------------------------------------------------------- | +| `data` | `any` | Objet contenant les données du plugin | +| `onUpdate` | `Function` | Fonction permettant de mettre à jour les données du plugin | + +Exemple : + +```jsx +// ./templates/backOffice/default/src/Citation.jsx + +const BlockQuoteComponent = ({ data, onUpdate }) => { + return ( +
+
+ + onUpdate({ ...data, author: e.target.value })} + /> +
+
+ +