diff --git a/cryptide_project/src/Components/ScoreBoard.tsx b/cryptide_project/src/Components/ScoreBoard.tsx index e005dea..b4198a5 100644 --- a/cryptide_project/src/Components/ScoreBoard.tsx +++ b/cryptide_project/src/Components/ScoreBoard.tsx @@ -32,11 +32,19 @@ const ScoreBoard: React.FC<{ Player: User }> = ({ Player }) => { //
- - + + + { Player.pseudo.startsWith("Guest_") ? ( +
+

+ Veuillez vous connecter pour bénéficier des statistiques personnalisées. +

+
+ ) : ( + Stats en solo : Partie Jouées : @@ -65,8 +73,9 @@ const ScoreBoard: React.FC<{ Player: User }> = ({ Player }) => { {Player !== null ? Player.onlineStats.ratio : "0"} + )}
- = ({ Player }) => { height='100' width='100' alt="Person2"/> - +
*/}
- + {/* */}
//
); diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index e3feff6..2218940 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -244,7 +244,7 @@ const InGame = ({locale, changeLocale}) => { } -
+ {/*
-
+
*/} diff --git a/cryptide_project/src/Pages/Lobby.css b/cryptide_project/src/Pages/Lobby.css index 60dfcf0..0428a83 100644 --- a/cryptide_project/src/Pages/Lobby.css +++ b/cryptide_project/src/Pages/Lobby.css @@ -59,4 +59,14 @@ .centerButton { display: flex; justify-content: center; +} + +.lobbyR{ + display: flex; + flex-direction: column; + align-items: center; +} + +.lobbyR *{ + margin: 20px 10px; } \ No newline at end of file diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index 6fcd06f..18c63bc 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -43,6 +43,11 @@ import { random } from 'lodash'; import SessionService from '../services/SessionService'; +import { useRef } from 'react'; +import Button from 'react-bootstrap/Button'; +import Overlay from 'react-bootstrap/Overlay'; + + let gameStarted = false function Lobby() { @@ -159,6 +164,24 @@ function Lobby() { socket.emit('network created', JSON.stringify(networkPerson, null, 2), JSON.stringify(choosenPerson), JSON.stringify(choosenIndices), room, start); } + + + const copyGameLink = () => { + setShow(!show) + + const gameLink = "http://localhost:3000/lobby?room="+ room; + navigator.clipboard.writeText(gameLink) + .then(() => { + console.log('Lien copié avec succès !'); + }) + .catch((err) => { + console.error('Erreur lors de la copie du lien :', err); + }); + }; + + const [show, setShow] = useState(false); + const target = useRef(null); + return (
@@ -191,22 +214,22 @@ function Lobby() {
-
+ {/*
param

Paramètre de la partie

-
    -
  • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim

  • +
      */} + {/*
    • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim

    • paramètre super important pour la partie

    • paramètre super important pour la partie

    • paramètre super important pour la partie

    • -
    • Niveau des bots : Facile

    • {/* mettre un dropdown ou un swiper */} -
    • Thèmes : basique

    • {/* mettre un dropdown*/} +
    • Niveau des bots : Facile

    • +
    • Thèmes : basique

    • */} { //? mettre un timer pour chaques personne ? //? indice avancé ? ==> négation, voisin du 2e degré etc. } -
    + {/*
*/} {/*
*/} -
+
+

Bienvenue dans votre lobby !

+

Attendez que tous vos amis se joignent avant de lancer la partie.

+ {/* Bouton pour copier le lien */} + + + {({ + placement: _placement, + arrowProps: _arrowProps, + show: _show, + popper: _popper, + hasDoneInitialMeasure: _hasDoneInitialMeasure, + ...props + }) => ( +
+ Lien copié +
+ )} +
+
diff --git a/cryptide_project/src/Pages/Play.css b/cryptide_project/src/Pages/Play.css index 07e51aa..ed1826d 100644 --- a/cryptide_project/src/Pages/Play.css +++ b/cryptide_project/src/Pages/Play.css @@ -70,4 +70,18 @@ border-width: 2px; font-size:larger; +} + +.guestDisplay{ + display: flex; + justify-content: center; + align-items: center; + /* flex-direction: column; */ + + margin: 20px; + padding: 15px; + border: solid 1px whitesmoke; + border-radius: 15px; + + background-color: white; } \ No newline at end of file diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index 03c5ddf..d0e15e8 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -184,7 +184,7 @@ function Play() { - + {/* */}