From 5d30ea47fc8ee68d62b1ae52fb5fa986d652a3f9 Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Tue, 5 Dec 2023 09:22:03 +0100 Subject: [PATCH 1/9] changement du style de l'historique :lipstick: --- cryptide_project/src/Pages/InGame.css | 38 +++++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/cryptide_project/src/Pages/InGame.css b/cryptide_project/src/Pages/InGame.css index 81b99e3..b371750 100644 --- a/cryptide_project/src/Pages/InGame.css +++ b/cryptide_project/src/Pages/InGame.css @@ -137,21 +137,43 @@ /** Historique*/ -.historique{ +.historique { position: absolute; z-index: 1; bottom: 2%; left: 2%; - display: flex; flex-direction: column; - /* justify-content: end; */ - padding: 15px 25px; - background-color: #d9d9d9; - border-radius: 15px; - + border: solid; + border-width: 0.5px 0.5px 5px 0.5px; + border-color: whitesmoke lightgray gray whitesmoke; + border-radius: 0 5% 15px 0; height: 250px; width: 20%; - overflow-y:auto; + + direction: rtl; + overflow-y: auto; +} + +.historique div{ + direction: ltr; +} + + +.historique::-webkit-scrollbar { + width: 10px; +} + +.historique::-webkit-scrollbar-thumb { + background-color: lightgray; + border-radius: 5px; +} + +.historique::-webkit-scrollbar-track { + background-color: whitesmoke; +} + +.historique::-webkit-scrollbar-corner { + background-color: whitesmoke; } \ No newline at end of file From 6d390d0341a91dd7897bf8aa91494929ba3e516f Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Tue, 5 Dec 2023 15:56:39 +0100 Subject: [PATCH 2/9] variable d'environnement pour le path avec le / --- cryptide_project/src/Components/GraphContainer.tsx | 4 ++-- cryptide_project/src/Components/LobbyContainer.tsx | 2 +- cryptide_project/src/Components/NavBar.tsx | 4 ++-- cryptide_project/src/Pages/InGame.tsx | 2 +- cryptide_project/src/Pages/Lobby.tsx | 10 +++++----- cryptide_project/src/Pages/LoginForm.tsx | 2 +- cryptide_project/src/Pages/NewPlay.tsx | 10 +++++----- cryptide_project/src/Pages/Play.tsx | 12 ++++++------ cryptide_project/src/Pages/Profile.tsx | 2 +- cryptide_project/src/Pages/SignUpForm.tsx | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index 83697dd..634f495 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -811,7 +811,7 @@ const MyGraphComponent: React.FC = ({onNodeClick, handleS socket.off("put imossible grey") socket.off("who plays") - navigate(`${basePath}/endgame`) + navigate(`/${basePath}/endgame`) } } }) @@ -1020,7 +1020,7 @@ const MyGraphComponent: React.FC = ({onNodeClick, handleS catch(error){ console.log(error); } - navigate(`${basePath}/endgame?solo=true+${isDaily}`) + navigate(`/${basePath}/endgame?solo=true+${isDaily}`) } } diff --git a/cryptide_project/src/Components/LobbyContainer.tsx b/cryptide_project/src/Components/LobbyContainer.tsx index 797cef5..ac0037c 100644 --- a/cryptide_project/src/Components/LobbyContainer.tsx +++ b/cryptide_project/src/Components/LobbyContainer.tsx @@ -49,7 +49,7 @@ const LobbyContainer: React.FC = ({roomNum, HeadPlayer, nbP if (nbPlayer < 6 && !started) { socket.off("request lobbies") setFirst(true) - navigate(`${basePath}/${dest}`); + navigate(`/${basePath}/${dest}`); } else if(started){ handleShowStart() diff --git a/cryptide_project/src/Components/NavBar.tsx b/cryptide_project/src/Components/NavBar.tsx index 5921026..75b45c6 100644 --- a/cryptide_project/src/Components/NavBar.tsx +++ b/cryptide_project/src/Components/NavBar.tsx @@ -37,11 +37,11 @@ function AppNavbar({changeLocale}) { function navigateToProfile(){ - navigate(`${basePath}/profile`) + navigate(`/${basePath}/profile`) } function navigateToHome(){ - navigate(`${basePath}/`) + navigate(`/${basePath}/`) } return ( diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index 9b20931..099b6ea 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -68,7 +68,7 @@ const InGame = ({locale, changeLocale}) => { if (cptNavigation % 2 == 0){ if (navigationType.toString() == "POP"){ socket.emit("player quit") - navigate(`${basePath}/play`) + navigate(`/${basePath}/play`) } } diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index 572c36a..248c8cc 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -136,7 +136,7 @@ function Lobby() { gameStarted = true //socket.off("player left") //socket.off("new player") - navigate(`${basePath}/game?solo=false&daily=false`); + navigate(`/${basePath}/game?solo=false&daily=false`); }); @@ -172,7 +172,7 @@ function Lobby() { setIndicesData(choosenIndices) first = true gameStarted = true - navigate(`${basePath}/game?solo=false&daily=false`) + navigate(`/${basePath}/game?solo=false&daily=false`) }); socket.on("new player", (tab) =>{ @@ -187,17 +187,17 @@ function Lobby() { socket.on("room full", () => { //TODO POP UP pour quand la room est pleine - navigate(`${basePath}/play`) + navigate(`/${basePath}/play`) }) socket.on("game started", () => { //TODO POP UP pour quand la room est pleine - navigate(`${basePath}/play`) + navigate(`/${basePath}/play`) }) socket.on("game already started", () => { //TODO POP UP pour quand la room est pleine - navigate(`${basePath}/play`) + navigate(`/${basePath}/play`) }) socket.on("player left", (tab, i) => { diff --git a/cryptide_project/src/Pages/LoginForm.tsx b/cryptide_project/src/Pages/LoginForm.tsx index dde8427..764e0f5 100644 --- a/cryptide_project/src/Pages/LoginForm.tsx +++ b/cryptide_project/src/Pages/LoginForm.tsx @@ -37,7 +37,7 @@ const SignIn = () => { setShowConfirmation(true); setTimeout(async () => { await login(); - navigate(`${basePath}/`); + navigate(`/${basePath}/`); }, 1250); } } catch (error: any) { diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index 8c658f1..2cc7999 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -100,7 +100,7 @@ function NewPlay() { setPersonNetworkData(networkPerson) setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`${basePath}/game?solo=true&daily=false`); + navigate(`/${basePath}/game?solo=true&daily=false`); } @@ -131,12 +131,12 @@ function NewPlay() { useEffect(() => { if (room !== null) { const nouvelleURL = `/lobby?room=${room}`; - navigate(`${basePath}${nouvelleURL}`) + navigate(`/${basePath}${nouvelleURL}`) } }, [room, navigate]); const goBack = () => { - navigate(`${basePath}/lobby?room=${goBackRoom}`) + navigate(`/${basePath}/lobby?room=${goBackRoom}`) } @@ -159,7 +159,7 @@ function NewPlay() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`${basePath}/game?solo=true&daily=true&easy=true`); + navigate(`/${basePath}/game?solo=true&daily=true&easy=true`); setShowOverlay(false); }; @@ -177,7 +177,7 @@ function NewPlay() { const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) setDailyEnigmeData(map) } - navigate(`${basePath}/game?solo=true&daily=true&easy=false`); + navigate(`/${basePath}/game?solo=true&daily=true&easy=false`); setShowOverlay(false); }; diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index e783f53..097d73d 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -100,7 +100,7 @@ function Play() { setPersonNetworkData(networkPerson) setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`${basePath}/game?solo=true&daily=false`); + navigate(`/${basePath}/game?solo=true&daily=false`); } @@ -131,12 +131,12 @@ function Play() { useEffect(() => { if (room !== null) { const nouvelleURL = `/lobby?room=${room}`; - navigate(`${basePath}${nouvelleURL}`); + navigate(`/${basePath}${nouvelleURL}`); } }, [room, navigate]); const goBack = () => { - navigate(`${basePath}/lobby?room=${goBackRoom}`) + navigate(`/${basePath}/lobby?room=${goBackRoom}`) } @@ -159,7 +159,7 @@ function Play() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`${basePath}/game?solo=true&daily=true&easy=true`); + navigate(`/${basePath}/game?solo=true&daily=true&easy=true`); setShowOverlay(false); }; @@ -177,7 +177,7 @@ function Play() { const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) setDailyEnigmeData(map) } - navigate(`${basePath}/game?solo=true&daily=true&easy=false`); + navigate(`/${basePath}/game?solo=true&daily=true&easy=false`); setShowOverlay(false); }; @@ -240,7 +240,7 @@ function Play() { - +
diff --git a/cryptide_project/src/Pages/Profile.tsx b/cryptide_project/src/Pages/Profile.tsx index a59ad2e..91e1bf9 100644 --- a/cryptide_project/src/Pages/Profile.tsx +++ b/cryptide_project/src/Pages/Profile.tsx @@ -186,7 +186,7 @@ const Profile = () => { } handleCloseDeleteModal(); - navigate(`${basePath}/`) + navigate(`/${basePath}/`) } else { console.error('Phrase de confirmation incorrecte.'); diff --git a/cryptide_project/src/Pages/SignUpForm.tsx b/cryptide_project/src/Pages/SignUpForm.tsx index 9e29449..f7f2a1a 100644 --- a/cryptide_project/src/Pages/SignUpForm.tsx +++ b/cryptide_project/src/Pages/SignUpForm.tsx @@ -35,7 +35,7 @@ const SignUp = () => { setShowConfirmation(true); setTimeout(() => { - navigate(`${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion + navigate(`/${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion }, 1250); } } catch (error: any) { From bc24e060e5b3f9835d81d06f821aa1870e1230b2 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Tue, 5 Dec 2023 16:01:12 +0100 Subject: [PATCH 3/9] variable d'environnement pour le path avec le / --- cryptide_project/src/Components/GraphContainer.tsx | 4 ++-- cryptide_project/src/Components/LobbyContainer.tsx | 2 +- cryptide_project/src/Components/NavBar.tsx | 4 ++-- cryptide_project/src/Pages/Lobby.tsx | 10 +++++----- cryptide_project/src/Pages/LoginForm.tsx | 2 +- cryptide_project/src/Pages/NewPlay.tsx | 10 +++++----- cryptide_project/src/Pages/Play.tsx | 12 ++++++------ cryptide_project/src/Pages/Profile.tsx | 2 +- cryptide_project/src/Pages/SignUpForm.tsx | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index 634f495..83697dd 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -811,7 +811,7 @@ const MyGraphComponent: React.FC = ({onNodeClick, handleS socket.off("put imossible grey") socket.off("who plays") - navigate(`/${basePath}/endgame`) + navigate(`${basePath}/endgame`) } } }) @@ -1020,7 +1020,7 @@ const MyGraphComponent: React.FC = ({onNodeClick, handleS catch(error){ console.log(error); } - navigate(`/${basePath}/endgame?solo=true+${isDaily}`) + navigate(`${basePath}/endgame?solo=true+${isDaily}`) } } diff --git a/cryptide_project/src/Components/LobbyContainer.tsx b/cryptide_project/src/Components/LobbyContainer.tsx index ac0037c..797cef5 100644 --- a/cryptide_project/src/Components/LobbyContainer.tsx +++ b/cryptide_project/src/Components/LobbyContainer.tsx @@ -49,7 +49,7 @@ const LobbyContainer: React.FC = ({roomNum, HeadPlayer, nbP if (nbPlayer < 6 && !started) { socket.off("request lobbies") setFirst(true) - navigate(`/${basePath}/${dest}`); + navigate(`${basePath}/${dest}`); } else if(started){ handleShowStart() diff --git a/cryptide_project/src/Components/NavBar.tsx b/cryptide_project/src/Components/NavBar.tsx index 75b45c6..5921026 100644 --- a/cryptide_project/src/Components/NavBar.tsx +++ b/cryptide_project/src/Components/NavBar.tsx @@ -37,11 +37,11 @@ function AppNavbar({changeLocale}) { function navigateToProfile(){ - navigate(`/${basePath}/profile`) + navigate(`${basePath}/profile`) } function navigateToHome(){ - navigate(`/${basePath}/`) + navigate(`${basePath}/`) } return ( diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index 248c8cc..572c36a 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -136,7 +136,7 @@ function Lobby() { gameStarted = true //socket.off("player left") //socket.off("new player") - navigate(`/${basePath}/game?solo=false&daily=false`); + navigate(`${basePath}/game?solo=false&daily=false`); }); @@ -172,7 +172,7 @@ function Lobby() { setIndicesData(choosenIndices) first = true gameStarted = true - navigate(`/${basePath}/game?solo=false&daily=false`) + navigate(`${basePath}/game?solo=false&daily=false`) }); socket.on("new player", (tab) =>{ @@ -187,17 +187,17 @@ function Lobby() { socket.on("room full", () => { //TODO POP UP pour quand la room est pleine - navigate(`/${basePath}/play`) + navigate(`${basePath}/play`) }) socket.on("game started", () => { //TODO POP UP pour quand la room est pleine - navigate(`/${basePath}/play`) + navigate(`${basePath}/play`) }) socket.on("game already started", () => { //TODO POP UP pour quand la room est pleine - navigate(`/${basePath}/play`) + navigate(`${basePath}/play`) }) socket.on("player left", (tab, i) => { diff --git a/cryptide_project/src/Pages/LoginForm.tsx b/cryptide_project/src/Pages/LoginForm.tsx index 764e0f5..dde8427 100644 --- a/cryptide_project/src/Pages/LoginForm.tsx +++ b/cryptide_project/src/Pages/LoginForm.tsx @@ -37,7 +37,7 @@ const SignIn = () => { setShowConfirmation(true); setTimeout(async () => { await login(); - navigate(`/${basePath}/`); + navigate(`${basePath}/`); }, 1250); } } catch (error: any) { diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index 2cc7999..8c658f1 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -100,7 +100,7 @@ function NewPlay() { setPersonNetworkData(networkPerson) setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`/${basePath}/game?solo=true&daily=false`); + navigate(`${basePath}/game?solo=true&daily=false`); } @@ -131,12 +131,12 @@ function NewPlay() { useEffect(() => { if (room !== null) { const nouvelleURL = `/lobby?room=${room}`; - navigate(`/${basePath}${nouvelleURL}`) + navigate(`${basePath}${nouvelleURL}`) } }, [room, navigate]); const goBack = () => { - navigate(`/${basePath}/lobby?room=${goBackRoom}`) + navigate(`${basePath}/lobby?room=${goBackRoom}`) } @@ -159,7 +159,7 @@ function NewPlay() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`/${basePath}/game?solo=true&daily=true&easy=true`); + navigate(`${basePath}/game?solo=true&daily=true&easy=true`); setShowOverlay(false); }; @@ -177,7 +177,7 @@ function NewPlay() { const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) setDailyEnigmeData(map) } - navigate(`/${basePath}/game?solo=true&daily=true&easy=false`); + navigate(`${basePath}/game?solo=true&daily=true&easy=false`); setShowOverlay(false); }; diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index 097d73d..e783f53 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -100,7 +100,7 @@ function Play() { setPersonNetworkData(networkPerson) setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`/${basePath}/game?solo=true&daily=false`); + navigate(`${basePath}/game?solo=true&daily=false`); } @@ -131,12 +131,12 @@ function Play() { useEffect(() => { if (room !== null) { const nouvelleURL = `/lobby?room=${room}`; - navigate(`/${basePath}${nouvelleURL}`); + navigate(`${basePath}${nouvelleURL}`); } }, [room, navigate]); const goBack = () => { - navigate(`/${basePath}/lobby?room=${goBackRoom}`) + navigate(`${basePath}/lobby?room=${goBackRoom}`) } @@ -159,7 +159,7 @@ function Play() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`/${basePath}/game?solo=true&daily=true&easy=true`); + navigate(`${basePath}/game?solo=true&daily=true&easy=true`); setShowOverlay(false); }; @@ -177,7 +177,7 @@ function Play() { const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) setDailyEnigmeData(map) } - navigate(`/${basePath}/game?solo=true&daily=true&easy=false`); + navigate(`${basePath}/game?solo=true&daily=true&easy=false`); setShowOverlay(false); }; @@ -240,7 +240,7 @@ function Play() { - +
diff --git a/cryptide_project/src/Pages/Profile.tsx b/cryptide_project/src/Pages/Profile.tsx index 91e1bf9..a59ad2e 100644 --- a/cryptide_project/src/Pages/Profile.tsx +++ b/cryptide_project/src/Pages/Profile.tsx @@ -186,7 +186,7 @@ const Profile = () => { } handleCloseDeleteModal(); - navigate(`/${basePath}/`) + navigate(`${basePath}/`) } else { console.error('Phrase de confirmation incorrecte.'); diff --git a/cryptide_project/src/Pages/SignUpForm.tsx b/cryptide_project/src/Pages/SignUpForm.tsx index f7f2a1a..9e29449 100644 --- a/cryptide_project/src/Pages/SignUpForm.tsx +++ b/cryptide_project/src/Pages/SignUpForm.tsx @@ -35,7 +35,7 @@ const SignUp = () => { setShowConfirmation(true); setTimeout(() => { - navigate(`/${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion + navigate(`${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion }, 1250); } } catch (error: any) { From 89f376801bbfa03f3909a89520fc5519b6ccb742 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 16:03:06 +0100 Subject: [PATCH 4/9] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5855957..f8710ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,7 +47,7 @@ steps: password: from_secret: SECRET_REGISTRY_PASSWORD environment: - REACT_APP_BASE_PATH: "/containers/Crypteam-website" + BASEPATH: "/containers/Crypteam-website" #depends_on: [ build ] From 93aa011b1d7c49e67896f62aa83f3d57b93362f8 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Tue, 5 Dec 2023 16:05:25 +0100 Subject: [PATCH 5/9] test variable d'envi --- cryptide_project/src/App.tsx | 2 +- cryptide_project/src/Components/GraphContainer.tsx | 2 +- cryptide_project/src/Components/LobbyContainer.tsx | 2 +- cryptide_project/src/Components/NavBar.tsx | 2 +- cryptide_project/src/Error/ErrorPage.tsx | 2 +- cryptide_project/src/Pages/InGame.tsx | 2 +- cryptide_project/src/Pages/Lobby.tsx | 2 +- cryptide_project/src/Pages/LoginForm.tsx | 2 +- cryptide_project/src/Pages/NewPlay.tsx | 2 +- cryptide_project/src/Pages/Play.tsx | 2 +- cryptide_project/src/Pages/Profile.tsx | 2 +- cryptide_project/src/Pages/SignUpForm.tsx | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cryptide_project/src/App.tsx b/cryptide_project/src/App.tsx index be4588a..bffffc7 100644 --- a/cryptide_project/src/App.tsx +++ b/cryptide_project/src/App.tsx @@ -42,7 +42,7 @@ import messagesEn from './Translations/en.json'; import ErrorBoundary from './Error/ErrorBoundary'; import ErrorPage from './Error/ErrorPage'; -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; const messages = { fr: messagesFr, diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index 83697dd..bc6dac2 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -67,7 +67,7 @@ let cptBug = 0 let cptUseEffect = 0 let testPlayers: Player[] = [] -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; const MyGraphComponent: React.FC = ({onNodeClick, handleShowTurnBar, handleTurnBarTextChange, playerTouched, setPlayerTouched, changecptTour, solo, isDaily, isEasy, addToHistory, showLast, setNetwork, setNetworkEnigme, setPlayerIndex, askedWrong, setAskedWrong, importToPdf, setImportToPdf}) => { diff --git a/cryptide_project/src/Components/LobbyContainer.tsx b/cryptide_project/src/Components/LobbyContainer.tsx index 797cef5..3dca90a 100644 --- a/cryptide_project/src/Components/LobbyContainer.tsx +++ b/cryptide_project/src/Components/LobbyContainer.tsx @@ -20,7 +20,7 @@ interface LobbyContainerProps { //? mettre un "nbplayermax" si le nombre de joueur max peut etre fixé ? } -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; const LobbyContainer: React.FC = ({roomNum, HeadPlayer, nbPlayer, setFirst, started}) => { const theme=useTheme(); diff --git a/cryptide_project/src/Components/NavBar.tsx b/cryptide_project/src/Components/NavBar.tsx index 5921026..5e1d0da 100644 --- a/cryptide_project/src/Components/NavBar.tsx +++ b/cryptide_project/src/Components/NavBar.tsx @@ -25,7 +25,7 @@ import { useTheme } from '../Style/ThemeContext'; import { useAuth } from '../Contexts/AuthContext'; import { useNavigate } from 'react-router-dom'; -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; // @ts-ignore diff --git a/cryptide_project/src/Error/ErrorPage.tsx b/cryptide_project/src/Error/ErrorPage.tsx index dc3da66..d0d26dc 100644 --- a/cryptide_project/src/Error/ErrorPage.tsx +++ b/cryptide_project/src/Error/ErrorPage.tsx @@ -6,7 +6,7 @@ import './ErrorStyle.css'; import { FormattedMessage } from 'react-intl'; import { Button } from 'react-bootstrap'; -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; //@ts-ignore diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index 099b6ea..e530061 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -52,7 +52,7 @@ import Indice from '../model/Indices/Indice'; let cptNavigation = 0 -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; //@ts-ignore const InGame = ({locale, changeLocale}) => { diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index 572c36a..11e4465 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -50,7 +50,7 @@ import { DataSet } from 'vis-network'; let gameStarted = false let firstLaunch = true -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; function Lobby() { diff --git a/cryptide_project/src/Pages/LoginForm.tsx b/cryptide_project/src/Pages/LoginForm.tsx index dde8427..3ca9782 100644 --- a/cryptide_project/src/Pages/LoginForm.tsx +++ b/cryptide_project/src/Pages/LoginForm.tsx @@ -5,7 +5,7 @@ import { useAuth } from '../Contexts/AuthContext'; import AuthService from '../services/AuthService'; import '../Style/Global.css'; -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; const SignIn = () => { const navigate = useNavigate(); diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index 8c658f1..7e0baec 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -34,7 +34,7 @@ import Lobbies from './Lobbies'; let cptNavigation = 0 -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index e783f53..9a8aca2 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -32,7 +32,7 @@ import Info from '../res/icon/infoGreen.png'; let cptNavigation = 0 -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; function Play() { diff --git a/cryptide_project/src/Pages/Profile.tsx b/cryptide_project/src/Pages/Profile.tsx index a59ad2e..39778eb 100644 --- a/cryptide_project/src/Pages/Profile.tsx +++ b/cryptide_project/src/Pages/Profile.tsx @@ -25,7 +25,7 @@ import Form from 'react-bootstrap/Form'; import ProgressBar from 'react-bootstrap/ProgressBar'; -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; //@ts-ignore const Profile = () => { diff --git a/cryptide_project/src/Pages/SignUpForm.tsx b/cryptide_project/src/Pages/SignUpForm.tsx index 9e29449..491b21f 100644 --- a/cryptide_project/src/Pages/SignUpForm.tsx +++ b/cryptide_project/src/Pages/SignUpForm.tsx @@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom'; import AuthService from '../services/AuthService'; import '../Style/Global.css'; -const basePath = process.env.REACT_APP_BASE_PATH || ''; +const basePath = process.env.BASEPATH || ''; const SignUp = () => { From 680d4681ebfa74d0748362bf5ffa773fe93bafac Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Tue, 5 Dec 2023 16:17:18 +0100 Subject: [PATCH 6/9] =?UTF-8?q?=C3=A7a=20devrait=20marcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/src/App.tsx | 2 +- cryptide_project/src/Components/GraphContainer.tsx | 3 +-- cryptide_project/src/Components/LobbyContainer.tsx | 2 +- cryptide_project/src/Components/NavBar.tsx | 3 +-- cryptide_project/src/Error/ErrorPage.tsx | 3 +-- cryptide_project/src/Pages/InGame.tsx | 2 +- cryptide_project/src/Pages/Lobby.tsx | 3 +-- cryptide_project/src/Pages/LoginForm.tsx | 2 +- cryptide_project/src/Pages/NewPlay.tsx | 3 +-- cryptide_project/src/Pages/Play.tsx | 3 +-- cryptide_project/src/Pages/Profile.tsx | 2 +- cryptide_project/src/Pages/SignUpForm.tsx | 2 +- 12 files changed, 12 insertions(+), 18 deletions(-) diff --git a/cryptide_project/src/App.tsx b/cryptide_project/src/App.tsx index bffffc7..bbac424 100644 --- a/cryptide_project/src/App.tsx +++ b/cryptide_project/src/App.tsx @@ -42,7 +42,7 @@ import messagesEn from './Translations/en.json'; import ErrorBoundary from './Error/ErrorBoundary'; import ErrorPage from './Error/ErrorPage'; -const basePath = process.env.BASEPATH || ''; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; const messages = { fr: messagesFr, diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index bc6dac2..80bc4c8 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -67,8 +67,7 @@ let cptBug = 0 let cptUseEffect = 0 let testPlayers: Player[] = [] -const basePath = process.env.BASEPATH || ''; - +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; const MyGraphComponent: React.FC = ({onNodeClick, handleShowTurnBar, handleTurnBarTextChange, playerTouched, setPlayerTouched, changecptTour, solo, isDaily, isEasy, addToHistory, showLast, setNetwork, setNetworkEnigme, setPlayerIndex, askedWrong, setAskedWrong, importToPdf, setImportToPdf}) => { let cptTour: number = 0 diff --git a/cryptide_project/src/Components/LobbyContainer.tsx b/cryptide_project/src/Components/LobbyContainer.tsx index 3dca90a..edebe08 100644 --- a/cryptide_project/src/Components/LobbyContainer.tsx +++ b/cryptide_project/src/Components/LobbyContainer.tsx @@ -20,7 +20,7 @@ interface LobbyContainerProps { //? mettre un "nbplayermax" si le nombre de joueur max peut etre fixé ? } -const basePath = process.env.BASEPATH || ''; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; const LobbyContainer: React.FC = ({roomNum, HeadPlayer, nbPlayer, setFirst, started}) => { const theme=useTheme(); diff --git a/cryptide_project/src/Components/NavBar.tsx b/cryptide_project/src/Components/NavBar.tsx index 5e1d0da..6922287 100644 --- a/cryptide_project/src/Components/NavBar.tsx +++ b/cryptide_project/src/Components/NavBar.tsx @@ -25,8 +25,7 @@ import { useTheme } from '../Style/ThemeContext'; import { useAuth } from '../Contexts/AuthContext'; import { useNavigate } from 'react-router-dom'; -const basePath = process.env.BASEPATH || ''; - +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; // @ts-ignore function AppNavbar({changeLocale}) { diff --git a/cryptide_project/src/Error/ErrorPage.tsx b/cryptide_project/src/Error/ErrorPage.tsx index d0d26dc..ad90cde 100644 --- a/cryptide_project/src/Error/ErrorPage.tsx +++ b/cryptide_project/src/Error/ErrorPage.tsx @@ -6,8 +6,7 @@ import './ErrorStyle.css'; import { FormattedMessage } from 'react-intl'; import { Button } from 'react-bootstrap'; -const basePath = process.env.BASEPATH || ''; - +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; //@ts-ignore function ErrorPage({ code = "", msg = "Something is wrong"}) { diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index e530061..3446d44 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -52,7 +52,7 @@ import Indice from '../model/Indices/Indice'; let cptNavigation = 0 -const basePath = process.env.BASEPATH || ''; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; //@ts-ignore const InGame = ({locale, changeLocale}) => { diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index 11e4465..89cde23 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -50,8 +50,7 @@ import { DataSet } from 'vis-network'; let gameStarted = false let firstLaunch = true -const basePath = process.env.BASEPATH || ''; - +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; function Lobby() { const theme=useTheme(); diff --git a/cryptide_project/src/Pages/LoginForm.tsx b/cryptide_project/src/Pages/LoginForm.tsx index 3ca9782..0f7976d 100644 --- a/cryptide_project/src/Pages/LoginForm.tsx +++ b/cryptide_project/src/Pages/LoginForm.tsx @@ -5,7 +5,7 @@ import { useAuth } from '../Contexts/AuthContext'; import AuthService from '../services/AuthService'; import '../Style/Global.css'; -const basePath = process.env.BASEPATH || ''; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; const SignIn = () => { const navigate = useNavigate(); diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index 7e0baec..38bb038 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -34,8 +34,7 @@ import Lobbies from './Lobbies'; let cptNavigation = 0 -const basePath = process.env.BASEPATH || ''; - +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; function NewPlay() { diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index 9a8aca2..f0a80f3 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -32,8 +32,7 @@ import Info from '../res/icon/infoGreen.png'; let cptNavigation = 0 -const basePath = process.env.BASEPATH || ''; - +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; function Play() { let first = true diff --git a/cryptide_project/src/Pages/Profile.tsx b/cryptide_project/src/Pages/Profile.tsx index 39778eb..73349b5 100644 --- a/cryptide_project/src/Pages/Profile.tsx +++ b/cryptide_project/src/Pages/Profile.tsx @@ -25,7 +25,7 @@ import Form from 'react-bootstrap/Form'; import ProgressBar from 'react-bootstrap/ProgressBar'; -const basePath = process.env.BASEPATH || ''; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; //@ts-ignore const Profile = () => { diff --git a/cryptide_project/src/Pages/SignUpForm.tsx b/cryptide_project/src/Pages/SignUpForm.tsx index 491b21f..b1dac73 100644 --- a/cryptide_project/src/Pages/SignUpForm.tsx +++ b/cryptide_project/src/Pages/SignUpForm.tsx @@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom'; import AuthService from '../services/AuthService'; import '../Style/Global.css'; -const basePath = process.env.BASEPATH || ''; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; const SignUp = () => { From 1b27508a8d4ace226362cef7cd87874ffdc35a4d Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Tue, 5 Dec 2023 16:21:04 +0100 Subject: [PATCH 7/9] =?UTF-8?q?la=20=C3=A7a=20devrait=20vraiment=20compl?= =?UTF-8?q?=C3=A9tement=20marcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/src/Components/NavBar.tsx | 6 +++--- cryptide_project/src/Pages/Home.tsx | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cryptide_project/src/Components/NavBar.tsx b/cryptide_project/src/Components/NavBar.tsx index 6922287..bd94a74 100644 --- a/cryptide_project/src/Components/NavBar.tsx +++ b/cryptide_project/src/Components/NavBar.tsx @@ -52,13 +52,13 @@ function AppNavbar({changeLocale}) { diff --git a/cryptide_project/src/Pages/Home.tsx b/cryptide_project/src/Pages/Home.tsx index bc28c69..3e4d9ae 100644 --- a/cryptide_project/src/Pages/Home.tsx +++ b/cryptide_project/src/Pages/Home.tsx @@ -13,6 +13,9 @@ import { socket } from '../SocketConfig'; import JSONParser from '../JSONParser'; +const basePath = process.env.REACT_APP_BASE_PATH || '/containers/Crypteam-website'; + + // @ts-ignore function Home() { const theme=useTheme(); @@ -100,7 +103,7 @@ function Home() { {/*


Kwanchai Moriya

*/} {/* */}
- Date: Tue, 5 Dec 2023 16:23:11 +0100 Subject: [PATCH 8/9] la vraiment vraiment --- cryptide_project/src/Components/GraphContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/src/Components/GraphContainer.tsx b/cryptide_project/src/Components/GraphContainer.tsx index 80bc4c8..f16c253 100644 --- a/cryptide_project/src/Components/GraphContainer.tsx +++ b/cryptide_project/src/Components/GraphContainer.tsx @@ -1019,7 +1019,7 @@ const MyGraphComponent: React.FC = ({onNodeClick, handleS catch(error){ console.log(error); } - navigate(`${basePath}/endgame?solo=true+${isDaily}`) + navigate(`${basePath}/endgame?solo=true&daily=${isDaily}`) } } From 9e558d08119c3cb6e0fc0779415595b03c2a23ac Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 16:24:56 +0100 Subject: [PATCH 9/9] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fpro?= =?UTF-8?q?ject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 591738e..64757e5 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -30,3 +30,4 @@ EXPOSE 80 # Définissez ENTRYPOINT pour démarrer Nginx lorsque le conteneur est lancé ENTRYPOINT ["nginx", "-g", "daemon off;"] +# \ No newline at end of file