ajout du bouton pour revenir sur la page de jeu apres une deconnexion
continuous-integration/drone/push Build is passing Details

pull/96/head
Pierre Ferreira 1 year ago
parent d88c8281b3
commit 9559a69e7e

@ -56,7 +56,7 @@ function Lobbies() {
); );
const filteredLobbiesToShow = showAvailable const filteredLobbiesToShow = showAvailable
? filteredLobbies.filter((lobby) => lobby.started == false && lobby.nbPlayer < 6) ? filteredLobbies.filter((lobby) => lobby.started == false && lobby.nbPlayer < 6) //* retire les lobbies pleins ou commencés
: filteredLobbies; : filteredLobbies;

@ -229,12 +229,26 @@ function NewPlay() {
}; };
// if (goBackRoom != -1){
// var returnVisibility = "visible"
// }
// else{
// var returnVisibility = "hidden"
// }
// const returnVisibility: Visibility = goBackRoom !== -1 ? "visible" : "hidden";
const returnVisibility: any= goBackRoom !== -1 ? "visible" : "hidden" ;
return ( return (
<div className="MainContainer"> <div className="MainContainer">
<div className="NewleftContainer"> <div className="NewleftContainer">
{/* Menu de boutons */} {/* Menu de boutons */}
<div className='NewbuttonGroupVertical'> <div className='NewbuttonGroupVertical'>
<button onClick={launchMastermind} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Jouer seul </button> <button onClick={launchMastermind} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Jouer seul </button>
@ -259,10 +273,11 @@ function NewPlay() {
)} )}
</Overlay> </Overlay>
<button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button> <button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button>
<button onClick= {() => navigate("/join")} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button> <button onClick= {() => navigate("/join")} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button>
{goBackRoom != -1 && <button onClick={goBack} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}>Retourner à la partie</button>} {/* {goBackRoom != -1 && <button onClick={goBack} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}>Retourner à la partie</button>} */}
<button onClick={goBack} className="ButtonNavRejoin" style={{ visibility:returnVisibility}}>Retourner à la partie</button>
</div> </div>
{/* Lobbies */} {/* Lobbies */}
@ -271,9 +286,6 @@ function NewPlay() {
</div> </div>
</div> </div>
{/* <div className="MidContainer">
</div> */}
<div className='NewrightContainer'> <div className='NewrightContainer'>
{user && (<ScoreBoard Player={user}/>)} {user && (<ScoreBoard Player={user}/>)}
</div> </div>

@ -20,12 +20,6 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
/*
.MidContainer div {
display: flex;
justify-content: center;
flex-direction: column;
} */
.leftContainer{ .leftContainer{
width: 30%; width: 30%;
@ -75,7 +69,7 @@
.ButtonNav{ .ButtonNav{
margin: 15px 0; margin: 15px 10px;
width:200px; width:200px;
height: 8vh; height: 8vh;
@ -90,6 +84,20 @@
font-size:larger; font-size:larger;
} }
.ButtonNavRejoin{
margin: 15px 10px;
width:200px;
height: 8vh;
color: white;
background-color: aquamarine;
border: solid 2px rgb(40, 225, 163);
border-radius: 15px;
font-size:larger;
}
.returnDiv{ .returnDiv{
display: flex; display: flex;
flex-direction: column; flex-direction: column;

Loading…
Cancel
Save