changed back images

This commit is contained in:
Quentin Roussel
2024-04-24 18:15:47 +02:00
parent 31eb15f006
commit 715cc04655
5 changed files with 6 additions and 5 deletions

View File

@@ -26,6 +26,7 @@ ALLOWED_TIME_OUT_OF_ZONE_IN_MINUTES is the time a user can be out of the zone be
ALLOWED_TIME_BETWEEN_POSITION_UPDATE_IN_MINUTES is the maximum amount of time a user can wait before updating their position, after this period they will recieve a pennalty. ALLOWED_TIME_BETWEEN_POSITION_UPDATE_IN_MINUTES is the maximum amount of time a user can wait before updating their position, after this period they will recieve a pennalty.
Note : make sure PORT and NEXT_PUBLIC_SOCKET_PORT are the same Note : make sure PORT and NEXT_PUBLIC_SOCKET_PORT are the same
Note 2 : you need to get a trusted certificate for this to work, you can use letsencrypt for that
### Running the project ### Running the project
#### Front end #### Front end

View File

@@ -30,10 +30,10 @@ export default function ActionDrawer() {
return ( return (
<div className={"fixed w-screen bottom-0 z-10 bg-gray-100 flex justify-center rounded-t-2xl transition-all duration-200 flex flex-col " + (visible ? "h-full" : "h-20")}> <div className={"fixed w-screen bottom-0 z-10 bg-gray-100 flex justify-center rounded-t-2xl transition-all duration-200 flex flex-col " + (visible ? "h-full" : "h-20")}>
<Image src="/icons/arrow_up.png" className={"w-full object-scale-down h-ful max-h-20 transition-all cursor-pointer duration-200 " + (visible && "rotate-180")} onClick={() => setVisible(!visible)} /> <img src="/icons/arrow_up.png" className={"w-full object-scale-down h-ful max-h-20 transition-all cursor-pointer duration-200 " + (visible && "rotate-180")} onClick={() => setVisible(!visible)} />
{visible && <div className="flex justify-between flex-col w-full h-full"> {visible && <div className="flex justify-between flex-col w-full h-full">
<div className="flex flex-row justify-around"> <div className="flex flex-row justify-around">
<Image src="/icons/logout.png" onClick={logout} className='p-3 mx-2 w-14 h-14 bg-red-500 rounded-lg cursor-pointer bg-red z-20' /> <img src="/icons/logout.png" onClick={logout} className='p-3 mx-2 w-14 h-14 bg-red-500 rounded-lg cursor-pointer bg-red z-20' />
</div> </div>
<div className='shadow-2xl bg-white p-1 flex flex-col text-center mb-1 mx-auto w-4/5 rounded'> <div className='shadow-2xl bg-white p-1 flex flex-col text-center mb-1 mx-auto w-4/5 rounded'>
<div> <div>

View File

@@ -23,7 +23,7 @@ export function EnemyTeamModal({ visible, onClose }) {
<div className='fixed w-screen h-screen bg-black bg-opacity-50 z-10 text-center'></div> <div className='fixed w-screen h-screen bg-black bg-opacity-50 z-10 text-center'></div>
<div className='fixed w-11/12 h-5/6 p-5 z-20 mx-auto inset-x-0 my-auto inset-y-0 flex flex-col justify-center rounded-xl transition-all shadow-xl bg-white '> <div className='fixed w-11/12 h-5/6 p-5 z-20 mx-auto inset-x-0 my-auto inset-y-0 flex flex-col justify-center rounded-xl transition-all shadow-xl bg-white '>
<h1 className="w-full text-center text-3xl mb-5">{enemyName}</h1> <h1 className="w-full text-center text-3xl mb-5">{enemyName}</h1>
<Image ref={imageRef} src={SERVER_URL + "/photo/enemy?team=" + teamId.toString()} className='w-full h-full object-contain' /> <img ref={imageRef} src={SERVER_URL + "/photo/enemy?team=" + teamId.toString()} className='w-full h-full object-contain' />
<div className="h-20"> <div className="h-20">
<RedButton onClick={onClose}>Close</RedButton> <RedButton onClick={onClose}>Close</RedButton>
</div> </div>

View File

@@ -42,7 +42,7 @@ export function WaitingScreen() {
<GreenButton onClick={sendImage}>Envoyer</GreenButton> <GreenButton onClick={sendImage}>Envoyer</GreenButton>
</div> </div>
</div> </div>
{teamId && <Image ref={imageRef} src={SERVER_URL + "/photo/my?team=" + teamId.toString()} className='w-screen h-1/2 object-contain' />} {teamId && <img ref={imageRef} src={SERVER_URL + "/photo/my?team=" + teamId.toString()} className='w-screen h-1/2 object-contain' />}
</div> </div>
) )
} }

View File

@@ -21,5 +21,5 @@ export function GreenButton({ children, ...props }) {
export function LogoutButton() { export function LogoutButton() {
const { logout } = useTeamConnexion(); const { logout } = useTeamConnexion();
return <Image src="/icons/logout.png" onClick={logout} className='w-12 h-12 bg-red-500 p-2 top-1 right-1 rounded-lg cursor-pointer bg-red fixed z-20' /> return <img src="/icons/logout.png" onClick={logout} className='w-12 h-12 bg-red-500 p-2 top-1 right-1 rounded-lg cursor-pointer bg-red fixed z-20' />
} }