Merge pull request 'fix de quelques problème et ajout du bouton pour la vision 🔧' (#76) from BranchPourBouton into master

Reviewed-on: #76
pull/78/head
Pierre FERREIRA 11 months ago
commit eec5328dcc

@ -20,6 +20,8 @@ import Info from "../res/icon/infoGreen.png";
import Check from "../res/icon/checkboxGreen.png"; import Check from "../res/icon/checkboxGreen.png";
import Alpha from "../res/GreekLetters/alphaW.png"; import Alpha from "../res/GreekLetters/alphaW.png";
import MGlass from "../res/icon/magnifying-glass.png"; import MGlass from "../res/icon/magnifying-glass.png";
import Oeye from "../res/icon/eye.png";
import Ceye from "../res/icon/hidden.png";
/* nav */ /* nav */
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
@ -37,6 +39,7 @@ import Color from '../model/Color';
import { useGame } from '../Contexts/GameContext'; import { useGame } from '../Contexts/GameContext';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { last } from 'lodash';
//@ts-ignore //@ts-ignore
const InGame = ({locale, changeLocale}) => { const InGame = ({locale, changeLocale}) => {
@ -110,6 +113,9 @@ const InGame = ({locale, changeLocale}) => {
const [cptTour, setcptTour] = useState(0); const [cptTour, setcptTour] = useState(0);
const [LastVisible, setLastVisible] = useState(false);
//@ts-ignore //@ts-ignore
const changecptTour = (newcptTour) => { const changecptTour = (newcptTour) => {
setcptTour(newcptTour); setcptTour(newcptTour);
@ -142,6 +148,11 @@ const InGame = ({locale, changeLocale}) => {
} }
}; };
const changeVisibility = () => {
setLastVisible(!LastVisible);
}
const eye = LastVisible ? Oeye : Ceye; //icon que l'on affiche pour l'oeil : fermé ou ouvert.
/* Windows open */ /* Windows open */
//@ts-ignore //@ts-ignore
const openInNewTab = (url) => { //! avec url ==> dangereux const openInNewTab = (url) => { //! avec url ==> dangereux
@ -229,6 +240,14 @@ const InGame = ({locale, changeLocale}) => {
}}> }}>
<img src={MGlass} alt="indice" height="40"/> <img src={MGlass} alt="indice" height="40"/>
</button> </button>
<button className='button' onClick={changeVisibility}
style={{
backgroundColor: theme.colors.tertiary,
borderColor: theme.colors.secondary
}}>
<img src={ eye } alt="indice" height="40"/>
</button>
</div> </div>
{/* {/*
@ -243,10 +262,12 @@ const InGame = ({locale, changeLocale}) => {
</Offcanvas.Body> </Offcanvas.Body>
</Offcanvas> </Offcanvas>
*/} */}
<div className='playerlistDiv'>
<PlayerList players={players} setPlayerTouched={handleSetPlayerTouched} playerTouched={playerTouched} />
</div>
{ !IsSolo &&
<div className='playerlistDiv'>
<PlayerList players={players} setPlayerTouched={handleSetPlayerTouched} playerTouched={playerTouched} />
</div>
}
<Offcanvas show={show} <Offcanvas show={show}
onHide={handleClose} onHide={handleClose}

@ -1,7 +1,7 @@
// theme.js // theme.js
const theme = { const theme = {
colors: { colors: {
primary: '#7AA3F4', primary: '#0064E0',
secondary: '#0052B8', secondary: '#0052B8',
tertiary: '#7aa3f4', //* Pour les boutons de l'interface. tertiary: '#7aa3f4', //* Pour les boutons de l'interface.
text: '#fff' text: '#fff'

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Loading…
Cancel
Save