From abbcdef16567c0918cd8a3c843bbfb769ef6d72c Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Thu, 7 Dec 2023 11:28:44 +0100 Subject: [PATCH 1/2] fix de l'emoji qui s'affiche pour les pseudos trop courts --- cryptide_project/DB/socialgraph.db | Bin 28672 -> 28672 bytes .../src/Components/PersonStatus.tsx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/DB/socialgraph.db b/cryptide_project/DB/socialgraph.db index 223f093c6153da6b6aa51a456c2f657c1c2a9f41..a2e895095d402eece0797772bc7b21f84ed399ab 100644 GIT binary patch delta 260 zcmZp8z}WDBae_4C?1?hYjI%c;bon!KPJZn#Da6hj!N9+S-;wVbUn`#q?1WhIeGiADxS#=3?^ zx(4P7h6Ywf=2phW5ghCcf*>1Y diff --git a/cryptide_project/src/Components/PersonStatus.tsx b/cryptide_project/src/Components/PersonStatus.tsx index 54b2139..4b6c5d2 100644 --- a/cryptide_project/src/Components/PersonStatus.tsx +++ b/cryptide_project/src/Components/PersonStatus.tsx @@ -112,7 +112,7 @@ const PersonStatus: React.FC = ({img = Person, state= Person, {/* */}
-
{actualPlayerIndex !== index ? (name.substring(0, name.length - 2).length > 7 ? name.substring(0, name.length - 2).substring(0, 7) + '...' : name) : 'vous'}
+
{actualPlayerIndex !== index ? (name.substring(0, name.length - 2).length > 7 ? name.substring(0, name.length - 2).substring(0, 7) + '...' : name.substring(0, name.length - 2)) : 'vous'}
); From d97ed83ae4776690f9a293403382b907ca8c5982 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Thu, 7 Dec 2023 12:01:52 +0100 Subject: [PATCH 2/2] changement de l'interface du joueur actuel :art: --- cryptide_project/server/api/server.js | 2 +- cryptide_project/src/AdressSetup.ts | 4 ++-- cryptide_project/src/Components/PersonStatus.tsx | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cryptide_project/server/api/server.js b/cryptide_project/server/api/server.js index e035cff..f511624 100644 --- a/cryptide_project/server/api/server.js +++ b/cryptide_project/server/api/server.js @@ -14,7 +14,7 @@ const port = 3003; // Middleware app.use(cors( { - origin: ["http://172.20.10.4:3000", "http://172.20.10.4:3000"], + origin: ["http://localhost:3000", "http://172.20.10.4:3000"], credentials: true } )); // Autoriser les requĂȘtes cross-origin diff --git a/cryptide_project/src/AdressSetup.ts b/cryptide_project/src/AdressSetup.ts index cbfa6bc..da5fce5 100644 --- a/cryptide_project/src/AdressSetup.ts +++ b/cryptide_project/src/AdressSetup.ts @@ -1,6 +1,6 @@ -const ADRESSE_WEBSERVER = "http://172.20.10.4:3002" +const ADRESSE_WEBSERVER = "http://localhost:3002" -const ADRESSE_DBSERVER = "http://172.20.10.4:3003" +const ADRESSE_DBSERVER = "http://localhost:3003" const tmp = ADRESSE_DBSERVER const tmp2 = ADRESSE_WEBSERVER diff --git a/cryptide_project/src/Components/PersonStatus.tsx b/cryptide_project/src/Components/PersonStatus.tsx index 4b6c5d2..e4ea131 100644 --- a/cryptide_project/src/Components/PersonStatus.tsx +++ b/cryptide_project/src/Components/PersonStatus.tsx @@ -37,7 +37,7 @@ const PersonStatus: React.FC = ({img = Person, state= Person, img = BotImg } - const [buffer, setBuffer] = useState("") + const [buffer, setBuffer] = useState('50%') const [touchedPlayer, setTouchedPlayer] = useState(-2) useEffect(() =>{ @@ -48,10 +48,10 @@ const PersonStatus: React.FC = ({img = Person, state= Person, useEffect(() => { if (playerIndex===index){ - setBuffer('solid 3px green') + setBuffer('5px') } else{ - setBuffer('') + setBuffer('50%') } }, [playerIndex]) @@ -71,7 +71,7 @@ const PersonStatus: React.FC = ({img = Person, state= Person, }; const circleStyle: React.CSSProperties = { backgroundColor: touchedPlayer == index && showCircle ? 'gold' : positionToColor(index), // Changement de la couleur en fonction de la condition - borderRadius: '50%', + borderRadius: buffer, width: '80px', height: '80px', display: 'flex', @@ -84,7 +84,7 @@ const PersonStatus: React.FC = ({img = Person, state= Person, const circleStyleInt: React.CSSProperties = { backgroundColor:'white', - borderRadius: '50%', + borderRadius: buffer, width: '70px', height: '70px', display: 'flex', @@ -111,7 +111,7 @@ const PersonStatus: React.FC = ({img = Person, state= Person, {/* */} -
+
{actualPlayerIndex !== index ? (name.substring(0, name.length - 2).length > 7 ? name.substring(0, name.length - 2).substring(0, 7) + '...' : name.substring(0, name.length - 2)) : 'vous'}